Package org.eclipse.core.commands.operations

Examples of org.eclipse.core.commands.operations.IOperationHistory.execute()


    IOperationHistory operationHistory = PlatformUI.getWorkbench()
        .getOperationSupport().getOperationHistory();
    IUndoableOperation operation = new CutOperation(designer.getSelectedComponents());
    operation.addContext(designer.getUndoContext());
    try {
      operationHistory.execute(operation, null, null);
    } catch (ExecutionException e) {
      VisualSwingPlugin.getLogger().error(e);
    }
    rootAdapter.doLayout();
    designer.getRoot().validate();
View Full Code Here


            WidgetAdapter adapter = WidgetAdapter.getWidgetAdapter(jcomp);
            if (adapter != null) {
              operation.addContext(adapter.getUndoContext());
            }
          }
          operationHistory.execute(operation, null, null);
        }
      } catch (Exception e) {
        VisualSwingPlugin.getLogger().error(e);
      }
    }
View Full Code Here

        IUndoableOperation operation = parentAdapter.doKeyPressed(e);
        if (operation != null) {
          IOperationHistory operationHistory = PlatformUI.getWorkbench().getOperationSupport().getOperationHistory();
          operation.addContext(getUndoContext());
          try {
            operationHistory.execute(operation, null, null);
          } catch (ExecutionException ex) {
            VisualSwingPlugin.getLogger().error(ex);
          }
        }
      }
View Full Code Here

        .getOperationSupport().getOperationHistory();
    IUndoableOperation operation = new DeleteOperation(designer
        .getSelectedComponents(), designer.getRoot());
    operation.addContext(designer.getUndoContext());
    try {
      operationHistory.execute(operation, null, null);
    } catch (ExecutionException e) {
      VisualSwingPlugin.getLogger().error(e);
    }
    designer.invalidate();
    designer.doLayout();
View Full Code Here

  public void run() {
    IUndoableOperation operation = new VarChangeOperation(adapter);
    operation.addContext(adapter.getUndoContext());
    IOperationHistory history = PlatformUI.getWorkbench().getOperationSupport().getOperationHistory();
    try {
      history.execute(operation, null, null);
    } catch (ExecutionException e) {
      VisualSwingPlugin.getLogger().error(e);
    }
  }
}
View Full Code Here

                new_constraints.add(compositeAdapter.getChildConstraints(child));
              }
              IUndoableOperation operation = new MoveResizeOperation(lastParent, compositeAdapter, children, lastConstraints, new_constraints);
              operation.addContext(designer.getUndoContext());
              try {
                operationHistory.execute(operation, null, null);
              } catch (ExecutionException e) {
                VisualSwingPlugin.getLogger().error(e);
              }
              for (WidgetAdapter wa : designer.getSelectedWidget()) {
                WidgetEvent we = new WidgetEvent(lastParent, compositeAdapter, wa);
View Full Code Here

            children.add(wa.getParentContainer());
          }
          IUndoableOperation operation = new DragDropOperation(lastParent, children, lastConstraints);
          operation.addContext(designer.getUndoContext());
          try {
            operationHistory.execute(operation, null, null);
          } catch (ExecutionException e) {
            VisualSwingPlugin.getLogger().error(e);
          }
          lastParent.setDirty(true);
          designer.fireDirty();
View Full Code Here

            new_constraints.add(((CompositeAdapter) adapter).getChildConstraints(child));
          }
          IUndoableOperation operation = new MoveResizeOperation(lastParent, ((CompositeAdapter) adapter), children, lastConstraints, new_constraints);
          operation.addContext(designer.getUndoContext());
          try {
            operationHistory.execute(operation, null, null);
          } catch (ExecutionException e) {
            VisualSwingPlugin.getLogger().error(e);
          }
          for (WidgetAdapter wa : designer.getSelectedWidget()) {
            WidgetEvent we = new WidgetEvent(lastParent, (CompositeAdapter) adapter, wa);
View Full Code Here

        Object oldValue = iEditor.getOldValue();
        if (isValueChanged(oldValue, newValue)) {
          IUndoableOperation operation = new SetWidgetValueOperation(adapter, oldValue, newValue);
          IOperationHistory operationHistory = PlatformUI.getWorkbench().getOperationSupport().getOperationHistory();
          operation.addContext(adapter.getUndoContext());
          operationHistory.execute(operation, null, null);
          adapter.setDirty(true);
          CompositeAdapter container = (CompositeAdapter) adapter.getParentAdapter();
          if (container != null)
            container.adjustLayout(adapter.getWidget());
          if (adapter.isSelected()) {
View Full Code Here

            WidgetAdapter adapter = WidgetAdapter.getWidgetAdapter(jcomp);
            if (adapter != null) {
              operation.addContext(adapter.getUndoContext());
            }
          }
          operationHistory.execute(operation, null, null);
        }
      } catch (Exception e) {
        VisualSwingPlugin.getLogger().error(e);
      }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.