Examples of ActionRegistry


Examples of org.eclipse.gef.ui.actions.ActionRegistry

public class WebFlowGraphicalEditor extends AbstractConfigGraphicalEditor {

  @Override
  protected void createActions() {
    super.createActions();
    ActionRegistry registry = getActionRegistry();
    IAction action = new ToggleActionStateAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());

    action = new ToggleDecisionStateAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());

    action = new ToggleEndStateAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());

    action = new ToggleSubflowStateAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());

    action = new ToggleViewStateAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
  }
View Full Code Here

Examples of org.eclipse.gef.ui.actions.ActionRegistry

  public void performRequest(Request request) {
    if (request.getType().equals(RequestConstants.REQ_OPEN)) {
      IEditorPart editor = PlatformUI.getWorkbench()
          .getActiveWorkbenchWindow().getActivePage()
          .getActiveEditor();
      ActionRegistry actionRegistry = (ActionRegistry) editor
          .getAdapter(ActionRegistry.class);
      IAction action = actionRegistry
          .getAction(EditPropertiesAction.EDITPROPERTIES);
      if (action != null && action.isEnabled()) {
        action.run();
      }
    }
View Full Code Here

Examples of org.eclipse.gef.ui.actions.ActionRegistry

      public void widgetSelected(SelectionEvent e) {
        IEditorPart editor = PlatformUI.getWorkbench()
            .getActiveWorkbenchWindow().getActivePage()
            .getActiveEditor();
        ActionRegistry actionRegistry = (ActionRegistry) editor
            .getAdapter(ActionRegistry.class);
        EditPropertiesAction action = (EditPropertiesAction) actionRegistry
            .getAction(EditPropertiesAction.EDITPROPERTIES);
        action.setOpenDialog(true);
       
        EditPropertiesCommand command = new EditPropertiesCommand();
View Full Code Here

Examples of org.eclipse.gef.ui.actions.ActionRegistry

  }

  @SuppressWarnings("unchecked")
  protected void createActions() {
    super.createActions();
    ActionRegistry registry = getActionRegistry();
    IAction action;

    action = new DirectEditAction((IWorkbenchPart) this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());

    action = new SetAsStartStateAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());

    action = new EditPropertiesAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());

    action = new ExportAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());

    action = new OpenConfigFileAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());

    action = new OpenBeansGraphAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());

    action = new OpenBeansConfigAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());

  }
View Full Code Here

Examples of org.eclipse.gef.ui.actions.ActionRegistry

  public void performRequest(Request request) {
    if (request.getType().equals(RequestConstants.REQ_OPEN)) {
      IEditorPart editor = PlatformUI.getWorkbench()
          .getActiveWorkbenchWindow().getActivePage()
          .getActiveEditor();
      ActionRegistry actionRegistry = (ActionRegistry) editor
          .getAdapter(ActionRegistry.class);
      IAction action = actionRegistry
          .getAction(EditPropertiesAction.EDITPROPERTIES);
      if (action != null && action.isEnabled()) {
        action.run();
      }
    }
View Full Code Here

Examples of org.eclipse.gef.ui.actions.ActionRegistry

    if (request.getType() == RequestConstants.REQ_DIRECT_EDIT) {
      performDirectEdit();
    }
    else if (request.getType().equals(RequestConstants.REQ_OPEN)) {
      IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
      ActionRegistry actionRegistry = (ActionRegistry) editor.getAdapter(ActionRegistry.class);
      IAction action = actionRegistry.getAction(EditPropertiesAction.EDITPROPERTIES);
      if (action != null && action.isEnabled()) {
        action.run();
      }
    }
  }
View Full Code Here

Examples of org.eclipse.gef.ui.actions.ActionRegistry

    }
    else if (request.getType().equals(RequestConstants.REQ_OPEN)) {
      IEditorPart editor = PlatformUI.getWorkbench()
          .getActiveWorkbenchWindow().getActivePage()
          .getActiveEditor();
      ActionRegistry actionRegistry = (ActionRegistry) editor
          .getAdapter(ActionRegistry.class);
      IAction action = actionRegistry
          .getAction(EditPropertiesAction.EDITPROPERTIES);
      if (action != null && action.isEnabled()) {
        action.run();
      }
    }
View Full Code Here

Examples of org.eclipse.gef.ui.actions.ActionRegistry

      getSelectionSynchronizer().addViewer(getViewer());
    }

    public void init(IPageSite pageSite) {
      super.init(pageSite);
      ActionRegistry registry = getActionRegistry();
      IActionBars bars = pageSite.getActionBars();
      String id = ActionFactory.UNDO.getId();
      bars.setGlobalActionHandler(id, registry.getAction(id));
      id = ActionFactory.REDO.getId();
      bars.setGlobalActionHandler(id, registry.getAction(id));
      id = ActionFactory.DELETE.getId();
      bars.setGlobalActionHandler(id, registry.getAction(id));
      id = SetAsStartStateAction.STARTSTATE;
      bars.setGlobalActionHandler(id, registry.getAction(id));
      bars.updateActionBars();
    }
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.