Search in sources :

Example 1 with DeleteRetargetAction

use of org.eclipse.gef.ui.actions.DeleteRetargetAction 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 DeleteRetargetAction

use of org.eclipse.gef.ui.actions.DeleteRetargetAction in project cubrid-manager by CUBRID.

the class ReplEditorActionBarContributor method buildActions.

/**
	 * Build actions
	 */
protected void buildActions() {
    addRetargetAction(new UndoRetargetAction());
    addRetargetAction(new RedoRetargetAction());
    addRetargetAction(new EditRetargetAction());
    addRetargetAction(new DeleteRetargetAction());
    addRetargetAction(new ZoomInRetargetAction());
    addRetargetAction(new ZoomOutRetargetAction());
    addRetargetAction(new AlignmentRetargetAction(PositionConstants.LEFT));
    addRetargetAction(new AlignmentRetargetAction(PositionConstants.CENTER));
    addRetargetAction(new AlignmentRetargetAction(PositionConstants.RIGHT));
    addRetargetAction(new AlignmentRetargetAction(PositionConstants.TOP));
    addRetargetAction(new AlignmentRetargetAction(PositionConstants.MIDDLE));
    addRetargetAction(new AlignmentRetargetAction(PositionConstants.BOTTOM));
}
Also used : RedoRetargetAction(org.eclipse.gef.ui.actions.RedoRetargetAction) AlignmentRetargetAction(org.eclipse.gef.ui.actions.AlignmentRetargetAction) UndoRetargetAction(org.eclipse.gef.ui.actions.UndoRetargetAction) DeleteRetargetAction(org.eclipse.gef.ui.actions.DeleteRetargetAction) ZoomInRetargetAction(org.eclipse.gef.ui.actions.ZoomInRetargetAction) ZoomOutRetargetAction(org.eclipse.gef.ui.actions.ZoomOutRetargetAction) EditRetargetAction(com.cubrid.cubridmanager.ui.replication.editor.action.EditRetargetAction)

Example 3 with DeleteRetargetAction

use of org.eclipse.gef.ui.actions.DeleteRetargetAction 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 DeleteRetargetAction

use of org.eclipse.gef.ui.actions.DeleteRetargetAction in project yamcs-studio by yamcs.

the class OPIEditorActionBarContributor method buildActions.

@Override
protected void buildActions() {
    addRetargetAction(new UndoRetargetAction());
    addRetargetAction(new RedoRetargetAction());
    addRetargetAction(new DeleteRetargetAction());
    addRetargetAction(new ZoomInRetargetAction());
    addRetargetAction(new ZoomOutRetargetAction());
    addRetargetAction(new MatchWidthRetargetAction());
    addRetargetAction(new MatchHeightRetargetAction());
    addRetargetAction(new AlignmentRetargetAction(PositionConstants.TOP));
    addRetargetAction(new AlignmentRetargetAction(PositionConstants.MIDDLE));
    addRetargetAction(new AlignmentRetargetAction(PositionConstants.BOTTOM));
    addRetargetAction(new AlignmentRetargetAction(PositionConstants.LEFT));
    addRetargetAction(new AlignmentRetargetAction(PositionConstants.CENTER));
    addRetargetAction(new AlignmentRetargetAction(PositionConstants.RIGHT));
    RetargetAction a = new RetargetAction(GEFActionConstants.TOGGLE_GRID_VISIBILITY, "Toggle Grid Visibility", IAction.AS_CHECK_BOX);
    a.setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(OPIBuilderPlugin.PLUGIN_ID, // $NON-NLS-1$
    "icons/grid.png"));
    addRetargetAction(a);
    a = new RetargetAction(GEFActionConstants.TOGGLE_SNAP_TO_GEOMETRY, "Toggle Snap To Geometry", IAction.AS_CHECK_BOX);
    a.setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(OPIBuilderPlugin.PLUGIN_ID, "icons/snap2geometry.png"));
    addRetargetAction(a);
    a = new RetargetAction(GEFActionConstants.TOGGLE_RULER_VISIBILITY, "Toggle Ruler Visibility", IAction.AS_CHECK_BOX);
    a.setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(OPIBuilderPlugin.PLUGIN_ID, "icons/ruler.png"));
    addRetargetAction(a);
    for (DistributeType dt : DistributeType.values()) {
        if (dt != DistributeType.HORIZONTAL_GAP) {
            a = new RetargetAction(dt.getActionID(), dt.getLabel());
            a.setImageDescriptor(dt.getImageDescriptor());
            addRetargetAction(a);
        }
    }
    // This is only for action displaying in toolbar
    a = new RetargetAction(DistributeType.HORIZONTAL_GAP.getActionID(), DistributeType.HORIZONTAL_GAP.getLabel(), IAction.AS_DROP_DOWN_MENU);
    a.setImageDescriptor(DistributeType.HORIZONTAL_GAP.getImageDescriptor());
    a.setMenuCreator(new IMenuCreator() {

        Menu menu;

        @Override
        public Menu getMenu(Menu parent) {
            return null;
        }

        @Override
        public Menu getMenu(Control parent) {
            if (menu != null)
                return menu;
            MenuManager manager = new MenuManager();
            for (DistributeType dt : DistributeType.values()) {
                if (dt != DistributeType.HORIZONTAL_GAP)
                    manager.add(getAction(dt.getActionID()));
            }
            menu = manager.createContextMenu(parent);
            return menu;
        }

        @Override
        public void dispose() {
            if (menu != null) {
                menu.dispose();
                menu = null;
            }
        }
    });
    addRetargetAction(a);
}
Also used : RedoRetargetAction(org.eclipse.gef.ui.actions.RedoRetargetAction) UndoRetargetAction(org.eclipse.gef.ui.actions.UndoRetargetAction) ZoomOutRetargetAction(org.eclipse.gef.ui.actions.ZoomOutRetargetAction) AlignmentRetargetAction(org.eclipse.gef.ui.actions.AlignmentRetargetAction) MatchHeightRetargetAction(org.eclipse.gef.ui.actions.MatchHeightRetargetAction) ZoomInRetargetAction(org.eclipse.gef.ui.actions.ZoomInRetargetAction) MatchWidthRetargetAction(org.eclipse.gef.ui.actions.MatchWidthRetargetAction) RetargetAction(org.eclipse.ui.actions.RetargetAction) RedoRetargetAction(org.eclipse.gef.ui.actions.RedoRetargetAction) DeleteRetargetAction(org.eclipse.gef.ui.actions.DeleteRetargetAction) IMenuCreator(org.eclipse.jface.action.IMenuCreator) DeleteRetargetAction(org.eclipse.gef.ui.actions.DeleteRetargetAction) MatchWidthRetargetAction(org.eclipse.gef.ui.actions.MatchWidthRetargetAction) ZoomInRetargetAction(org.eclipse.gef.ui.actions.ZoomInRetargetAction) DistributeType(org.csstudio.opibuilder.actions.DistributeWidgetsAction.DistributeType) MatchHeightRetargetAction(org.eclipse.gef.ui.actions.MatchHeightRetargetAction) Control(org.eclipse.swt.widgets.Control) AlignmentRetargetAction(org.eclipse.gef.ui.actions.AlignmentRetargetAction) UndoRetargetAction(org.eclipse.gef.ui.actions.UndoRetargetAction) MenuManager(org.eclipse.jface.action.MenuManager) ZoomOutRetargetAction(org.eclipse.gef.ui.actions.ZoomOutRetargetAction) Menu(org.eclipse.swt.widgets.Menu)

Aggregations

DeleteRetargetAction (org.eclipse.gef.ui.actions.DeleteRetargetAction)4 RedoRetargetAction (org.eclipse.gef.ui.actions.RedoRetargetAction)4 UndoRetargetAction (org.eclipse.gef.ui.actions.UndoRetargetAction)4 ZoomInRetargetAction (org.eclipse.gef.ui.actions.ZoomInRetargetAction)4 ZoomOutRetargetAction (org.eclipse.gef.ui.actions.ZoomOutRetargetAction)4 RetargetAction (org.eclipse.ui.actions.RetargetAction)3 AlignmentRetargetAction (org.eclipse.gef.ui.actions.AlignmentRetargetAction)2 EditRetargetAction (com.cubrid.cubridmanager.ui.replication.editor.action.EditRetargetAction)1 DistributeType (org.csstudio.opibuilder.actions.DistributeWidgetsAction.DistributeType)1 MatchHeightRetargetAction (org.eclipse.gef.ui.actions.MatchHeightRetargetAction)1 MatchWidthRetargetAction (org.eclipse.gef.ui.actions.MatchWidthRetargetAction)1 IMenuCreator (org.eclipse.jface.action.IMenuCreator)1 MenuManager (org.eclipse.jface.action.MenuManager)1 Control (org.eclipse.swt.widgets.Control)1 Menu (org.eclipse.swt.widgets.Menu)1 ToggleSubjobsRetargetAction (org.talend.designer.core.ui.action.ToggleSubjobsRetargetAction)1