Source:
public boolean performOk() { IWorkspaceDescription description = ResourcesPlugin.getWorkspace() .getDescription(); if (autoBuildButton.getSelection() != ResourcesPlugin.getWorkspace() .isAutoBuilding()) { try { description.setAutoBuilding(autoBuildButton.getSelection()); ResourcesPlugin.getWorkspace().setDescription(description); } catch (CoreException e) { IDEWorkbenchPlugin.log( "Error changing auto build workspace setting.", e .getStatus()); } } IPreferenceStore store = getIDEPreferenceStore(); store.setValue(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD, autoSaveAllButton.getSelection()); long oldSaveInterval = description.getSnapshotInterval() / 60000; long newSaveInterval = new Long(saveInterval.getStringValue()) .longValue(); if (oldSaveInterval != newSaveInterval) { try { description.setSnapshotInterval(newSaveInterval * 60000); ResourcesPlugin.getWorkspace().setDescription(description); store.firePropertyChangeEvent( IDEInternalPreferences.SAVE_INTERVAL, new Integer( (int) oldSaveInterval), new Integer( (int) newSaveInterval)); } catch (CoreException e) { IDEWorkbenchPlugin.log( "Error changing save interval preference", e .getStatus()); } } store.setValue(IDEInternalPreferences.SHOW_LOCATION, showLocationInWindowTitle.getSelection()); workspaceName.store(); systemExplorer.store(); IEclipsePreferences node = ConfigurationScope.INSTANCE.getNode(ResourcesPlugin.PI_RESOURCES); boolean autoRefresh = autoRefreshButton.getSelection(); node.putBoolean(ResourcesPlugin.PREF_AUTO_REFRESH, autoRefresh); boolean lightweightRefresh = lightweightRefreshButton.getSelection(); node.putBoolean(ResourcesPlugin.PREF_LIGHTWEIGHT_AUTO_REFRESH, lightweightRefresh); try { node.flush(); } catch (BackingStoreException e) { IDEWorkbenchPlugin.log(e.getMessage(), e); } boolean closeUnrelatedProj = closeUnrelatedProjectButton.getSelection(); getIDEPreferenceStore().setValue(IDEInternalPreferences.CLOSE_UNRELATED_PROJECTS, closeUnrelatedProj); if (clearUserSettings) { IDEEncoding.clearUserEncodings(); } encodingEditor.store(); lineSeparatorEditor.store(); openReferencesEditor.store(); return super.performOk(); }

Target:
public boolean performOk() { IWorkspaceDescription description = ResourcesPlugin.getWorkspace() .getDescription(); if (autoBuildButton.getSelection() != ResourcesPlugin.getWorkspace() .isAutoBuilding()) { try { description.setAutoBuilding(autoBuildButton.getSelection()); ResourcesPlugin.getWorkspace().setDescription(description); } catch (CoreException e) { IDEWorkbenchPlugin.log( "Error changing auto build workspace setting.", e .getStatus()); } } IPreferenceStore store = getIDEPreferenceStore(); store.setValue(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD, autoSaveAllButton.getSelection()); long oldSaveInterval = description.getSnapshotInterval() / 60000; long newSaveInterval = new Long(saveInterval.getStringValue()) .longValue(); if (oldSaveInterval != newSaveInterval) { try { description.setSnapshotInterval(newSaveInterval * 60000); ResourcesPlugin.getWorkspace().setDescription(description); store.firePropertyChangeEvent( IDEInternalPreferences.SAVE_INTERVAL, new Integer( (int) oldSaveInterval), new Integer( (int) newSaveInterval)); } catch (CoreException e) { IDEWorkbenchPlugin.log( "Error changing save interval preference", e .getStatus()); } } store.setValue(IDEInternalPreferences.SHOW_LOCATION, showLocationInWindowTitle.getSelection()); workspaceName.store(); systemExplorer.store(); IEclipsePreferences node = InstanceScope.INSTANCE.getNode(ResourcesPlugin.PI_RESOURCES); boolean autoRefresh = autoRefreshButton.getSelection(); node.putBoolean(ResourcesPlugin.PREF_AUTO_REFRESH, autoRefresh); boolean lightweightRefresh = lightweightRefreshButton.getSelection(); node.putBoolean(ResourcesPlugin.PREF_LIGHTWEIGHT_AUTO_REFRESH, lightweightRefresh); try { node.flush(); } catch (BackingStoreException e) { IDEWorkbenchPlugin.log(e.getMessage(), e); } boolean closeUnrelatedProj = closeUnrelatedProjectButton.getSelection(); getIDEPreferenceStore().setValue(IDEInternalPreferences.CLOSE_UNRELATED_PROJECTS, closeUnrelatedProj); if (clearUserSettings) { IDEEncoding.clearUserEncodings(); } encodingEditor.store(); lineSeparatorEditor.store(); openReferencesEditor.store(); return super.performOk(); }