gruntspugd : 0.4.6
jedit : 4.2 final
Command diff that calls jdiff still causes jedit to
hang. I'v solved the problem in 0.4.1 by commenting
some code in handleMessage (class JEditGrunspudHost ).
Im not sure which comment was the one that solved
problem, but it's probably :
if (msg instanceof BufferUpdate) {
BufferUpdate update = (BufferUpdate) msg;
if (update.getBuffer() != null &&
update.getWhat() == BufferUpdate.SAVED) {
final File f = new
File(update.getBuffer().getPath());
if (f.exists()) {
Thread t = new Thread() {
public void run() {
GruntspudPlugin.getErrorSource().removeFileErrors(f.getAbsolutePath());
}
};
t.start();
}
}
// else if (update.getBuffer() != null &&
// (update.getWhat() ==
BufferUpdate.CLOSED ||
// update.getWhat() ==
BufferUpdate.LOADED)) {
// /** @todo how do i find out if this
is a local vfs? */
// final File f = new
File(update.getBuffer().getPath());
// if (f.exists()) {
// Thread t = new Thread() {
// public void run() {
// CVSFileNode n =
context.getViewManager().
// findNodeForPath(
//
context.getViewManager().getRootNode(), f, false);
// if (n != null) {
//
gruntspud.getContext().getViewManager().reload(
// n);
// if
(n.getLocalStatus() == FileStatus.HAS_CONFLICTS) {
//
GruntspudPlugin.getErrorSource().addConflictErrors(n.getFile());
// }
// }
// }
// };
// t.start();
// }
// }
}
Logged In: YES
user_id=553482
Im not sure why this work affect jdiff and cause a hang, but
it may be related to the other UI locking bugs that have now
been fixed for 0.4.7. Please let me know how you get on with
the release and if it is still a problem i will look into it
further.
Logged In: NO
I'v got new version from cvs and have been trying for 5 min
to make jEdit hang. Finally I'v succeeded few times. It
Isn't so easy as in original 0.4.1 but there is still a
problem. Try this:
-execute diff
-while "command progress" window is displaying click on text
area, then toggle flat mode
Eventually it will hang.
I'm not sure but I think in this version everything was ok
if I wasn't doing anything during command execution.
Logged In: YES
user_id=553482
TBH, toggling flat mode whilst a command is running is
probably not a good thing to do as the command may trigger
updates to the tree. Ive just commited a fix for another bug
that may have an affect on this, so it might be worth
updating and trying again. Failing that, I may disable that
action until the command is finished.
Logged In: NO
New version still doesn't work. Now I didn't execute any
grunspud command during diff. I'v been clicking a lot on
both panes (from previous diff execution) during diff
execution and it hangs quite fast.
Logged In: NO
I didnt'n find exact cause of the problem, but after few
minutes of testing i think this will solve the problem:
Index: DiffAction.java
RCS file:
/cvsroot/gruntspud/gruntspud/src/java/gruntspud/actions/DiffAction.java,v
retrieving revision 1.40
diff -r1.40 DiffAction.java
175c175
< private void diff(String type, final File f1, String
title1, final File f2, String title2, String encoding) {
---
> private void diff(String type, final File f1, final
String title1, final File f2, final String title2, final
String encoding) {
178c178,182
< getContext().getHost().diff(f1, title1, f2, title2,
encoding);
---
> javax.swing.SwingUtilities.invokeLater(new Runnable() {
> public void run() {
> getContext().getHost().diff(f1, title1, f2, title2,
encoding);
> }
> });