Author: scabanovich
Date: 2009-06-17 10:15:58 -0400 (Wed, 17 Jun 2009)
New Revision: 16013
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectTagLibs.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4493
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectTagLibs.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectTagLibs.java 2009-06-17
13:14:09 UTC (rev 16012)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectTagLibs.java 2009-06-17
14:15:58 UTC (rev 16013)
@@ -20,6 +20,8 @@
public class JSFProjectTagLibs extends JSFProjectResourceBundles {
private static final long serialVersionUID = 7805053632320764494L;
+ static String FILE_FACELET_TAGLIB = "FileFaceletTaglib";
+
protected Iterator<XModelObject> getRoots() {
List<XModelObject> list = new ArrayList<XModelObject>();
XModelObject r = getModel().getByPath("FileSystems/WEB-INF");
@@ -50,6 +52,9 @@
while(it.hasNext()) {
XModelObject o = it.next();
String uri = o.getAttributeValue("uri");
+ if(uri != null && uri.length() == 0 && isFaceletTaglibFile(o)) {
+ uri = o.getAttributeValue("library-class");
+ }
if(set.contains(uri)) {
it.remove();
} else {
@@ -81,6 +86,9 @@
static String TLD_ENTITIES =
".FileTLD_PRO.FileTLD_1_2.FileTLD_2_0.FileTLD_2_1.";
protected boolean acceptFile(XModelObject o) {
+ if("META-INF".equals(o.getParent().getAttributeValue("name"))) {
+ if(isFaceletTaglibFile(o)) return true;
+ }
return isTLDFile(o);
}
@@ -90,8 +98,8 @@
}
public static boolean isFaceletTaglibFile(XModelObject o) {
- String entity = "." + o.getModelEntity().getName();
- return entity.startsWith("FileFaceletTaglib");
+ String entity = o.getModelEntity().getName();
+ return entity.startsWith(FILE_FACELET_TAGLIB);
}
public Object getAdapter(Class adapter) {