Author: akazakov
Date: 2012-05-30 13:25:34 -0400 (Wed, 30 May 2012)
New Revision: 41540
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContextImpl.java
trunk/common/plugins/org.jboss.tools.common.validation/plugin.xml
Log:
https://issues.jboss.org/browse/JBIDE-10738 As-you-type EL validation
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContextImpl.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContextImpl.java 2012-05-30
17:20:50 UTC (rev 41539)
+++
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContextImpl.java 2012-05-30
17:25:34 UTC (rev 41540)
@@ -124,7 +124,7 @@
Set<ELReference> references = new HashSet<ELReference>();
if(elReferenceSet != null) {
for (ELReference ref: elReferenceSet) {
- if(ref.getStartPosition()>=region.getOffset() && (ref.getStartPosition() +
ref.getLength()<=region.getOffset() + region.getLength())) {
+ if(region.getOffset() + region.getLength() >= ref.getStartPosition() &&
region.getOffset() <= ref.getStartPosition() + ref.getLength()) {
references.add(ref);
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.validation/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/plugin.xml 2012-05-30 17:20:50
UTC (rev 41539)
+++ trunk/common/plugins/org.jboss.tools.common.validation/plugin.xml 2012-05-30 17:25:34
UTC (rev 41540)
@@ -61,7 +61,7 @@
</validator>
</extension>
- <!-- extension point="org.eclipse.wst.sse.ui.sourcevalidation">
+ <extension point="org.eclipse.wst.sse.ui.sourcevalidation">
<validator
scope="partial"
class="org.jboss.tools.common.validation.AsYouTypeValidatorManager"
@@ -79,6 +79,12 @@
id="org.eclipse.wst.html.core.htmlsource">
<partitionType id="org.eclipse.wst.html.HTML_DEFAULT"/>
</contentTypeIdentifier>
+ <contentTypeIdentifier
id="org.eclipse.wst.xml.core.xmlsource">
+ <partitionType id="org.eclipse.wst.xml.XML_DEFAULT"/>
+ </contentTypeIdentifier>
+ <contentTypeIdentifier id="org.eclipse.core.runtime.xml">
+ <partitionType id="org.eclipse.wst.xml.XML_DEFAULT"/>
+ </contentTypeIdentifier>
<contentTypeIdentifier
id="org.jboss.tools.jst.jsp.jspincludesource">
</contentTypeIdentifier>
@@ -88,11 +94,11 @@
<contentTypeIdentifier
id="org.eclipse.jst.jsp.core.tagsource">
</contentTypeIdentifier>
- <contentTypeIdentifier
- id="org.eclipse.jdt.core.javaSource">
+ <contentTypeIdentifier id="org.eclipse.jdt.core.javaSource">
+ <partitionType id="__java_string"/>
</contentTypeIdentifier>
</validator>
- </extension -->
+ </extension>
<extension
id="JBTValidationProblem"