Author: vrubezhny
Date: 2009-06-23 11:25:03 -0400 (Tue, 23 Jun 2009)
New Revision: 16144
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java
Log:
JBIDE-2808: Improve/refactor org.jboss.tools.common.kb plugin.
The issue is fixed on EL prefix and positioning calculation
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java 2009-06-23
14:43:48 UTC (rev 16143)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java 2009-06-23
15:25:03 UTC (rev 16144)
@@ -697,11 +697,14 @@
ELParser p = ELParserUtil.getJbossFactory().createParser();
ELModel model = p.parse(text);
- ELInvocationExpression ie = ELUtil.findExpression(model, inValueOffset);// ELInstance
+ ELInstance is = ELUtil.findInstance(model, inValueOffset);// ELInstance
+ ELInvocationExpression ie = ELUtil.findExpression(model, inValueOffset);//
ELExpression
- boolean isELStarted = (model != null &&
(model.toString().startsWith("#{") ||
+ boolean isELStarted = (model != null && is != null &&
(model.toString().startsWith("#{") ||
model.toString().startsWith("${")));
- boolean isELClosed = (model != null &&
model.toString().endsWith("}"));
+ boolean isELClosed = (model != null && is != null &&
model.toString().endsWith("}"));
+
+// boolean insideEL = startOffset + model.toString().length()
TextRegion tr = new TextRegion(startOffset, ie == null ? inValueOffset :
ie.getStartPosition(), ie == null ? 0 : inValueOffset - ie.getStartPosition(), ie == null
? "" : ie.getText(), isELStarted, isELClosed);
return tr;
Show replies by date