Quote: |
IProject[] projects = ResourcesPlugin.getWorkspace().getRoot() .getProjects(); List<File> appBaseDirs = new ArrayList<File>(); for (IProject curProj : projects) { IPath folder = curProj.getLocation(); |
Quote: |
IPath otherCastedPath = ResourcesPlugin.getWorkspace().getRoot() .getFile(casted.getFullPath()).getLocation(); IPath thisFilePath = ResourcesPlugin.getWorkspace() .getRoot().getFile(thisFile.getFullPath()).getLocation(); |
Quote: |
IProject[] projects = ResourcesPlugin.getWorkspace().getRoot() .getProjects(); List<IPath> appBaseDirs = new ArrayList<IPath>(); for (IProject curProj : projects) { IPath folder = curProj.getFullPath(); if (!folder.toFile().exists()) { throw new RuntimeException(folder.toFile() + " found not existent"); } |
Quote: |
import org.eclipse.core.runtime.IPath; public class MyFile { public final IPath absolutePath; public final IPath relativePath; public MyFile(IPath absolute, IPath relative) { this.absolutePath = absolute; this.relativePath = relative; } public MyFile append(String subDirName) { return new MyFile(absolutePath.append(subDirName), relativePath.append(subDirName)); } } |
Quote: |
for (IProject curProj : projects) MyFile curDir = new MyFile(curProj.getLocation(), curProj.getFullPath()); ... |