Author: scabanovich
Date: 2008-09-26 09:21:23 -0400 (Fri, 26 Sep 2008)
New Revision: 10508
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELInvocationExpression.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELArgumentExpressionImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELPropertyInvocationImpl.java
Log:
JBIDE-1497.
Minor improvements
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELInvocationExpression.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELInvocationExpression.java 2008-09-26
13:19:13 UTC (rev 10507)
+++
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELInvocationExpression.java 2008-09-26
13:21:23 UTC (rev 10508)
@@ -34,4 +34,8 @@
*/
public ELInvocationExpression getLeft();
+ public int getInvocationStartPosition();
+
+ public String getMemberName();
+
}
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELArgumentExpressionImpl.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELArgumentExpressionImpl.java 2008-09-26
13:19:13 UTC (rev 10507)
+++
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELArgumentExpressionImpl.java 2008-09-26
13:21:23 UTC (rev 10508)
@@ -45,4 +45,13 @@
return ELObjectType.EL_ARGUMENT_INVOCATION;
}
+ public int getInvocationStartPosition() {
+ return argument == null ? -1 : argument.getStartPosition();
+ }
+
+ public String getMemberName() {
+ if(argument == null) return null;
+ return argument.getArgument().getText();
+ }
+
}
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELPropertyInvocationImpl.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELPropertyInvocationImpl.java 2008-09-26
13:19:13 UTC (rev 10507)
+++
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELPropertyInvocationImpl.java 2008-09-26
13:21:23 UTC (rev 10508)
@@ -68,4 +68,18 @@
return ELObjectType.EL_PROPERTY_INVOCATION;
}
+ public int getInvocationStartPosition() {
+ if(name != null) {
+ return name.getStart();
+ }
+ if(dot != null) {
+ return dot.getStart(); // ?
+ }
+ return -1;
+ }
+
+ public String getMemberName() {
+ return name == null ? null : name.getText();
+ }
+
}
Show replies by date