/** * Sets a VM connector as the system-wide default VM. This setting is persisted when * saveVMConfiguration is called. * @param connector The connector to make the default. May be <code>null</code> to clear * the default. * @param monitor The progress monitor to use * @since 2.0 * @throws CoreException Thrown if saving the new default setting fails */ public static void setDefaultVMConnector(IVMConnector connector, IProgressMonitor monitor) throws CoreException { fgDefaultVMConnectorId= connector.getIdentifier(); saveVMConfiguration(); }
/** * Sets a VM connector as the system-wide default VM. This setting is persisted when * saveVMConfiguration is called. * @param connector The connector to make the default. May be <code>null</code> to clear * the default. * @param monitor The progress monitor to use * @since 2.0 * @throws CoreException Thrown if saving the new default setting fails */ public static void setDefaultVMConnector(IVMConnector connector, IProgressMonitor monitor) throws CoreException { fgDefaultVMConnectorId= connector.getIdentifier(); saveVMConfiguration(); }
standin.setLibraryLocations(libs); standin.convertToRealVM(); JavaRuntime.saveVMConfiguration();
/** * Sets a VM as the system-wide default VM, and notifies registered VM install * change listeners of the change. * * @param vm The VM to make the default. May be <code>null</code> to clear * the default. * @param monitor progress monitor or <code>null</code> * @param savePreference If <code>true</code>, update workbench preferences to reflect * the new default VM. * @throws CoreException if trying to set the default VM install encounters problems * @since 2.1 */ public static void setDefaultVMInstall(IVMInstall vm, IProgressMonitor monitor, boolean savePreference) throws CoreException { IVMInstall previous = null; if (fgDefaultVMId != null) { previous = getVMFromCompositeId(fgDefaultVMId); } fgDefaultVMId= getCompositeIdFromVM(vm); if (savePreference) { saveVMConfiguration(); } IVMInstall current = null; if (fgDefaultVMId != null) { current = getVMFromCompositeId(fgDefaultVMId); } if (previous != current) { notifyDefaultVMChanged(previous, current); } }
standin.setLibraryLocations(libs); standin.convertToRealVM(); JavaRuntime.saveVMConfiguration();
/** * Sets a VM as the system-wide default VM, and notifies registered VM install * change listeners of the change. * * @param vm The VM to make the default. May be <code>null</code> to clear * the default. * @param monitor progress monitor or <code>null</code> * @param savePreference If <code>true</code>, update workbench preferences to reflect * the new default VM. * @throws CoreException if trying to set the default VM install encounters problems * @since 2.1 */ public static void setDefaultVMInstall(IVMInstall vm, IProgressMonitor monitor, boolean savePreference) throws CoreException { IVMInstall previous = null; if (fgDefaultVMId != null) { previous = getVMFromCompositeId(fgDefaultVMId); } fgDefaultVMId= getCompositeIdFromVM(vm); if (savePreference) { saveVMConfiguration(); } IVMInstall current = null; if (fgDefaultVMId != null) { current = getVMFromCompositeId(fgDefaultVMId); } if (previous != current) { notifyDefaultVMChanged(previous, current); } }
/** * Clears zip file cache. * Shutdown the launch configuration helper. * * @see Plugin#stop(BundleContext) */ @Override public void stop(BundleContext context) throws Exception { try { DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this); DebugPlugin.getDefault().removeDebugEventListener(this); ResourcesPlugin.getWorkspace().removeResourceChangeListener(this); ArchiveSourceLocation.closeArchives(); InstanceScope.INSTANCE.getNode(ID_PLUGIN).removePreferenceChangeListener(this); JavaRuntime.removeVMInstallChangedListener(this); JavaRuntime.saveVMConfiguration(); fgXMLParser = null; ResourcesPlugin.getWorkspace().removeSaveParticipant(ID_PLUGIN); } finally { super.stop(context); } }
/** * Clears zip file cache. * Shutdown the launch configuration helper. * * @see Plugin#stop(BundleContext) */ @Override public void stop(BundleContext context) throws Exception { try { AdvancedSourceLookupSupport.stop(); DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this); DebugPlugin.getDefault().removeDebugEventListener(this); ResourcesPlugin.getWorkspace().removeResourceChangeListener(this); ArchiveSourceLocation.closeArchives(); InstanceScope.INSTANCE.getNode(ID_PLUGIN).removePreferenceChangeListener(this); JavaRuntime.removeVMInstallChangedListener(this); JavaRuntime.saveVMConfiguration(); fgXMLParser = null; ResourcesPlugin.getWorkspace().removeSaveParticipant(ID_PLUGIN); } finally { super.stop(context); } }