/** * This implementation of the corresponding {@link BundleActivator} method * closes the workspace without saving. * @see BundleActivator#stop(BundleContext) */ @Override public void stop(BundleContext context) throws Exception { super.stop(context); // unregister debug options listener debugRegistration.unregister(); debugRegistration = null; if (workspace == null) return; workspaceRegistration.unregister(); // save the preferences for this plug-in getPlugin().savePluginPreferences(); workspace.close(null); // Forget workspace only if successfully closed, to // make it easier to debug cases where close() is failing. workspace = null; workspaceRegistration = null; }
/** * This implementation of the corresponding {@link BundleActivator} method * closes the workspace without saving. * @see BundleActivator#stop(BundleContext) */ @Override public void stop(BundleContext context) throws Exception { super.stop(context); // unregister debug options listener debugRegistration.unregister(); debugRegistration = null; if (workspace == null) return; workspaceRegistration.unregister(); // save the preferences for this plug-in getPlugin().savePluginPreferences(); workspace.close(null); // Forget workspace only if successfully closed, to // make it easier to debug cases where close() is failing. workspace = null; workspaceRegistration = null; }
@Override public void setDescription(IWorkspaceDescription value) { // if both the old and new description's build orders are null, leave the // workspace's build order slot because it is caching the computed order. // Otherwise, set the slot to null to force recomputing or building from the description. WorkspaceDescription newDescription = (WorkspaceDescription) value; String[] newOrder = newDescription.getBuildOrder(false); if (description.getBuildOrder(false) != null || newOrder != null) buildOrder = null; description.copyFrom(newDescription); ResourcesPlugin.getPlugin().savePluginPreferences(); }
@Override public void setDescription(IWorkspaceDescription value) { // if both the old and new description's build orders are null, leave the // workspace's build order slot because it is caching the computed order. // Otherwise, set the slot to null to force recomputing or building from the description. WorkspaceDescription newDescription = (WorkspaceDescription) value; String[] newOrder = newDescription.getBuildOrder(false); if (description.getBuildOrder(false) != null || newOrder != null) buildOrder = null; description.copyFrom(newDescription); ResourcesPlugin.getPlugin().savePluginPreferences(); }
/** * This implementation of the corresponding {@link BundleActivator} method * closes the workspace without saving. * @see BundleActivator#stop(BundleContext) */ @Override public void stop(BundleContext context) throws Exception { super.stop(context); // unregister debug options listener debugRegistration.unregister(); debugRegistration = null; if (workspace == null) { return; } workspace.removeResourceChangeListener(checkMissingNaturesListener); InstanceScope.INSTANCE.getNode(PREF_MISSING_NATURE_MARKER_SEVERITY).removePreferenceChangeListener(checkMissingNaturesListener); if (workspaceRegistration != null) { workspaceRegistration.unregister(); } // save the preferences for this plug-in getPlugin().savePluginPreferences(); workspace.close(null); // Forget workspace only if successfully closed, to // make it easier to debug cases where close() is failing. workspace = null; workspaceRegistration = null; }
@Override public void setDescription(IWorkspaceDescription value) { // if both the old and new description's build orders are null, leave the // workspace's build order slot because it is caching the computed order. // Otherwise, set the slot to null to force recomputing or building from the description. WorkspaceDescription newDescription = (WorkspaceDescription) value; String[] newOrder = newDescription.getBuildOrder(false); if (description.getBuildOrder(false) != null || newOrder != null) { flushBuildOrder(); } description.copyFrom(newDescription); ResourcesPlugin.getPlugin().savePluginPreferences(); }
/** * Writes the metainfo (e.g. descriptions) of the given workspace and * all projects to the local disk. */ protected void saveMetaInfo(MultiStatus problems, IProgressMonitor monitor) throws CoreException { if (Policy.DEBUG_SAVE_METAINFO) Policy.debug("Save workspace metainfo: starting..."); //$NON-NLS-1$ long start = System.currentTimeMillis(); // save preferences (workspace description, path variables, etc) ResourcesPlugin.getPlugin().savePluginPreferences(); // save projects' meta info IProject[] roots = workspace.getRoot().getProjects(IContainer.INCLUDE_HIDDEN); for (IProject root : roots) if (root.isAccessible()) { IStatus result = saveMetaInfo((Project) root, null); if (!result.isOK()) problems.merge(result); } if (Policy.DEBUG_SAVE_METAINFO) Policy.debug("Save workspace metainfo: " + (System.currentTimeMillis() - start) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ }
/** * Writes the metainfo (e.g. descriptions) of the given workspace and * all projects to the local disk. */ protected void saveMetaInfo(MultiStatus problems, IProgressMonitor monitor) throws CoreException { if (Policy.DEBUG_SAVE_METAINFO) Policy.debug("Save workspace metainfo: starting..."); //$NON-NLS-1$ long start = System.currentTimeMillis(); // save preferences (workspace description, path variables, etc) ResourcesPlugin.getPlugin().savePluginPreferences(); // save projects' meta info IProject[] roots = workspace.getRoot().getProjects(IContainer.INCLUDE_HIDDEN); for (int i = 0; i < roots.length; i++) if (roots[i].isAccessible()) { IStatus result = saveMetaInfo((Project) roots[i], null); if (!result.isOK()) problems.merge(result); } if (Policy.DEBUG_SAVE_METAINFO) Policy.debug("Save workspace metainfo: " + (System.currentTimeMillis() - start) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ }
/** * Writes the metainfo (e.g. descriptions) of the given workspace and * all projects to the local disk. */ protected void saveMetaInfo(MultiStatus problems, IProgressMonitor monitor) throws CoreException { if (Policy.DEBUG_SAVE_METAINFO) Policy.debug("Save workspace metainfo: starting..."); //$NON-NLS-1$ long start = System.currentTimeMillis(); // save preferences (workspace description, path variables, etc) ResourcesPlugin.getPlugin().savePluginPreferences(); // save projects' meta info IProject[] roots = workspace.getRoot().getProjects(IContainer.INCLUDE_HIDDEN); for (int i = 0; i < roots.length; i++) if (roots[i].isAccessible()) { IStatus result = saveMetaInfo((Project) roots[i], null); if (!result.isOK()) problems.merge(result); } if (Policy.DEBUG_SAVE_METAINFO) Policy.debug("Save workspace metainfo: " + (System.currentTimeMillis() - start) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ }
if (oldDescription != null) { description.copyFrom(oldDescription); ResourcesPlugin.getPlugin().savePluginPreferences();
if (oldDescription != null) { description.copyFrom(oldDescription); ResourcesPlugin.getPlugin().savePluginPreferences();
if (oldDescription != null) { description.copyFrom(oldDescription); ResourcesPlugin.getPlugin().savePluginPreferences();