Author: scabanovich
Date: 2009-09-25 10:08:32 -0400 (Fri, 25 Sep 2009)
New Revision: 17744
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/XmlUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4913
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF 2009-09-25 14:07:44 UTC
(rev 17743)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF 2009-09-25 14:08:32 UTC
(rev 17744)
@@ -50,7 +50,7 @@
org.jboss.tools.vpe.xulrunner,
org.mozilla.xpcom,
org.eclipse.draw2d,
- org.jboss.tools.jst.web,
+ org.jboss.tools.jst.web;visibility:=reexport,
org.jboss.tools.vpe.resref,
org.jboss.tools.common.el.core,
org.jboss.tools.common.el.ui,
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/XmlUtil.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/XmlUtil.java 2009-09-25
14:07:44 UTC (rev 17743)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/XmlUtil.java 2009-09-25
14:08:32 UTC (rev 17744)
@@ -147,7 +147,28 @@
.getPrefix(), true);
}
return taglibData;
- }
+ }
+
+ //helper method
+ public static boolean hasTaglib(Node sourceNode,
+ VpePageContext pageContext, String sourcePrefix) {
+ List<TaglibData> taglibs = XmlUtil.getTaglibsForNode(sourceNode,
+ pageContext);
+ TaglibData sourceNodeTaglib = XmlUtil.getTaglibForPrefix(
+ sourcePrefix, taglibs);
+ return sourceNodeTaglib != null;
+ }
+
+ //helper method
+ public static String getTaglibUri(Node sourceNode,
+ VpePageContext pageContext, String sourcePrefix) {
+ List<TaglibData> taglibs = XmlUtil.getTaglibsForNode(sourceNode,
+ pageContext);
+ TaglibData sourceNodeTaglib = XmlUtil.getTaglibForPrefix(
+ sourcePrefix, taglibs);
+ return sourceNodeTaglib == null ? null : sourceNodeTaglib.getUri();
+ }
+
/**
* Processes taglib attribute
* @param taglibs