Author: scabanovich
Date: 2007-11-06 08:49:12 -0500 (Tue, 06 Nov 2007)
New Revision: 4736
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/trees/FileSystemResourceBundleTree.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/trees/FileSystemResourceTree.java
Log:
JBIDE-1259
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/trees/FileSystemResourceBundleTree.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/trees/FileSystemResourceBundleTree.java 2007-11-06
13:30:27 UTC (rev 4735)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/trees/FileSystemResourceBundleTree.java 2007-11-06
13:49:12 UTC (rev 4736)
@@ -18,6 +18,7 @@
public void setConstraint(Object object) {
extensions = new HashSet<String>();
extensions.add("properties");
+ javaRootsOnly = true;
}
public String getValue(XModelObject object) {
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/trees/FileSystemResourceTree.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/trees/FileSystemResourceTree.java 2007-11-06
13:30:27 UTC (rev 4735)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/trees/FileSystemResourceTree.java 2007-11-06
13:49:12 UTC (rev 4736)
@@ -22,6 +22,7 @@
protected XModel model = null;
protected Set<String> extensions = null;
protected Set<String> entities = null;
+ protected boolean javaRootsOnly = false;
public FileSystemResourceTree() {}
@@ -59,6 +60,10 @@
StringTokenizer st = new StringTokenizer(ent, ",");
while(st.hasMoreTokens()) entities.add(st.nextToken());
}
+ String jro = tc.getProperties().getProperty("java_roots_only");
+ if("true".equals(jro)) {
+ javaRootsOnly = true;
+ }
}
public XModelObject getRoot() {
@@ -122,6 +127,12 @@
XModelObject[] fs = getRoot().getChildren();
SortedMap<String,XModelObject> t = new
TreeMap<String,XModelObject>();
for (int i = 0; i < fs.length; i++) {
+ if(javaRootsOnly) {
+ if("FileSystemFolder".equals(fs[i].getModelEntity().getName())
+ &&
!fs[i].getAttributeValue("name").startsWith("src")) {
+ continue;
+ }
+ }
XModelObject[] cs = fs[i].getChildren();
for (int j = 0; j < cs.length; j++) {
String p = cs[j].getPathPart();
Show replies by date