use of org.netbeans.api.project.SourceGroup in project enclojure by EricThorsen.
the class ClojureSourcesHelper method getClojureSources.
public static List<FileObject> getClojureSources(Project project) {
List<FileObject> result = new ArrayList<FileObject>();
Sources sources = ProjectUtils.getSources(project);
SourceGroup[] groups = sources.getSourceGroups(Sources.TYPE_GENERIC);
for (SourceGroup group : groups) {
FileObject root = group.getRootFolder();
Enumeration<? extends FileObject> files = root.getData(true);
while (files.hasMoreElements()) {
FileObject fobj = files.nextElement();
if (fobj.getExt().equals(CLOJURE_EXT)) {
result.add(fobj);
}
}
}
return result;
}
Aggregations