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:
parent
e07c2eaac5
commit
6c009d8c5e
1 changed files with 2 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue