1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 09:46:02 +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() { public void run() {
if (!shell.isDisposed() && !monitor.isCanceled()) { if (!shell.isDisposed() && !monitor.isCanceled()) {
setListElements(elements); setListElements(elements);
done(Status.OK_STATUS);
updateOkState(); updateOkState();
} }
}}; }};
shell.getDisplay().asyncExec(update); shell.getDisplay().asyncExec(update);
monitor.done(); monitor.done();
return Job.ASYNC_FINISH; return Status.OK_STATUS;
} }
} }
return Status.CANCEL_STATUS; return Status.CANCEL_STATUS;
@ -346,7 +345,7 @@ public class ElementSelectionDialog extends TypeSelectionDialog {
newPrefix= null; newPrefix= null;
needQuery= needQuery || fCurrentPrefix != null; needQuery= needQuery || fCurrentPrefix != null;
} }
if(needQuery) { if(needQuery || fUpdateJob.getState() == Job.WAITING || fUpdateJob.getState() == Job.SLEEPING) {
fUpdateJob.cancel(); fUpdateJob.cancel();
fCurrentPrefix= newPrefix; fCurrentPrefix= newPrefix;
fUpdateJob.schedule(200); fUpdateJob.schedule(200);