Author: vrubezhny
Date: 2012-06-25 22:25:43 -0400 (Mon, 25 Jun 2012)
New Revision: 42208
Modified:
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java
Log:
JBIDE-10738
As-you-type EL validation
As-you-type validation is turned off for non-modified files
Modified:
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java 2012-06-26
00:10:59 UTC (rev 42207)
+++
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java 2012-06-26
02:25:43 UTC (rev 42208)
@@ -180,7 +180,7 @@
}
}
}
-
+
/**
* Adds annotation to the annotation model, and stores it in fAnnotations with either
actual position
* or special constant ALWAYS_CLEARED (when cleanAllAnnotations = true) that indicates
that
@@ -461,8 +461,7 @@
protected void process(DirtyRegion dirtyRegion) {
IDocument doc = getDocument();
-
- if (!isInstalled() || isInRewrite() || dirtyRegion == null || doc == null ||
fIsCanceled) {
+ if (!fEditor.isDirty() || !isInstalled() || isInRewrite() || dirtyRegion == null || doc
== null || fIsCanceled) {
return;
}
@@ -483,15 +482,15 @@
* Expand dirtyRegion to partitions boundaries
*/
try {
- ITypedRegion startPartition = (fDocument instanceof IDocumentExtension3) ?
- ((IDocumentExtension3)fDocument).getPartition(IJavaPartitions.JAVA_PARTITIONING,
start, true) :
- fDocument.getPartition(start);
+ ITypedRegion startPartition = (doc instanceof IDocumentExtension3) ?
+ ((IDocumentExtension3)doc).getPartition(IJavaPartitions.JAVA_PARTITIONING, start,
true) :
+ doc.getPartition(start);
if (startPartition != null && start > startPartition.getOffset())
start = startPartition.getOffset();
- ITypedRegion endPartition = (fDocument instanceof IDocumentExtension3) ?
- ((IDocumentExtension3)fDocument).getPartition(IJavaPartitions.JAVA_PARTITIONING,
end, false) :
- fDocument.getPartition(end);
+ ITypedRegion endPartition = (doc instanceof IDocumentExtension3) ?
+ ((IDocumentExtension3)doc).getPartition(IJavaPartitions.JAVA_PARTITIONING, end,
false) :
+ doc.getPartition(end);
if (endPartition != null && end < endPartition.getOffset() +
endPartition.getLength())
end = endPartition.getOffset() + endPartition.getLength();
} catch (BadLocationException e) {
Show replies by date