コード例 #1
0
  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);
  }
コード例 #2
0
  /**
   * 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);
  }
コード例 #3
0
 /** {@inheritDoc} */
 public void setToDefault(String name) {
   fPreferences.setToDefault(name);
 }