StringTokenizer t = new StringTokenizer(extensionList, ",");
while (t.hasMoreTokens()) {
String ext = t.nextToken();
if (ext.equalsIgnoreCase("all")) {
File f = new File(SystemProperties.get("user.dir")).getParentFile();
File[] dirs = f.listFiles(new FileFilter() {
public boolean accept(File pathname) {
File f = new File(pathname, "extensions");
return f.exists() && f.isDirectory();
}
});
for (int i = 0; dirs != null && i < dirs.length; i++) {
devExtensions.add(dirs[i].getName());
}
} else if (ext.equalsIgnoreCase("enterprise")) {
File f = new File(SystemProperties.get("user.dir")).getParentFile();
File[] dirs = f.listFiles(new FileFilter() {
public boolean accept(File pathname) {
File f = new File(pathname, "extensions");
return f.exists() && f.isDirectory() && pathname.getName().indexOf("adito-enterprise-") != -1;
}
});
for (int i = 0; dirs != null && i < dirs.length; i++) {
devExtensions.add(dirs[i].getName());
}
} else if (ext.equalsIgnoreCase("community")) {
File f = new File(SystemProperties.get("user.dir")).getParentFile();
File[] dirs = f.listFiles(new FileFilter() {
public boolean accept(File pathname) {
File f = new File(pathname, "extensions");
return f.exists() && f.isDirectory() && pathname.getName().indexOf("adito-community-") != -1;
}
});