Author: akazakov
Date: 2008-10-27 15:21:12 -0400 (Mon, 27 Oct 2008)
New Revision: 11220
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2914 Fixed
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2008-10-27
17:31:28 UTC (rev 11219)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2008-10-27
19:21:12 UTC (rev 11220)
@@ -214,26 +214,26 @@
private void validateChildNodes(IFile file, Node parent) {
String preferenceValue = SeamPreferences.getProjectPreference(project,
SeamPreferences.CHECK_VARS);
- Var var = null;
- if (SeamPreferences.ENABLE.equals(preferenceValue)) {
- var = elVarSearcher.findVar(parent);
- }
- if(var!=null) {
- varListForCurentValidatedNode.add(var);
- }
NodeList children = parent.getChildNodes();
for(int i=0; i<children.getLength() && !reporter.isCancelled(); i++) {
Node curentValidatedNode = children.item(i);
+ Var var = null;
if(Node.ELEMENT_NODE == curentValidatedNode.getNodeType()) {
+ if (SeamPreferences.ENABLE.equals(preferenceValue)) {
+ var = elVarSearcher.findVar(curentValidatedNode);
+ }
+ if(var!=null) {
+ varListForCurentValidatedNode.add(var);
+ }
validateNodeContent(file,
((IDOMNode)curentValidatedNode).getFirstStructuredDocumentRegion(),
DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE);
} else if(Node.TEXT_NODE == curentValidatedNode.getNodeType()) {
validateNodeContent(file,
((IDOMNode)curentValidatedNode).getFirstStructuredDocumentRegion(),
DOMRegionContext.XML_CONTENT);
}
validateChildNodes(file, curentValidatedNode);
+ if(var!=null) {
+ varListForCurentValidatedNode.remove(var);
+ }
}
- if(var!=null) {
- varListForCurentValidatedNode.remove(var);
- }
}
private void validateNodeContent(IFile file, IStructuredDocumentRegion node, String
regionType) {