@Override
 public void saveState(IMemento memento) {
   super.saveState(memento);
   memento.putInteger(DETAILS_VIEW_FLYOUT_STATE, detailsViewerFlyout.getPreferences().getState());
   memento.putInteger(
       PATTERNS_VIEWER_FLYOUT_STATE, patternsViewerFlyout.getPreferences().getState());
   memento.putString(
       PACKAGE_PRESENTATION_STATE,
       (patternsTreeViewer.getContentProvider() == flatCP) ? "flat" : "hierarchical");
 }
示例#2
0
 @Override
 public void saveState(final IMemento memento) {
   super.saveState(memento);
   memento.putString(MEMENTO_PVFORMULA, pvFormula);
   memento.putBoolean(MEMENTO_SHOW_VIEWER, sectionToMenu.get(viewerPanel).getSelection());
   memento.putBoolean(MEMENTO_SHOW_VALUE, sectionToMenu.get(valuePanel).getSelection());
   memento.putBoolean(
       MEMENTO_SHOW_CHANGE_VALUE, sectionToMenu.get(changeValuePanel).getSelection());
   memento.putBoolean(MEMENTO_SHOW_METADATA, sectionToMenu.get(metadataPanel).getSelection());
   memento.putBoolean(MEMENTO_SHOW_DETAILS, sectionToMenu.get(detailsPanel).getSelection());
 }
示例#3
0
  @Override
  public void saveState(final IMemento memento) {
    super.saveState(memento);

    memento.putBoolean(KEY_TIMER, isTimerEnabled());

    if (this.editedItemDb != null
        && this.editedItemDb.getType().equals(MediaListType.LOCALMMDB.toString())) {
      memento.putString(KEY_DB, this.editedItemDb.getDbPath());
      memento.putString(KEY_ITEM, this.editedItem.getFilepath());
    }
  }
 @Override
 public void saveState(IMemento memento) {
   int i = 0;
   for (ITraceControlComponent cmp : fRoot.getChildren()) {
     if (cmp instanceof TargetNodeComponent) {
       IRemoteConnection rc =
           ((TargetNodeComponent) cmp).getRemoteSystemProxy().getRemoteConnection();
       memento.putString(KEY_REMOTE_PROVIDER + i, rc.getConnectionType().getId());
       memento.putString(KEY_REMOTE_CONNECTION_NAME + i, rc.getName());
       i++;
     }
   }
   super.saveState(memento);
 }
示例#5
0
  /* (non-Javadoc)
   * @see org.eclipse.ui.part.ViewPart#saveState(org.eclipse.ui.IMemento)
   */
  @Override
  public void saveState(IMemento memento) {
    memento.putInteger(K_ZOOM_FACTOR, viewer.getZoomFactor());

    int[] weights = viewer.getWeights();
    if (weights.length > 1) {
      StringBuilder sb = new StringBuilder();
      for (int i = 0; i < weights.length; i++) {
        if (i != 0) {
          sb.append(";"); // $NON-NLS-1$
        }
        sb.append(weights[i]);
      }
      memento.putString("weights", sb.toString()); // $NON-NLS-1$
    }

    super.saveState(memento);
  }
示例#6
0
  /**
   * right - store ourselves into the supplied memento object
   *
   * @param memento
   */
  @Override
  public void saveState(final IMemento memento) {
    // let our parent go for it first
    super.saveState(memento);

    final String _scenarioFileName = _myPresenter.getScenarioName();
    final String _controlFileName = _myPresenter.getControlName();

    if (_scenarioFileName != null) memento.putString(SCENARIO_FILE_INDEX, _scenarioFileName);
    if (_controlFileName != null) memento.putString(CONTROL_FILE_INDEX, _controlFileName);

    if (_myTimeControlProps != null) {
      final Duration stepSize = _myTimeControlProps.getAutoInterval();
      if (stepSize != null) {
        final String stepSizeStr = "" + stepSize.getValueIn(Duration.MILLISECONDS);
        memento.putString("StepInterval", stepSizeStr);
      }
    }
  }
示例#7
0
  @Override
  public void saveState(IMemento memento) {
    super.saveState(memento);

    if (showInfosAction != null) {
      memento.putBoolean("showInfos", showInfosAction.isChecked());
    }

    StringBuilder builder = new StringBuilder();

    for (TableColumn column : tableViewer.getTable().getColumns()) {
      if (builder.length() > 0) {
        builder.append(";");
      }

      builder.append(Integer.toString(column.getWidth()));
    }

    memento.putString("columnWidths", builder.toString());
  }
示例#8
0
 @Override
 public void saveState(IMemento memento) {
   super.saveState(memento);
   instance.saveState(memento);
 }
示例#9
0
  @Override
  public void saveState(final IMemento memento) {
    super.saveState(memento);

    memento.putString(LAST_IP, _lastIPAddress);
  }