示例#1
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());
 }
示例#2
0
 @Override
 public void saveState(IMemento memento) {
   super.saveState(memento);
   saveColumnWidths();
   memento.putInteger(KEY_DEFINITION_COLUMN_WIDTH, fColumnWidths[DEFINITION_COLUMN_INDEX]);
   memento.putInteger(KEY_LOCATION_COLUMN_WIDTH, fColumnWidths[LOCATION_COLUMN_INDEX]);
   memento.putInteger(KEY_MATCH_COLUMN_WIDTH, fColumnWidths[MATCH_COLUMN_INDEX]);
   memento.putBoolean(KEY_SHOW_ENCLOSING_DEFINITIONS, fShowEnclosingDefinitions);
 }
示例#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());
    }
  }
示例#4
0
 /** Saves the code folding state into the given memento. */
 public void saveCodeFolding(org.eclipse.ui.IMemento memento) {
   java.util.Iterator<?> annotationIt = projectionAnnotationModel.getAnnotationIterator();
   while (annotationIt.hasNext()) {
     org.eclipse.jface.text.source.projection.ProjectionAnnotation annotation =
         (org.eclipse.jface.text.source.projection.ProjectionAnnotation) annotationIt.next();
     org.eclipse.ui.IMemento annotationMemento = memento.createChild(ANNOTATION);
     org.eclipse.jface.text.Position position = projectionAnnotationModel.getPosition(annotation);
     annotationMemento.putBoolean(IS_COLLAPSED, annotation.isCollapsed());
     annotationMemento.putInteger(OFFSET, position.offset);
     annotationMemento.putInteger(LENGTH, position.length);
   }
 }
示例#5
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());
  }
示例#6
0
 public void saveState(IMemento memento) {
   memento.putBoolean(ColorMapActionKey, isChecked());
 }