Author: vrubezhny
Date: 2007-10-23 14:40:58 -0400 (Tue, 23 Oct 2007)
New Revision: 4450
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1153 Wrong prompting is shown
Issue is fixed
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2007-10-23
12:09:41 UTC (rev 4449)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2007-10-23
18:40:58 UTC (rev 4450)
@@ -120,6 +120,24 @@
if(resolvedVariables!=null && resolvedVariables.size()>0 &&
usedVariables!=null) {
usedVariables.addAll(resolvedVariables);
}
+
+ if ((resolvedExpressionPart == null || resolvedExpressionPart.isEmpty()) &&
+ !returnEqualedVariablesOnly &&
+ tokens != null && tokens.size() > 0 &&
+ tokens.get(tokens.size() - 1).getType() == ELOperandToken.EL_SEPARATOR_TOKEN) {
+ // no vars are resolved
+ // the tokens are the part of var name ended with a separator (.)
+ resolvedVariables = resolveVariables(project, scope, tokens, tokens,
returnEqualedVariablesOnly);
+ String prefixString = prefix.toString();
+ for (ISeamContextVariable var : resolvedVariables) {
+ String varName = var.getName();
+ if(varName.startsWith(prefixString)) {
+ res.add(varName.substring(prefixString.length()));
+ }
+ }
+ return res;
+ }
+
// Here we have a list of vars for some part of expression
// OK. we'll proceed with members of these vars