Author: vrubezhny
Date: 2009-07-30 19:51:58 -0400 (Thu, 30 Jul 2009)
New Revision: 16919
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java
Log:
JBIDE-4687: Wrong CA when there is incomplete tag (a tag with no closing
'>'-char)
Issue is fixed
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-07-30
21:23:26 UTC (rev 16918)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java 2009-07-30
23:51:58 UTC (rev 16919)
@@ -724,12 +724,18 @@
if (xmlDocument == null)
return null;
- // Get Fixed Structured Document Region
- IStructuredDocumentRegion sdFixedRegion =
this.getStructuredDocumentRegion(getOffset());
- if (sdFixedRegion == null)
- return null;
+ Node n = null;
+ if (returnAttributeName) {
+ n = findNodeForOffset(xmlDocument, getOffset());
+ } else {
+ // Get Fixed Structured Document Region
+ IStructuredDocumentRegion sdFixedRegion =
this.getStructuredDocumentRegion(getOffset());
+ if (sdFixedRegion == null)
+ return null;
+
+ n = findNodeForOffset(xmlDocument, sdFixedRegion.getStartOffset());
+ }
- Node n = findNodeForOffset(xmlDocument, sdFixedRegion.getStartOffset());
if (n == null)
return null;
@@ -900,12 +906,7 @@
if (xmlDocument == null)
return null;
- // Get Fixed Structured Document Region
- IStructuredDocumentRegion sdFixedRegion =
this.getStructuredDocumentRegion(getOffset());
- if (sdFixedRegion == null)
- return null;
-
- Node n = findNodeForOffset(xmlDocument, sdFixedRegion.getStartOffset());
+ Node n = findNodeForOffset(xmlDocument, getOffset());
if (n == null)
return null;
Show replies by date