/** * Saves settings in the given working copy */ public void performApply(IVMInstall vm) { if (isDefaultLocations()) { vm.setLibraryLocations(null); } else { LibraryLocation[] libs = fLibraryContentProvider.getLibraries(); vm.setLibraryLocations(libs); } }
/** * Set the LibraryLocations on the specified VM, by extracting the subordinate * nodes from the specified 'lirbaryLocations' node. * * @param vm the {@link IVMInstall} to populate from the given {@link Element} * @param libLocationsElement the {@link Element} to populate the {@link IVMInstall} with */ private static void setLibraryLocations(IVMInstall vm, Element libLocationsElement) { NodeList list = libLocationsElement.getChildNodes(); int length = list.getLength(); List<LibraryLocation> locations = new ArrayList<LibraryLocation>(length); for (int i = 0; i < length; ++i) { Node node = list.item(i); short type = node.getNodeType(); if (type == Node.ELEMENT_NODE) { Element libraryLocationElement= (Element)node; if (libraryLocationElement.getNodeName().equals("libraryLocation")) { //$NON-NLS-1$ locations.add(getLibraryLocation(libraryLocationElement)); } } } vm.setLibraryLocations(locations.toArray(new LibraryLocation[locations.size()])); }
/** * Set the LibraryLocations on the specified VM, by extracting the subordinate * nodes from the specified 'lirbaryLocations' node. * * @param vm the {@link IVMInstall} to populate from the given {@link Element} * @param libLocationsElement the {@link Element} to populate the {@link IVMInstall} with */ private static void setLibraryLocations(IVMInstall vm, Element libLocationsElement) { NodeList list = libLocationsElement.getChildNodes(); int length = list.getLength(); List<LibraryLocation> locations = new ArrayList<>(length); for (int i = 0; i < length; ++i) { Node node = list.item(i); short type = node.getNodeType(); if (type == Node.ELEMENT_NODE) { Element libraryLocationElement= (Element)node; if (libraryLocationElement.getNodeName().equals("libraryLocation")) { //$NON-NLS-1$ locations.add(getLibraryLocation(libraryLocationElement)); } } } vm.setLibraryLocations(locations.toArray(new LibraryLocation[locations.size()])); }
realVM.setLibraryLocations(getLibraryLocations()); realVM.setJavadocLocation(getJavadocLocation()); if (realVM instanceof IVMInstall2) {
realVM.setLibraryLocations(getLibraryLocations()); realVM.setJavadocLocation(getJavadocLocation()); if (realVM instanceof IVMInstall2) {