/** * Auto-detects the default javadoc location */ private void detectJavadocLocation() { if (fAutoDetectJavadocLocation) { if (fSelectedVMType instanceof AbstractVMInstallType) { AbstractVMInstallType type = (AbstractVMInstallType)fSelectedVMType; fJavadocLocation = type.getDefaultJavadocLocation(getInstallLocation()); } } else { fJavadocLocation = fEditedVM.getJavadocLocation(); } }
URL url = vm.getJavadocLocation(); if (url != null) { element.setAttribute("javadocURL", url.toExternalForm()); //$NON-NLS-1$
URL url = vm.getJavadocLocation(); if (url != null) { element.setAttribute("javadocURL", url.toExternalForm()); //$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()]); }
/** * Initializes the settings of this stand-in based on the settings in the given * VM install. * * @param realVM VM to copy settings from */ private void init(IVMInstall realVM) { setName(realVM.getName()); setInstallLocation(realVM.getInstallLocation()); setLibraryLocations(realVM.getLibraryLocations()); setJavadocLocation(realVM.getJavadocLocation()); if (realVM instanceof IVMInstall2) { IVMInstall2 vm2 = (IVMInstall2) realVM; setVMArgs(vm2.getVMArgs()); fJavaVersion = vm2.getJavaVersion(); } else { setVMArguments(realVM.getVMArguments()); fJavaVersion = null; } if (realVM instanceof AbstractVMInstall) { AbstractVMInstall vm2 = (AbstractVMInstall) realVM; Map<String, String> attributes = vm2.getAttributes(); Iterator<Entry<String, String>> iterator = attributes.entrySet().iterator(); while (iterator.hasNext()) { Entry<String, String> entry = iterator.next(); setAttribute(entry.getKey(), entry.getValue()); } } }
/** * Initializes the settings of this stand-in based on the settings in the given * VM install. * * @param realVM VM to copy settings from */ private void init(IVMInstall realVM) { setName(realVM.getName()); setInstallLocation(realVM.getInstallLocation()); setLibraryLocations(realVM.getLibraryLocations()); setJavadocLocation(realVM.getJavadocLocation()); if (realVM instanceof IVMInstall2) { IVMInstall2 vm2 = (IVMInstall2) realVM; setVMArgs(vm2.getVMArgs()); fJavaVersion = vm2.getJavaVersion(); } else { setVMArguments(realVM.getVMArguments()); fJavaVersion = null; } if (realVM instanceof AbstractVMInstall) { AbstractVMInstall vm2 = (AbstractVMInstall) realVM; Map<String, String> attributes = vm2.getAttributes(); Iterator<Entry<String, String>> iterator = attributes.entrySet().iterator(); while (iterator.hasNext()) { Entry<String, String> entry = iterator.next(); setAttribute(entry.getKey(), entry.getValue()); } } }
/** * Constructor * @param requestor dialog validation requester * @param shell the parent shell * @param vmInstallTypes the types of VM installs * @param editedVM the editedVM */ public AddVMDialog(IAddVMDialogRequestor requestor, Shell shell, IVMInstallType[] vmInstallTypes, IVMInstall editedVM) { super(shell); setShellStyle(getShellStyle() | SWT.RESIZE); fRequestor = requestor; fStatus = new IStatus[5]; for (int i= 0; i < fStatus.length; i++) { fStatus[i] = new StatusInfo(); } fVMTypes = vmInstallTypes; sortVMTypes(); fSelectedVMType = editedVM != null ? editedVM.getVMInstallType() : vmInstallTypes[0]; fEditedVM = editedVM; //only detect the javadoc location if not already set fAutoDetectJavadocLocation = fEditedVM == null || fEditedVM.getJavadocLocation() == null; }
LibraryLocation[] locations= vm.getLibraryLocations(); if (locations == null) { URL defJavaDocLocation = vm.getJavadocLocation(); File installLocation = vm.getInstallLocation(); if (installLocation == null) {
LibraryLocation[] locations= vm.getLibraryLocations(); if (locations == null) { URL defJavaDocLocation = vm.getJavadocLocation(); File installLocation = vm.getInstallLocation(); if (installLocation == null) {
URL javadocLocation = location.getJavadocLocation(); if (overrideJavaDoc && javadocLocation == null) { javadocLocation = vm.getJavadocLocation();
URL javadocLocation = location.getJavadocLocation(); if (overrideJavaDoc && javadocLocation == null) { javadocLocation = vm.getJavadocLocation();