Author: vrubezhny
Date: 2009-06-18 18:08:18 -0400 (Thu, 18 Jun 2009)
New Revision: 16056
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.
Fixed KbQuery creation for Attribute Name/Value proposals
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-18
20:58:40 UTC (rev 16055)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java 2009-06-18
22:08:18 UTC (rev 16056)
@@ -440,7 +440,7 @@
*
* @return
*/
- protected String[] getParentTags() {
+ protected String[] getParentTags(boolean includeThisTag) {
List<String> parentTags = new ArrayList<String>();
IStructuredModel sModel = StructuredModelManager
@@ -468,7 +468,7 @@
} else {
n = n.getParentNode();
}
- } else {
+ } else if (!includeThisTag) {
n = n.getParentNode();
}
@@ -704,7 +704,7 @@
ELModel model = p.parse(text);
ELInstance is = ELUtil.findInstance(model, inValueOffset);// ELInstance
model.toString(); model.getSyntaxErrors();
- boolean isELClosed = (model != null &&
model.toString().endsWith("}"));
+ boolean isELClosed = (is == null) || (model != null &&
model.toString().endsWith("}"));
TextRegion tr = new TextRegion(startOffset, is == null ? inValueOffset :
is.getStartPosition(), is == null ? 0 : inValueOffset - is.getStartPosition(), is == null
? "" : is.getText(), isELClosed);
return tr;