/** * Sets the Java project in which source elements will * be searched for. * * @param project Java project */ private void setJavaProject(IJavaProject project) { fProject = project; fRootLocations = null; if (fProject != null) { try { IPackageFragmentRoot[] roots = project.getPackageFragmentRoots(); ArrayList<PackageFragmentRootSourceLocation> list = new ArrayList<>(roots.length); for (int i = 0; i < roots.length; i++) { if (roots[i].getKind() == IPackageFragmentRoot.K_SOURCE) { list.add(new PackageFragmentRootSourceLocation(roots[i])); } } fRootLocations = list.toArray(new IJavaSourceLocation[list.size()]); } catch (JavaModelException e) { LaunchingPlugin.log(e); } } }
if (external.get(location) == null) { external.put(location, location); list.add(new PackageFragmentRootSourceLocation(roots[i])); list.add(new PackageFragmentRootSourceLocation(roots[i]));
/** * Sets the Java project in which source elements will * be searched for. * * @param project Java project */ private void setJavaProject(IJavaProject project) { fProject = project; fRootLocations = null; if (fProject != null) { try { IPackageFragmentRoot[] roots = project.getPackageFragmentRoots(); ArrayList<PackageFragmentRootSourceLocation> list = new ArrayList<PackageFragmentRootSourceLocation>(roots.length); for (int i = 0; i < roots.length; i++) { if (roots[i].getKind() == IPackageFragmentRoot.K_SOURCE) { list.add(new PackageFragmentRootSourceLocation(roots[i])); } } fRootLocations = list.toArray(new IJavaSourceLocation[list.size()]); } catch (JavaModelException e) { LaunchingPlugin.log(e); } } }
if (external.get(location) == null) { external.put(location, location); list.add(new PackageFragmentRootSourceLocation(roots[i])); list.add(new PackageFragmentRootSourceLocation(roots[i]));
if (isSourceAttachmentEqual(root, entry)) { return new PackageFragmentRootSourceLocation(root); return new PackageFragmentRootSourceLocation(root); if (isSourceAttachmentEqual(root, entry)) { return new PackageFragmentRootSourceLocation(root);
if (isSourceAttachmentEqual(root, entry)) { return new PackageFragmentRootSourceLocation(root); return new PackageFragmentRootSourceLocation(root); if (isSourceAttachmentEqual(root, entry)) { return new PackageFragmentRootSourceLocation(root);