container.setDefaultVMInstallCompositeID(config.getAttribute("defaultVM")); //$NON-NLS-1$ container.setDefaultVMInstallConnectorTypeID(config.getAttribute("defaultVMConnector")); //$NON-NLS-1$
container.setDefaultVMInstallCompositeID(config.getAttribute("defaultVM")); //$NON-NLS-1$ container.setDefaultVMInstallConnectorTypeID(config.getAttribute("defaultVMConnector")); //$NON-NLS-1$
/** * Updates VM settings and returns whether the update was successful. * * @param jres new installed JREs * @param defaultJRE new default VM * @return whether the update was successful */ public boolean updateJRESettings(IVMInstall[] jres, IVMInstall defaultJRE) { // Create a VM definition container VMDefinitionsContainer vmContainer = new VMDefinitionsContainer(); // Set the default VM Id on the container String defaultVMId = JavaRuntime.getCompositeIdFromVM(defaultJRE); vmContainer.setDefaultVMInstallCompositeID(defaultVMId); // Set the VMs on the container for (int i = 0; i < jres.length; i++) { vmContainer.addVM(jres[i]); } // Generate XML for the VM defs and save it as the new value of the VM preference saveVMDefinitions(vmContainer); return true; }
vms.addVM(vm); vms.setDefaultVMInstallCompositeID(container.getDefaultVMInstallCompositeID()); vms.setDefaultVMInstallConnectorTypeID(container.getDefaultVMInstallConnectorTypeID()); } catch (IOException e) { IVMInstall vm = iterator.next(); if (JavaRuntime.getCompositeIdFromVM(vm).equals(defaultVMInstallCompositeID)) { vms.setDefaultVMInstallCompositeID(defaultVMInstallCompositeID); break;
vms.addVM(vm); vms.setDefaultVMInstallCompositeID(container.getDefaultVMInstallCompositeID()); vms.setDefaultVMInstallConnectorTypeID(container.getDefaultVMInstallConnectorTypeID()); } catch (IOException e) { IVMInstall vm = iterator.next(); if (JavaRuntime.getCompositeIdFromVM(vm).equals(defaultVMInstallCompositeID)) { vms.setDefaultVMInstallCompositeID(defaultVMInstallCompositeID); break;
/** * Contstructs a new VM updater to update VM install settings. */ public JREsUpdater() { fOriginalVMs = new VMDefinitionsContainer(); IVMInstall def = JavaRuntime.getDefaultVMInstall(); if (def != null) { fOriginalVMs.setDefaultVMInstallCompositeID(JavaRuntime.getCompositeIdFromVM(def)); } IVMInstallType[] types = JavaRuntime.getVMInstallTypes(); for (int i = 0; i < types.length; i++) { IVMInstall[] vms = types[i].getVMInstalls(); for (int j = 0; j < vms.length; j++) { fOriginalVMs.addVM(vms[j]); } } }
/** * Returns the listing of currently installed VMs as a single XML file * @return an XML representation of all of the currently installed VMs * @throws CoreException if trying to compute the XML for the VM state encounters a problem */ private static String getVMsAsXML() throws CoreException { VMDefinitionsContainer container = new VMDefinitionsContainer(); container.setDefaultVMInstallCompositeID(getDefaultVMId()); container.setDefaultVMInstallConnectorTypeID(getDefaultVMConnectorId()); IVMInstallType[] vmTypes = getVMInstallTypes(); IVMInstall[] vms = null; for (int i = 0; i < vmTypes.length; ++i) { vms = vmTypes[i].getVMInstalls(); for (int j = 0; j < vms.length; j++) { container.addVM(vms[j]); } } return container.getAsXML(); }
/** * Returns the listing of currently installed VMs as a single XML file * @return an XML representation of all of the currently installed VMs * @throws CoreException if trying to compute the XML for the VM state encounters a problem */ private static String getVMsAsXML() throws CoreException { VMDefinitionsContainer container = new VMDefinitionsContainer(); container.setDefaultVMInstallCompositeID(getDefaultVMId()); container.setDefaultVMInstallConnectorTypeID(getDefaultVMConnectorId()); IVMInstallType[] vmTypes = getVMInstallTypes(); IVMInstall[] vms = null; for (int i = 0; i < vmTypes.length; ++i) { vms = vmTypes[i].getVMInstalls(); for (int j = 0; j < vms.length; j++) { container.addVM(vms[j]); } } return container.getAsXML(); }
updateCompliance = true; vmDefs.addVM(runtime); vmDefs.setDefaultVMInstallCompositeID(getCompositeIdFromVM(runtime)); vmDefs.setDefaultVMInstallCompositeID(fgDefaultVMId); updateCompliance = fgDefaultVMId != null; if (!list.isEmpty()) { IVMInstall vm = list.get(0); vmDefs.setDefaultVMInstallCompositeID(getCompositeIdFromVM(vm));
updateCompliance = true; vmDefs.addVM(runtime); vmDefs.setDefaultVMInstallCompositeID(getCompositeIdFromVM(runtime)); vmDefs.setDefaultVMInstallCompositeID(fgDefaultVMId); updateCompliance = fgDefaultVMId != null; if (!list.isEmpty()) { IVMInstall vm = list.get(0); vmDefs.setDefaultVMInstallCompositeID(getCompositeIdFromVM(vm));