@Override public boolean containsProject(Resource<?> bound, Resource<?> target, ProjectProvider buildSystem) { Assert.notNull(bound, "Boundary should not be null"); Assert.isTrue(bound.equals(target) || isParent(bound, target), "Target should be a child of bound"); boolean found = false; Resource<?> r = bound; while (r != null && !found) { found = buildSystem.containsProject(r); if (target.equals(r)) { break; } r = r.getParent(); } return found; }
@Override public boolean containsProject(Resource<?> target, ProjectProvider buildSystem) { Assert.notNull(target, "Target resource must not be null."); Assert.notNull(buildSystem, "Project build system must not be null."); boolean found = false; Resource<?> r = target; while (r != null && !found) { found = buildSystem.containsProject(r); r = r.getParent(); } return found; }
if (projectProvider.containsProject(target))