Author: scabanovich
Date: 2011-11-03 18:36:10 -0400 (Thu, 03 Nov 2011)
New Revision: 36164
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbResourceVisitor.java
Log:
JBIDE-10103
https://issues.jboss.org/browse/JBIDE-10103
Loaded composite components from Java source folders.
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbResourceVisitor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbResourceVisitor.java 2011-11-03
22:35:24 UTC (rev 36163)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbResourceVisitor.java 2011-11-03
22:36:10 UTC (rev 36164)
@@ -50,20 +50,27 @@
if(p.getProject() != null && p.getProject().isOpen()) {
getJavaSourceRoots(p.getProject());
+ List<IPath> jsf2rs = new ArrayList<IPath>();
XModel model = InnerModelHelper.createXModel(p.getProject());
if(model != null) {
webinfs = ProjectHome.getWebInfPaths(p.getProject());
IPath[] webContents = ProjectHome.getWebContentPaths(p.getProject());
- List<IPath> jsf2rs = new ArrayList<IPath>();
for (IPath webcontent: webContents) {
IPath jsf2r = webcontent.append("resources"); //$NON-NLS-1$
IResource rf = ResourcesPlugin.getWorkspace().getRoot().getFolder(jsf2r);
- if(rf.exists()) {
+ if(rf.exists() && !jsf2rs.contains(jsf2r)) {
jsf2rs.add(jsf2r);
}
}
- jsf2resources = jsf2rs.toArray(new IPath[0]);
}
+ for (IPath s: srcs) {
+ IPath jsf2r = s.append("META-INF/resources"); //$NON-NLS-1$
+ IResource rf = ResourcesPlugin.getWorkspace().getRoot().getFolder(jsf2r);
+ if(rf.exists() && !jsf2rs.contains(jsf2r)) {
+ jsf2rs.add(jsf2r);
+ }
+ }
+ jsf2resources = jsf2rs.toArray(new IPath[0]);
}
}
@@ -104,7 +111,7 @@
break;
}
}
- for (IPath jsf2resource: jsf2resources) {
+ for (IPath jsf2resource: jsf2resources) {int i = 0;
if(jsf2resource.isPrefixOf(f.getFullPath()) &&
jsf2scanner.isLikelyComponentSource(f)) {
processJSF2Resources(jsf2resource);
break;