1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-06 17:26:01 +02:00

Fix for 211251: Open Element takes too long when using for large project

This commit is contained in:
Anton Leherbauer 2007-11-29 15:40:33 +00:00
parent e07c2eaac5
commit 6c009d8c5e

View file

@ -81,13 +81,12 @@ public class ElementSelectionDialog extends TypeSelectionDialog {
public void run() {
if (!shell.isDisposed() && !monitor.isCanceled()) {
setListElements(elements);
done(Status.OK_STATUS);
updateOkState();
}
}};
shell.getDisplay().asyncExec(update);
monitor.done();
return Job.ASYNC_FINISH;
return Status.OK_STATUS;
}
}
return Status.CANCEL_STATUS;
@ -346,7 +345,7 @@ public class ElementSelectionDialog extends TypeSelectionDialog {
newPrefix= null;
needQuery= needQuery || fCurrentPrefix != null;
}
if(needQuery) {
if(needQuery || fUpdateJob.getState() == Job.WAITING || fUpdateJob.getState() == Job.SLEEPING) {
fUpdateJob.cancel();
fCurrentPrefix= newPrefix;
fUpdateJob.schedule(200);