Skip to content

Commit

Permalink
Added check for nested projects.
Browse files Browse the repository at this point in the history
Projects, like the one imported from multi-modules maven project
can be nested. It this case a file can be represented by multiple
resources. Select only the one for the current project.
  • Loading branch information
Luc Bourlier committed Dec 5, 2011
1 parent 9dcc742 commit ee80588
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -36,7 +36,10 @@ public IResourceDelta appendJavaSourceFilesToCompile(IResourceDelta delta, IProj
IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
for (File file: files) {
for (IFile resource: workspaceRoot.findFilesForLocationURI(file.toURI())) {
newDelta.addChangedResource(resource);
// filter only the resources on the right project, to support nested projects
if (resource.getProject() == project) {
newDelta.addChangedResource(resource);
}
}
}

Expand Down

0 comments on commit ee80588

Please sign in to comment.