Search in sources :

Example 1 with RetargetAction

use of org.eclipse.ui.actions.RetargetAction in project tdi-studio-se by Talend.

the class MultiPageEditorContributor method buildDesignActions.

/**
     * Pr�pare toutes les actions relatives au designer Gef.
     */
protected void buildDesignActions() {
    addDesignRetargetAction(new ZoomInRetargetAction());
    addDesignRetargetAction(new ZoomOutRetargetAction());
    addDesignRetargetAction(new DeleteRetargetAction());
    addDesignRetargetAction(new UndoRetargetAction());
    addDesignRetargetAction(new RedoRetargetAction());
    addDesignRetargetAction(new RetargetAction(GEFActionConstants.TOGGLE_SNAP_TO_GEOMETRY, //$NON-NLS-1$
    Messages.getString("MultiPageEditorContributor.Snap"), IAction.AS_CHECK_BOX));
    addDesignRetargetAction(new RetargetAction(GEFActionConstants.TOGGLE_GRID_VISIBILITY, //$NON-NLS-1$
    Messages.getString("MultiPageEditorContributor.Grid"), IAction.AS_CHECK_BOX));
    addDesignRetargetAction(new ToggleSubjobsRetargetAction());
    addDesignActionKey(ActionFactory.COPY.getId());
    addDesignActionKey(ActionFactory.PASTE.getId());
    addDesignActionKey(ActionFactory.PRINT.getId());
    addDesignActionKey(ActionFactory.SELECT_ALL.getId());
    addDesignActionKey(ActionFactory.DELETE.getId());
}
Also used : RedoRetargetAction(org.eclipse.gef.ui.actions.RedoRetargetAction) ToggleSubjobsRetargetAction(org.talend.designer.core.ui.action.ToggleSubjobsRetargetAction) UndoRetargetAction(org.eclipse.gef.ui.actions.UndoRetargetAction) ToggleSubjobsRetargetAction(org.talend.designer.core.ui.action.ToggleSubjobsRetargetAction) UndoRetargetAction(org.eclipse.gef.ui.actions.UndoRetargetAction) ZoomOutRetargetAction(org.eclipse.gef.ui.actions.ZoomOutRetargetAction) ZoomInRetargetAction(org.eclipse.gef.ui.actions.ZoomInRetargetAction) RetargetAction(org.eclipse.ui.actions.RetargetAction) RedoRetargetAction(org.eclipse.gef.ui.actions.RedoRetargetAction) DeleteRetargetAction(org.eclipse.gef.ui.actions.DeleteRetargetAction) DeleteRetargetAction(org.eclipse.gef.ui.actions.DeleteRetargetAction) ZoomInRetargetAction(org.eclipse.gef.ui.actions.ZoomInRetargetAction) ZoomOutRetargetAction(org.eclipse.gef.ui.actions.ZoomOutRetargetAction)

Example 2 with RetargetAction

use of org.eclipse.ui.actions.RetargetAction in project archi by archimatetool.

the class ArchimateDiagramEditorActionBarContributor method buildActions.

@Override
protected void buildActions() {
    super.buildActions();
    // Delete From Model
    RetargetAction retargetAction = new RetargetAction(DeleteFromModelAction.ID, DeleteFromModelAction.TEXT);
    addRetargetAction(retargetAction);
    // Viewpoints
    for (IViewpoint viewPoint : ViewpointManager.INSTANCE.getAllViewpoints()) {
        retargetAction = new RetargetAction(viewPoint.toString(), viewPoint.getName(), IAction.AS_RADIO_BUTTON);
        addRetargetAction(retargetAction);
    }
}
Also used : RetargetAction(org.eclipse.ui.actions.RetargetAction) IViewpoint(com.archimatetool.model.viewpoints.IViewpoint)

Example 3 with RetargetAction

use of org.eclipse.ui.actions.RetargetAction in project knime-core by knime.

the class WorkflowEditorActionBarContributor method buildActions.

/**
 * {@inheritDoc}
 */
@Override
protected void buildActions() {
    addRetargetAction(new UndoRetargetAction());
    addRetargetAction(new RedoRetargetAction());
    addRetargetAction(new DeleteRetargetAction());
    addRetargetAction(new ZoomInRetargetAction());
    addRetargetAction(new ZoomOutRetargetAction());
    addRetargetAction(new RetargetAction(ActionFactory.SAVE_AS.getId(), "Save As"));
}
Also used : RedoRetargetAction(org.eclipse.gef.ui.actions.RedoRetargetAction) UndoRetargetAction(org.eclipse.gef.ui.actions.UndoRetargetAction) ZoomOutRetargetAction(org.eclipse.gef.ui.actions.ZoomOutRetargetAction) ZoomInRetargetAction(org.eclipse.gef.ui.actions.ZoomInRetargetAction) RetargetAction(org.eclipse.ui.actions.RetargetAction) RedoRetargetAction(org.eclipse.gef.ui.actions.RedoRetargetAction) UndoRetargetAction(org.eclipse.gef.ui.actions.UndoRetargetAction) DeleteRetargetAction(org.eclipse.gef.ui.actions.DeleteRetargetAction) DeleteRetargetAction(org.eclipse.gef.ui.actions.DeleteRetargetAction) ZoomInRetargetAction(org.eclipse.gef.ui.actions.ZoomInRetargetAction) ZoomOutRetargetAction(org.eclipse.gef.ui.actions.ZoomOutRetargetAction)

Example 4 with RetargetAction

use of org.eclipse.ui.actions.RetargetAction in project jbosstools-hibernate by jbosstools.

the class DiagramActionBarContributor method buildActions.

/**
 * @see org.eclipse.gef.ui.actions.ActionBarContributor#buildActions()
 */
protected void buildActions() {
    IWorkbenchAction workbenchAction = ActionFactory.REFRESH.create(getPage().getWorkbenchWindow());
    // $NON-NLS-1$
    workbenchAction.setImageDescriptor(UiPlugin.getImageDescriptor2(ImageBundle.getString("Explorer.refreshOrmGef")));
    workbenchAction.setToolTipText(DiagramViewerMessages.EditorActionContributor_refresh_visual_mapping);
    addAction(workbenchAction);
    // 
    DiagramBaseRetargetAction diagramAction;
    Action[] act;
    // 
    diagramAction = new DiagramBaseRetargetAction(AutoLayoutAction.ACTION_ID, DiagramViewerMessages.AutoLayoutAction_auto_layout, DiagramViewerMessages.AutoLayoutAction_auto_layout, AutoLayoutAction.img);
    addRetargetAction(diagramAction);
    // 
    DiagramBaseRetargetAction diagramToggleConnectionsAction = new DiagramBaseRetargetAction(ToggleConnectionsAction.ACTION_ID, DiagramViewerMessages.ToggleConnectionsAction_toggle_connections, DiagramViewerMessages.ToggleConnectionsAction_toggle_connections, ToggleConnectionsAction.img);
    addRetargetAction(diagramToggleConnectionsAction);
    // 
    DiagramBaseRetargetAction diagramToggleExpandStateAction = new DiagramBaseRetargetAction(ToggleShapeExpandStateAction.ACTION_ID, DiagramViewerMessages.ToggleShapeExpandStateAction_toggle_expand_state, DiagramViewerMessages.ToggleShapeExpandStateAction_toggle_expand_state_tooltip, ToggleShapeExpandStateAction.img);
    addRetargetAction(diagramToggleExpandStateAction);
    // 
    diagramAction = new DiagramBaseRetargetAction(ShapeExpandAction.ACTION_ID, DiagramViewerMessages.ShapeExpandAction_shape_expand, DiagramViewerMessages.ShapeExpandAction_shape_expand_tooltip, ShapeExpandAction.img);
    addRetargetAction(diagramAction);
    // 
    diagramAction = new DiagramBaseRetargetAction(ShapeCollapseAction.ACTION_ID, DiagramViewerMessages.ShapeCollapseAction_shape_collapse, DiagramViewerMessages.ShapeCollapseAction_shape_collapse_tooltip, ShapeCollapseAction.img);
    addRetargetAction(diagramAction);
    // 
    DiagramBaseRetargetAction diagramToggleVisibleStateAction = new DiagramBaseRetargetAction(ToggleShapeVisibleStateAction.ACTION_ID, DiagramViewerMessages.ToggleShapeVisibleStateAction_toggle_visible_state, DiagramViewerMessages.ToggleShapeVisibleStateAction_toggle_visible_state_tooltip, ToggleShapeVisibleStateAction.img);
    addRetargetAction(diagramToggleVisibleStateAction);
    // 
    diagramAction = new DiagramBaseRetargetAction(ShapeHideAction.ACTION_ID, DiagramViewerMessages.ShapeHideAction_shape_hide, DiagramViewerMessages.ShapeHideAction_shape_hide_tooltip, ShapeHideAction.img);
    addRetargetAction(diagramAction);
    // 
    diagramAction = new DiagramBaseRetargetAction(ShapeShowAction.ACTION_ID, DiagramViewerMessages.ShapeShowAction_shape_show, DiagramViewerMessages.ShapeShowAction_shape_show_tooltip, ShapeShowAction.img);
    addRetargetAction(diagramAction);
    // 
    diagramAction = new DiagramBaseRetargetAction(ToggleClassMappingAction.ACTION_ID, DiagramViewerMessages.ToggleClassMappingAction_class_mappings, DiagramViewerMessages.ToggleClassMappingAction_class_mappings, ToggleClassMappingAction.img, IAction.AS_CHECK_BOX);
    addRetargetAction(diagramAction);
    // 
    diagramAction = new DiagramBaseRetargetAction(TogglePropertyMappingAction.ACTION_ID, DiagramViewerMessages.TogglePropertyMappingAction_property_mappings, DiagramViewerMessages.TogglePropertyMappingAction_property_mappings, TogglePropertyMappingAction.img, IAction.AS_CHECK_BOX);
    addRetargetAction(diagramAction);
    // 
    diagramAction = new DiagramBaseRetargetAction(ToggleAssociationAction.ACTION_ID, DiagramViewerMessages.ToggleAssociationAction_associations, DiagramViewerMessages.ToggleAssociationAction_associations, ToggleAssociationAction.img, IAction.AS_CHECK_BOX);
    addRetargetAction(diagramAction);
    // 
    diagramAction = new DiagramBaseRetargetAction(ToggleForeignKeyConstraintAction.ACTION_ID, DiagramViewerMessages.ToggleForeignKeyConstraintAction_foreign_key_constraints, DiagramViewerMessages.ToggleForeignKeyConstraintAction_foreign_key_constraints, ToggleForeignKeyConstraintAction.img, IAction.AS_CHECK_BOX);
    addRetargetAction(diagramAction);
    // 
    diagramAction = new DiagramBaseRetargetAction(ConnectionRouterManhattanAction.ACTION_ID, DiagramViewerMessages.ConnectionRouterManhattanAction_select_manhattan_connection_router, DiagramViewerMessages.ConnectionRouterManhattanAction_select_manhattan_connection_router, ConnectionRouterManhattanAction.img, IAction.AS_RADIO_BUTTON);
    addRetargetAction(diagramAction);
    // 
    diagramAction = new DiagramBaseRetargetAction(ConnectionRouterFanAction.ACTION_ID, DiagramViewerMessages.ConnectionRouterFanAction_select_fan_connection_router, DiagramViewerMessages.ConnectionRouterFanAction_select_fan_connection_router, ConnectionRouterFanAction.img, IAction.AS_RADIO_BUTTON);
    addRetargetAction(diagramAction);
    // 
    act = new Action[4];
    act[0] = (Action) getAction(TogglePropertyMappingAction.ACTION_ID);
    act[1] = (Action) getAction(ToggleClassMappingAction.ACTION_ID);
    act[2] = (Action) getAction(ToggleAssociationAction.ACTION_ID);
    act[3] = (Action) getAction(ToggleForeignKeyConstraintAction.ACTION_ID);
    // act[4] = null;
    // act[5] = (Action)getAction(ConnectionRouterManhattanAction.ACTION_ID);
    // act[6] = (Action)getAction(ConnectionRouterFanAction.ACTION_ID);
    diagramToggleConnectionsAction.setMenuCreator(new ActionMenu(act));
    // 
    // act = new Action[2];
    // act[0] = (Action)getAction(ShapeExpandAction.ACTION_ID);
    // act[1] = (Action)getAction(ShapeCollapseAction.ACTION_ID);
    // diagramToggleExpandStateAction.setMenuCreator(new ActionMenu(act));
    // 
    // act = new Action[2];
    // act[0] = (Action)getAction(ShapeShowAction.ACTION_ID);
    // act[1] = (Action)getAction(ShapeHideAction.ACTION_ID);
    // diagramToggleVisibleStateAction.setMenuCreator(new ActionMenu(act));
    // 
    addRetargetAction(new UndoRetargetAction());
    addRetargetAction(new RedoRetargetAction());
    addRetargetAction(new ZoomInRetargetAction());
    addRetargetAction(new ZoomOutRetargetAction());
    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));
}
Also used : ToggleAssociationAction(org.jboss.tools.hibernate.ui.diagram.editors.actions.ToggleAssociationAction) ConnectionRouterFanAction(org.jboss.tools.hibernate.ui.diagram.editors.actions.ConnectionRouterFanAction) IAction(org.eclipse.jface.action.IAction) TogglePropertyMappingAction(org.jboss.tools.hibernate.ui.diagram.editors.actions.TogglePropertyMappingAction) ToggleShapeVisibleStateAction(org.jboss.tools.hibernate.ui.diagram.editors.actions.ToggleShapeVisibleStateAction) AutoLayoutAction(org.jboss.tools.hibernate.ui.diagram.editors.actions.AutoLayoutAction) ToggleConnectionsAction(org.jboss.tools.hibernate.ui.diagram.editors.actions.ToggleConnectionsAction) ToggleClassMappingAction(org.jboss.tools.hibernate.ui.diagram.editors.actions.ToggleClassMappingAction) UndoRetargetAction(org.eclipse.gef.ui.actions.UndoRetargetAction) IWorkbenchAction(org.eclipse.ui.actions.ActionFactory.IWorkbenchAction) ShapeCollapseAction(org.jboss.tools.hibernate.ui.diagram.editors.actions.ShapeCollapseAction) ZoomOutRetargetAction(org.eclipse.gef.ui.actions.ZoomOutRetargetAction) ShapeShowAction(org.jboss.tools.hibernate.ui.diagram.editors.actions.ShapeShowAction) ToggleShapeExpandStateAction(org.jboss.tools.hibernate.ui.diagram.editors.actions.ToggleShapeExpandStateAction) ZoomInRetargetAction(org.eclipse.gef.ui.actions.ZoomInRetargetAction) Action(org.eclipse.jface.action.Action) DiagramBaseRetargetAction(org.jboss.tools.hibernate.ui.diagram.editors.actions.DiagramBaseRetargetAction) ShapeExpandAction(org.jboss.tools.hibernate.ui.diagram.editors.actions.ShapeExpandAction) RetargetAction(org.eclipse.ui.actions.RetargetAction) ShapeHideAction(org.jboss.tools.hibernate.ui.diagram.editors.actions.ShapeHideAction) RedoRetargetAction(org.eclipse.gef.ui.actions.RedoRetargetAction) ToggleForeignKeyConstraintAction(org.jboss.tools.hibernate.ui.diagram.editors.actions.ToggleForeignKeyConstraintAction) ConnectionRouterManhattanAction(org.jboss.tools.hibernate.ui.diagram.editors.actions.ConnectionRouterManhattanAction) RedoRetargetAction(org.eclipse.gef.ui.actions.RedoRetargetAction) DiagramBaseRetargetAction(org.jboss.tools.hibernate.ui.diagram.editors.actions.DiagramBaseRetargetAction) IWorkbenchAction(org.eclipse.ui.actions.ActionFactory.IWorkbenchAction) UndoRetargetAction(org.eclipse.gef.ui.actions.UndoRetargetAction) UndoRetargetAction(org.eclipse.gef.ui.actions.UndoRetargetAction) ZoomOutRetargetAction(org.eclipse.gef.ui.actions.ZoomOutRetargetAction) ZoomInRetargetAction(org.eclipse.gef.ui.actions.ZoomInRetargetAction) DiagramBaseRetargetAction(org.jboss.tools.hibernate.ui.diagram.editors.actions.DiagramBaseRetargetAction) RetargetAction(org.eclipse.ui.actions.RetargetAction) RedoRetargetAction(org.eclipse.gef.ui.actions.RedoRetargetAction) ActionMenu(org.jboss.tools.hibernate.ui.diagram.editors.actions.ActionMenu) ZoomInRetargetAction(org.eclipse.gef.ui.actions.ZoomInRetargetAction) ZoomOutRetargetAction(org.eclipse.gef.ui.actions.ZoomOutRetargetAction)

Example 5 with RetargetAction

use of org.eclipse.ui.actions.RetargetAction in project polymap4-core by Polymap4.

the class CommonNavigatorManager method init.

private void init(IMemento memento) {
    updateActionBars = new UpdateActionBarsJob(commonNavigator.getTitle());
    CommonViewer commonViewer = commonNavigator.getCommonViewer();
    commonViewer.addSelectionChangedListener(this);
    commonViewer.addPostSelectionChangedListener(statusBarListener);
    updateStatusBar(commonViewer.getSelection());
    ICommonViewerSite commonViewerSite = CommonViewerSiteFactory.createCommonViewerSite(commonNavigator.getViewSite());
    actionService = new NavigatorActionService(commonViewerSite, commonViewer, commonViewer.getNavigatorContentService());
    final RetargetAction openAction = new RetargetAction(ICommonActionConstants.OPEN, CommonNavigatorMessages.Open_action_label);
    commonNavigator.getViewSite().getPage().addPartListener(openAction);
    openAction.setActionDefinitionId(ICommonActionConstants.OPEN);
    if (memento != null)
        restoreState(memento);
    initContextMenu();
    initViewMenu();
}
Also used : RetargetAction(org.eclipse.ui.actions.RetargetAction)

Aggregations

RetargetAction (org.eclipse.ui.actions.RetargetAction)10 ZoomInRetargetAction (org.eclipse.gef.ui.actions.ZoomInRetargetAction)6 ZoomOutRetargetAction (org.eclipse.gef.ui.actions.ZoomOutRetargetAction)6 RedoRetargetAction (org.eclipse.gef.ui.actions.RedoRetargetAction)5 UndoRetargetAction (org.eclipse.gef.ui.actions.UndoRetargetAction)5 DeleteRetargetAction (org.eclipse.gef.ui.actions.DeleteRetargetAction)4 AlignmentRetargetAction (org.eclipse.gef.ui.actions.AlignmentRetargetAction)2 MatchHeightRetargetAction (org.eclipse.gef.ui.actions.MatchHeightRetargetAction)2 MatchWidthRetargetAction (org.eclipse.gef.ui.actions.MatchWidthRetargetAction)2 IMenuManager (org.eclipse.jface.action.IMenuManager)2 IToolBarManager (org.eclipse.jface.action.IToolBarManager)2 Separator (org.eclipse.jface.action.Separator)2 IPropertyChangeListener (org.eclipse.jface.util.IPropertyChangeListener)2 PropertyChangeEvent (org.eclipse.jface.util.PropertyChangeEvent)2 ComboViewer (org.eclipse.jface.viewers.ComboViewer)2 ISelection (org.eclipse.jface.viewers.ISelection)2 ISelectionChangedListener (org.eclipse.jface.viewers.ISelectionChangedListener)2 SelectionChangedEvent (org.eclipse.jface.viewers.SelectionChangedEvent)2 GridData (org.eclipse.swt.layout.GridData)2 Composite (org.eclipse.swt.widgets.Composite)2