Package org.eclipse.ui.actions

Examples of org.eclipse.ui.actions.RetargetAction


                : Boolean.FALSE);
        map.put(ATTRIBUTE_ENABLED, action.isEnabled() ? Boolean.TRUE
                : Boolean.FALSE);
        boolean handled = true;
        if (action instanceof RetargetAction) {
            RetargetAction retargetAction = (RetargetAction) action;
            handled = retargetAction.getActionHandler() != null;
        }
        map.put(ATTRIBUTE_HANDLED, handled ? Boolean.TRUE : Boolean.FALSE);
        map.put(ATTRIBUTE_ID, action.getId());
        map.put(ATTRIBUTE_STYLE, new Integer(action.getStyle()));
        return Collections.unmodifiableMap(map);
View Full Code Here


      if (action == null) {
        manager.add(new Separator());
      } else if (action.isRetargetable()) {
        IWorkbenchAction workbenchAction = action.getActionFactory().create(window);
        if (workbenchAction instanceof RetargetAction) {
          RetargetAction retargetAction = (RetargetAction) workbenchAction;
          page.addPartListener(retargetAction);
          retargetAction.partActivated(editor);
        }
        manager.add(workbenchAction);
      } else {
        manager.add(action);
      }
View Full Code Here

                    .getAttribute(IWorkbenchRegistryConstants.ATT_LABEL);

            if (allowLabelUpdate != null && Boolean.valueOf(allowLabelUpdate).booleanValue()) {
        retargetAction = new LabelRetargetAction(id, label, style);
      } else {
        retargetAction = new RetargetAction(id, label, style);
      }
            retargetAction
                    .addPropertyChangeListener(new IPropertyChangeListener() {
                        public void propertyChange(PropertyChangeEvent event) {
                            if (event.getProperty().equals(IAction.ENABLED)) {
View Full Code Here

        addRetargetAction( new AlignmentRetargetAction( PositionConstants.RIGHT ) );
        addRetargetAction( new AlignmentRetargetAction( PositionConstants.TOP ) );
        addRetargetAction( new AlignmentRetargetAction( PositionConstants.MIDDLE ) );
        addRetargetAction( new AlignmentRetargetAction( PositionConstants.BOTTOM ) );
       
        addRetargetAction( new RetargetAction(
            GEFActionConstants.TOGGLE_GRID_VISIBILITY, "Grid" ));
    }
View Full Code Here

    super();

    ResourceBundle resourceBundle = DLTKEditorMessages
        .getBundleForConstructedKeys();

    fRetargetShowPHPDoc = new RetargetAction(
        PHPActionConstants.SHOW_PHP_DOC, PHPUIMessages.ShowPHPDoc_label);
    fRetargetShowPHPDoc
        .setActionDefinitionId(IPHPEditorActionDefinitionIds.SHOW_PHPDOC);
    fPartListeners.add(fRetargetShowPHPDoc);
View Full Code Here

  addRetargetAction(new ZoomOutRetargetAction());
 
  addRetargetAction(new MatchWidthRetargetAction());
  addRetargetAction(new MatchHeightRetargetAction());
 
  addRetargetAction(new RetargetAction(
      GEFActionConstants.TOGGLE_RULER_VISIBILITY,
      GEFMessages.ToggleRulerVisibility_Label, IAction.AS_CHECK_BOX));
 
  addRetargetAction(new RetargetAction(
      GEFActionConstants.TOGGLE_SNAP_TO_GEOMETRY,
      GEFMessages.ToggleSnapToGeometry_Label, IAction.AS_CHECK_BOX));

  addRetargetAction(new RetargetAction(GEFActionConstants.TOGGLE_GRID_VISIBILITY,
      GEFMessages.ToggleGrid_Label, IAction.AS_CHECK_BOX));
}
View Full Code Here

TOP

Related Classes of org.eclipse.ui.actions.RetargetAction

Copyright © 2018 www.massapicom. 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.