Author: scabanovich
Date: 2011-04-15 16:36:15 -0400 (Fri, 15 Apr 2011)
New Revision: 30606
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java
Log:
JBIDE-8728
https://issues.jboss.org/browse/JBIDE-8728
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java 2011-04-15
20:28:12 UTC (rev 30605)
+++
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java 2011-04-15
20:36:15 UTC (rev 30606)
@@ -183,7 +183,9 @@
LexicalToken t = lookUpNextToken(current);
if(t != null && t.getType() == OperationTokenDescription.OPERATION &&
t.getText().equals(":")) { //$NON-NLS-1$
LexicalToken t1 = lookUpNextToken(t);
- if(t1 != null && t1.getType() == JavaNameTokenDescription.JAVA_NAME) {
+ if(t1 == null || t1.getType() == EndELTokenDescription.END_EL || t1.getType() ==
ParamEndTokenDescription.PARAM_END || t1.getType() == ArgEndTokenDescription.ARG_END ||
t1.getType() == ExprEndTokenDescription.EXPR_END) {
+ t.setType(DotTokenDescription.DOT); //in incomplete expressions prefer function
call to operation sign
+ } else if(t1 != null && t1.getType() == JavaNameTokenDescription.JAVA_NAME)
{
LexicalToken t2 = lookUpNextToken(t1);
if(t2 != null && t2.getType() == ParamStartTokenDescription.PARAM_START) {
t.setType(DotTokenDescription.DOT);