summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSnjezana Peco2013-01-04 15:41:51 (EST)
committerNick Sandonato2013-01-07 16:39:30 (EST)
commitd8b1867b0c88dd275a75c625cdb095979ec4f575 (patch)
tree57364158812e4ec0d90f32dd61f3653e1a43e0bf
parent7b7761fa4e2c4cab0442a600d06c24744bcf9c40 (diff)
downloadwebtools.sourceediting-d8b1867b0c88dd275a75c625cdb095979ec4f575.zip
webtools.sourceediting-d8b1867b0c88dd275a75c625cdb095979ec4f575.tar.gz
webtools.sourceediting-d8b1867b0c88dd275a75c625cdb095979ec4f575.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 2a1cf02..7d88695 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
@@ -529,6 +529,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;
@@ -686,15 +689,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 {