Author: scabanovich
Date: 2010-03-12 10:18:25 -0500 (Fri, 12 Mar 2010)
New Revision: 20803
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSF2CCAttrsELCompletionEngine.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5941
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSF2CCAttrsELCompletionEngine.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSF2CCAttrsELCompletionEngine.java 2010-03-12
14:49:01 UTC (rev 20802)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSF2CCAttrsELCompletionEngine.java 2010-03-12
15:18:25 UTC (rev 20803)
@@ -265,6 +265,11 @@
public List<IVariable> resolveVariablesInternal(IFile file, ELInvocationExpression
expr, boolean isFinal, boolean onlyEqualNames) {
List<IVariable> result = new ArrayList<IVariable>();
+
+ XModelObject o = EclipseResourceUtil.createObjectForResource(file);
+ if(o == null) return result;
+ if(!"FileJSF2Component".equals(o.getModelEntity().getName())) return result;
+
String varName = expr.toString();
String[] vs = {"cc.attrs", "compositeComponent.attrs"};
for (int i = 0; i < vs.length; i++) {