public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { monitor.beginTask(JREMessages.JREsUpdater_0, 100); String vmDefXML = container.getAsXML(); monitor.worked(40); JavaRuntime.getPreferences().setValue(JavaRuntime.PREF_VM_XML, vmDefXML); monitor.worked(30); JavaRuntime.savePreferences(); monitor.worked(30); } catch (IOException ioe) { JDIDebugUIPlugin.log(ioe); } catch (ParserConfigurationException e) { JDIDebugUIPlugin.log(e); } catch (TransformerException e) { JDIDebugUIPlugin.log(e); } finally { monitor.done(); } } };
String xml = vms.getAsXML(); node.put(JavaRuntime.PREF_VM_XML, xml); } catch (CoreException e) {
String xml = vms.getAsXML(); node.put(JavaRuntime.PREF_VM_XML, xml); } catch (CoreException e) {
/** * 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(); }
String xml = vmDefs.getAsXML(); InstanceScope.INSTANCE.getNode(LaunchingPlugin.ID_PLUGIN).put(PREF_VM_XML, xml); } catch (CoreException e) {
String xml = vmDefs.getAsXML(); InstanceScope.INSTANCE.getNode(LaunchingPlugin.ID_PLUGIN).put(PREF_VM_XML, xml); } catch (CoreException e) {