public static List<IFolder> getDescriptorFolders(IProject proj) throws CoreException {
List<IFolder> result = new ArrayList<IFolder>();
if(!proj.isOpen()) {
return result;
}
IProjectNature javaNature = proj.getNature(JAVANATURE);
if (javaNature != null) {
IJavaProject javaProject = JavaCore.create(proj);
IPath readOutputLocation = javaProject.readOutputLocation();
IFolder folder = ResourcesPlugin.getWorkspace().getRoot().getFolder(readOutputLocation);
result.add(folder);
}
IProjectNature pearNature = proj.getNature("org.apache.uima.pear.UimaNature");
if (pearNature != null) {
IFolder findElement = proj.getFolder("desc");
if (findElement != null) {
result.add((IFolder) findElement);
}
}
IProjectNature rutaNature = proj.getNature(RutaNature.NATURE_ID);
if (rutaNature != null) {
IFolder findElement = proj.getFolder(getDefaultDescriptorLocation());
if (findElement != null) {
result.add((IFolder) findElement);
}