Bug 575864 - avoid spinning without wait java editor calls signalWaitForFinish when editor is opened without any reconciling work. Just forget that signal and spin with delay + wake up that waiting delay when dirty flag is set. Change-Id: I40c74f19aa788fbd1964204ec75c3852995d8ca5 Signed-off-by: Joerg Kubitz <jkubitz-eclipse@gmx.de> Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/190780 Reviewed-by: Andrey Loskutov <loskutov@gmx.de> Tested-by: Andrey Loskutov <loskutov@gmx.de>
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/reconciler/AbstractReconciler.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/reconciler/AbstractReconciler.java index 296dc54..c7dccfd 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/reconciler/AbstractReconciler.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/reconciler/AbstractReconciler.java
@@ -139,6 +139,9 @@ fIsDirty= true; fReset= true; } + synchronized (fDirtyRegionQueue) { + fDirtyRegionQueue.notifyAll(); // wake up wait(fDelay); + } } else { @@ -180,8 +183,10 @@ if (fCanceled) break; - if (!isDirty()) + if (!isDirty()) { + waitFinish= false; //signalWaitForFinish() was called but nothing todo continue; + } synchronized (this) { if (fReset) {