Package org.eclipse.gef.commands

Examples of org.eclipse.gef.commands.CommandStack.execute()


        if (targetPart instanceof GraphicalEditor) {
            commandStack = (CommandStack) ((GraphicalEditor) targetPart).getAdapter(CommandStack.class);
        } else {
            commandStack = ((OutlineViewer) ((ContentOutline) targetPart).getCurrentPage()).getCommandStack();
        }
        commandStack.execute(command);
    }
   
    protected IEditorPart getActiveEditor() {
        return targetPart.getSite().getPage().getActiveEditor();
    }
View Full Code Here


                Work work = openEditor(editor, workDefinition);
                if (work != null) {
                    SetWorkCommand setCommand = new SetWorkCommand();
                    setCommand.setPropertyValue(work);
                    CommandStack stack = getViewer().getEditDomain().getCommandStack();
                    stack.execute(setCommand);
                }
            }
        }
    }
   
View Full Code Here

   *
   * @param command
   */
  public void executeCommand(Command command) {
    CommandStack stack = getEditDomain().getCommandStack();
    stack.execute(command);
  }

  @Override
  @SuppressWarnings("rawtypes")
  public Object getAdapter(Class type) {
View Full Code Here

      String newValue = (String)this.comboCellEditor.getValue();
      if (newValue != null && !newValue.equals(this.initialValue))
      {
        CommandStack stack = getEditPart().getViewer().getEditDomain()
            .getCommandStack();
        stack.execute(getEditPart().getCommand(getDirectEditRequest()));
      }     
    }
    finally
    {
      bringDown();
View Full Code Here

 
  private void internalCommit()
  {
    CommandStack stack = getEditPart().getViewer().getEditDomain()
        .getCommandStack();
    stack.execute(getEditPart().getCommand(getDirectEditRequest()));           
  }
 
  private void restoreSavedActions(IActionBars actionBars) {
    actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), copy);
    actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), paste);
View Full Code Here

                Work work = openEditor(editor, workDefinition);
                if (work != null) {
                    SetWorkCommand setCommand = new SetWorkCommand();
                    setCommand.setPropertyValue(work);
                    CommandStack stack = getViewer().getEditDomain().getCommandStack();
                    stack.execute(setCommand);
                }
            }
        }
    }
   
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.