Author: akazakov
Date: 2012-01-23 20:17:25 -0500 (Mon, 23 Jan 2012)
New Revision: 38055
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java
Log:
https://issues.jboss.org/browse/JBIDE-10699 EL is not validated if "var"
attribute is used
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java 2012-01-24
00:57:53 UTC (rev 38054)
+++
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java 2012-01-24
01:17:25 UTC (rev 38055)
@@ -56,7 +56,6 @@
import org.jboss.tools.common.el.core.resolver.TypeInfoCollector.MemberInfo;
import org.jboss.tools.common.el.core.resolver.TypeInfoCollector.MemberPresentation;
import org.jboss.tools.common.el.core.resolver.Var;
-import org.jboss.tools.common.el.internal.core.model.ELPropertyInvocationImpl;
import org.jboss.tools.common.el.internal.core.parser.token.JavaNameTokenDescription;
import org.jboss.tools.common.el.internal.core.parser.token.WhiteSpaceTokenDescription;
import org.jboss.tools.common.text.TextProposal;
@@ -334,6 +333,11 @@
resolution.setSegments(resultSegments);
var.resolveValue("#{" + var.getElToken().getText() + suffix +
"}"); //$NON-NLS-1$ //$NON-NLS-2$
+ // Save all used variables from "value" EL to the list of used variables
for EL which uses this "var" attribute.
+ for (ELSegment segment : varELResolution.getSegments()) {
+ firstSegment.getVariables().addAll(segment.getVariables());
+ }
+
ELResolutionImpl oldElResolution = resolveELOperand(file, operand,
returnEqualedVariablesOnly, false, offset);
if(oldElResolution!=null) {
resolution.getProposals().addAll(oldElResolution.getProposals());