@Override
 public IStatus redo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
   getModel().removeColumn(actualState.getId());
   getModel().addColumn(savedState);
   changedColumn = getEditor().unmarkColumnAsChanged(actualState.getId());
   getEditor().getEditorViewer().refresh();
   return Status.OK_STATUS;
 }
Exemplo n.º 2
0
 @Override
 public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
   ColumnInfo source = getModel().getColumn(sourceColumnID);
   for (String cellKey : source.getCells().keySet()) {
     CellInfo cell = source.getCells().get(cellKey);
     if (cell != null) {
       destinationColumn.addCell(cellKey, new CellInfo(cell.getValue(), cell.getComment()));
     }
   }
   return redo(monitor, info);
 }
 @Override
 public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
   try {
     getEditorInput().revert(actualState.getId());
   } catch (IOException e) {
     BasePlugin.logError("Error reverting column: " + actualState.getId(), e);
   }
   savedState =
       new ColumnInfo(
           actualState.getId(),
           actualState.getTooltip(),
           getEditorInput().getValues(actualState.getId()),
           actualState.canRemove());
   return redo(monitor, info);
 }
Exemplo n.º 4
0
  @Override
  public IStatus undo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
    getEditor().removeColumn(destinationColumn.getId());

    return Status.OK_STATUS;
  }