summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSnjezana Peco2013-01-04 15:41:51 (EST)
committer Nick Sandonato2013-01-07 16:14:08 (EST)
commited1881bfd7e31ed7e7e9b9c6d76dfd0c0ed07578 (patch)
treedf9cfcec5ecc20a491b847c7a931f588689a6e3e
parentca9a5346f634373ea78461933d7c368161168127 (diff)
downloadwebtools.sourceediting-ed1881bfd7e31ed7e7e9b9c6d76dfd0c0ed07578.zip
webtools.sourceediting-ed1881bfd7e31ed7e7e9b9c6d76dfd0c0ed07578.tar.gz
webtools.sourceediting-ed1881bfd7e31ed7e7e9b9c6d76dfd0c0ed07578.tar.bz2
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DirtyRegionProcessor.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DirtyRegionProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DirtyRegionProcessor.java
index d361d51..7eb51ff 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DirtyRegionProcessor.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DirtyRegionProcessor.java
@@ -521,6 +521,9 @@ public class DirtyRegionProcessor implements IReconciler, IReconcilerExtension,
*/
private synchronized DirtyRegion[] getRequests() {
synchronized (fDirtyRegionQueue) {
+ if (0 == fDirtyRegionQueue.size()) {
+ return null;
+ }
DirtyRegion[] toRefresh = (DirtyRegion[]) fDirtyRegionQueue.toArray(new DirtyRegion[fDirtyRegionQueue.size()]);
flushDirtyRegionQueue();
return toRefresh;
@@ -678,15 +681,15 @@ public class DirtyRegionProcessor implements IReconciler, IReconcilerExtension,
boolean processed = false;
try {
DirtyRegion[] toRefresh = getRequests();
- if (toRefresh.length > 0) {
+ if (toRefresh != null && toRefresh.length > 0) {
processed = true;
beginProcessing();
- }
-
- for (int i = 0; i < toRefresh.length && fDocument != null; i++) {
- if (fIsCanceled)
- return;
- process(toRefresh[i]);
+
+ for (int i = 0; i < toRefresh.length && fDocument != null; i++) {
+ if (fIsCanceled)
+ return;
+ process(toRefresh[i]);
+ }
}
}
finally {