Author: vrubezhny
Date: 2007-10-10 13:52:36 -0400 (Wed, 10 Oct 2007)
New Revision: 4100
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/plugin.xml
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/jsp/JSPXmlNsHyperlink.java
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/jsp/JSPXmlNsHyperlinkPartitioner.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1052 Open On doesn't work on taglib
declaration on jsp page.
Issue is fixed
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/plugin.xml 2007-10-10 16:41:37
UTC (rev 4099)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/plugin.xml 2007-10-10 17:52:36
UTC (rev 4100)
@@ -201,6 +201,10 @@
id="org.jboss.tools.common.text.ext.hyperlink.jsp.JSPTaglibHyperlinkPartitioner">
<contentType id="org.eclipse.jst.jsp.core.jspsource">
<partitionType
id="org.jboss.tools.common.text.ext.jsp.JSP_ROOT"/>
+ <partitionType
id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
+ <axis path="*/jsp:directive.taglib/uri" />
+ <axis path="*/jsp:directive.taglib/prefix" />
+ </partitionType>
</contentType>
</hyperlinkPartitioner>
@@ -633,6 +637,9 @@
<contenttypeidentifier id="org.eclipse.jst.jsp.core.jspsource">
<partitiontype id="org.jboss.tools.common.text.ext.jsp.JSP_XMLNS" />
</contenttypeidentifier>
+ <contenttypeidentifier id="org.eclipse.wst.html.core.htmlsource">
+ <partitiontype id="org.jboss.tools.common.text.ext.jsp.JSP_XMLNS" />
+ </contenttypeidentifier>
</hyperlink>
<hyperlink
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/jsp/JSPXmlNsHyperlink.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/jsp/JSPXmlNsHyperlink.java 2007-10-10
16:41:37 UTC (rev 4099)
+++
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/jsp/JSPXmlNsHyperlink.java 2007-10-10
17:52:36 UTC (rev 4100)
@@ -86,7 +86,7 @@
Attr xmlnsAttr = (Attr)n;
if (xmlnsAttr.getName() == null ||
!xmlnsAttr.getName().startsWith("xmlns:")) return null;
Element rootElem = (Element)xmlnsAttr.getOwnerElement();
- if (!rootElem.getNodeName().equals("jsp:root")) return null;
+ if (!(rootElem.getNodeName().equals("jsp:root") ||
rootElem.getNodeName().equalsIgnoreCase("html"))) return null;
String uri = xmlnsAttr.getValue();
if (uri == null || uri.trim().length() == 0) return null;
@@ -127,7 +127,7 @@
IDOMAttr xmlnsAttr = (IDOMAttr)n;
if (xmlnsAttr.getName() == null ||
!xmlnsAttr.getName().startsWith("xmlns:")) return null;
Element rootElem = xmlnsAttr.getOwnerElement();
- if (!rootElem.getNodeName().equals("jsp:root")) return null;
+ if (!(rootElem.getNodeName().equals("jsp:root") ||
rootElem.getNodeName().equalsIgnoreCase("html"))) return null;
final int taglibLength = xmlnsAttr.getValueRegionText().length();
final int taglibOffset = xmlnsAttr.getValueRegionStartOffset();
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/jsp/JSPXmlNsHyperlinkPartitioner.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/jsp/JSPXmlNsHyperlinkPartitioner.java 2007-10-10
16:41:37 UTC (rev 4099)
+++
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/jsp/JSPXmlNsHyperlinkPartitioner.java 2007-10-10
17:52:36 UTC (rev 4100)
@@ -46,7 +46,7 @@
IDOMAttr xmlnsAttr = (IDOMAttr)n;
if (xmlnsAttr.getName() == null ||
!xmlnsAttr.getName().startsWith("xmlns:")) return null;
Element rootElem = xmlnsAttr.getOwnerElement();
- if (!rootElem.getNodeName().equals("jsp:root")) return null;
+ if (!(rootElem.getNodeName().equals("jsp:root") ||
rootElem.getNodeName().equalsIgnoreCase("html"))) return null;
String xmlns = xmlnsAttr.getValueRegionText();
String axis = getAxis(document, superRegion);
String contentType = superRegion.getContentType();
@@ -80,7 +80,7 @@
Attr xmlnsAttr = (Attr)n;
if (xmlnsAttr.getName() == null ||
!xmlnsAttr.getName().startsWith("xmlns:")) return false;
Element rootElem = xmlnsAttr.getOwnerElement();
- if (!rootElem.getNodeName().equals("jsp:root")) return false;
+ if (!(rootElem.getNodeName().equals("jsp:root") ||
rootElem.getNodeName().equalsIgnoreCase("html"))) return false;
return true;
} catch (Exception x) {
//ignore