/** * Find the workspace file identified by the absolute URI which is associated to the given project * * @param aFilePathURI * - URI in absolute format * @param aProject * - workspace project where is expected * @return - null if no file found */ public static IFile getWorkSpaceFile(URI aFilePathURI, IProject aProject) { IFile[] files = getWorkSpaceFiles(aFilePathURI); for (IFile iFile : files) { if (iFile.getProject().equals(aProject)) { // found return iFile; } } // not found return null; }