element.setAttribute("jreJar", locations[i].getSystemLibraryPath().toString()); //$NON-NLS-1$ element.setAttribute("jreSrc", locations[i].getSystemLibrarySourcePath().toString()); //$NON-NLS-1$ IPath annotationsPath = locations[i].getExternalAnnotationsPath(); if (null != annotationsPath && !annotationsPath.isEmpty()) { element.setAttribute("jreExternalAnns", annotationsPath.toString()); //$NON-NLS-1$
element.setAttribute("jreJar", locations[i].getSystemLibraryPath().toString()); //$NON-NLS-1$ element.setAttribute("jreSrc", locations[i].getSystemLibrarySourcePath().toString()); //$NON-NLS-1$ IPath annotationsPath = locations[i].getExternalAnnotationsPath(); if (null != annotationsPath && !annotationsPath.isEmpty()) { element.setAttribute("jreExternalAnns", annotationsPath.toString()); //$NON-NLS-1$
private static IClasspathAttribute[] buildClasspathAttributes(final IVMInstall vm, final LibraryLocation lib, final boolean overrideJavaDoc) { List<IClasspathAttribute> classpathAttributes = new LinkedList<IClasspathAttribute>(); // process the javadoc location URL javadocLocation = lib.getJavadocLocation(); if (overrideJavaDoc && javadocLocation == null) { javadocLocation = vm.getJavadocLocation(); } if(javadocLocation != null) { IClasspathAttribute javadocCPAttribute = JavaCore.newClasspathAttribute(IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME, javadocLocation.toExternalForm()); classpathAttributes.add(javadocCPAttribute); } // process the index location URL indexLocation = lib.getIndexLocation(); if(indexLocation != null) { IClasspathAttribute indexCPLocation = JavaCore.newClasspathAttribute(IClasspathAttribute.INDEX_LOCATION_ATTRIBUTE_NAME, indexLocation.toExternalForm()); classpathAttributes.add(indexCPLocation); } IPath annotationsPath = lib.getExternalAnnotationsPath(); if (null != annotationsPath && !annotationsPath.isEmpty()) { IClasspathAttribute xAnnLocation = JavaCore.newClasspathAttribute(IClasspathAttribute.EXTERNAL_ANNOTATION_PATH, annotationsPath.toPortableString()); classpathAttributes.add(xAnnLocation); } return classpathAttributes.toArray(new IClasspathAttribute[classpathAttributes.size()]); }
private static IClasspathAttribute[] buildClasspathAttributes(final IVMInstall vm, final LibraryLocation lib, final boolean overrideJavaDoc) { List<IClasspathAttribute> classpathAttributes = new LinkedList<>(); // process the javadoc location URL javadocLocation = lib.getJavadocLocation(); if (overrideJavaDoc && javadocLocation == null) { javadocLocation = vm.getJavadocLocation(); } if(javadocLocation != null) { IClasspathAttribute javadocCPAttribute = JavaCore.newClasspathAttribute(IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME, javadocLocation.toExternalForm()); classpathAttributes.add(javadocCPAttribute); } // process the index location URL indexLocation = lib.getIndexLocation(); if(indexLocation != null) { IClasspathAttribute indexCPLocation = JavaCore.newClasspathAttribute(IClasspathAttribute.INDEX_LOCATION_ATTRIBUTE_NAME, indexLocation.toExternalForm()); classpathAttributes.add(indexCPLocation); } IPath annotationsPath = lib.getExternalAnnotationsPath(); if (null != annotationsPath && !annotationsPath.isEmpty()) { IClasspathAttribute xAnnLocation = JavaCore.newClasspathAttribute(IClasspathAttribute.EXTERNAL_ANNOTATION_PATH, annotationsPath.toPortableString()); classpathAttributes.add(xAnnLocation); } return classpathAttributes.toArray(new IClasspathAttribute[classpathAttributes.size()]); }
@Override public boolean equals(Object obj) { if (obj instanceof LibraryLocation) { LibraryLocation lib = (LibraryLocation)obj; return getSystemLibraryPath().equals(lib.getSystemLibraryPath()) && equals(getSystemLibrarySourcePath(), lib.getSystemLibrarySourcePath()) && equals(getExternalAnnotationsPath(), lib.getExternalAnnotationsPath()) && equals(getPackageRootPath(), lib.getPackageRootPath()) && LaunchingPlugin.sameURL(getJavadocLocation(), lib.getJavadocLocation()); } return false; }
@Override public boolean equals(Object obj) { if (obj instanceof LibraryLocation) { LibraryLocation lib = (LibraryLocation)obj; return getSystemLibraryPath().equals(lib.getSystemLibraryPath()) && equals(getSystemLibrarySourcePath(), lib.getSystemLibrarySourcePath()) && equals(getExternalAnnotationsPath(), lib.getExternalAnnotationsPath()) && equals(getPackageRootPath(), lib.getPackageRootPath()) && LaunchingPlugin.sameURL(getJavadocLocation(), lib.getJavadocLocation()); } return false; }
sourceRootPaths[i]= locations[i].getPackageRootPath(); javadocLocations[i]= locations[i].getJavadocLocation(); annotationPaths[i] = locations[i].getExternalAnnotationsPath(); indexes[i] = locations[i].getIndexLocation();
sourceRootPaths[i]= locations[i].getPackageRootPath(); javadocLocations[i]= locations[i].getJavadocLocation(); annotationPaths[i] = locations[i].getExternalAnnotationsPath(); indexes[i] = locations[i].getIndexLocation();