public void dispose() { // remove all renderings fRenderings.clear(); String secondaryId = getViewSiteSecondaryId(); if (secondaryId != null) { // do not save renderings if this is not the primary rendering view String prefid = getPrefId(); Preferences prefs = DebugUIPlugin.getDefault().getPluginPreferences(); prefs.setToDefault(prefid); } DebugPlugin.getDefault().removeDebugEventListener(this); }
/** * Store renderings as preferences. If renderings are stored, renderings can be persisted even * after the memory view is closed. */ private void storeRenderings() { Preferences prefs = DebugUIPlugin.getDefault().getPluginPreferences(); String renderingsStr = IInternalDebugCoreConstants.EMPTY_STRING; try { renderingsStr = getRenderingsAsXML(); } catch (IOException e) { DebugUIPlugin.log(e); } catch (ParserConfigurationException e) { DebugUIPlugin.log(e); } catch (TransformerException e) { DebugUIPlugin.log(e); } String prefid = getPrefId(); if (renderingsStr != null) prefs.setValue(prefid, renderingsStr); else prefs.setToDefault(prefid); }
/** {@inheritDoc} */ public void setToDefault(String name) { fPreferences.setToDefault(name); }