Author: vrubezhny
Date: 2012-08-01 10:40:01 -0400 (Wed, 01 Aug 2012)
New Revision: 42830
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
Java Model Exception appearance is fixed
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-08-01
11:58:02 UTC (rev 42829)
+++
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java 2012-08-01
14:40:01 UTC (rev 42830)
@@ -451,6 +451,7 @@
int position = fStartRegionToProcess;
try {
+ unit = unit.getWorkingCopy(null);
IJavaElement element = null;
while (position >= 0 && (element = unit.getElementAt(position--)) == null)
;
@@ -513,6 +514,12 @@
}
} catch (JavaModelException e) {
LogHelper.logError(CommonValidationPlugin.getDefault(), e);
+ } finally {
+ try {
+ unit.discardWorkingCopy();
+ } catch (JavaModelException e) {
+ LogHelper.logError(CommonValidationPlugin.getDefault(), e);
+ }
}
return atLeastOneElementIsProcessed ? result : true;
Show replies by date