Java 类org.eclipse.gef.ui.actions.SelectionAction 实例源码

项目:erflute    文件:MainDiagramEditor.java   
@Override
@SuppressWarnings("unchecked")
protected void createActions() {
    super.createActions();
    final ActionRegistry registry = getActionRegistry();
    final List<String> selectionActionList = getSelectionActions();
    final List<IAction> actionList = new ArrayList<>(Arrays.asList(new IAction[] { new ChangeViewToLogicalAction(this),
            new ChangeViewToPhysicalAction(this), new ChangeViewToBothAction(this), new ChangeToIENotationAction(this),
            new ChangeToIDEF1XNotationAction(this), new ChangeNotationLevelToColumnAction(this),
            new ChangeNotationLevelToExcludeTypeAction(this), new ChangeNotationLevelToDetailAction(this),
            new ChangeNotationLevelToOnlyTitleAction(this), new ChangeNotationLevelToOnlyKeyAction(this),
            new ChangeNotationLevelToNameAndKeyAction(this), new ChangeNotationExpandGroupAction(this),
            new ChangeDesignToFunnyAction(this), new ChangeDesignToFrameAction(this), new ChangeDesignToSimpleAction(this),
            new ChangeCapitalAction(this), new ChangeStampAction(this), new ColumnGroupManageAction(this),
            /* #deleted new ChangeTrackingAction(this), */new OptionSettingAction(this),
            /* #deleted new CategoryManageAction(this), */new ChangeFreeLayoutAction(this),
            new ChangeShowReferredTablesAction(this), /* #deleted new TranslationManageAction(this), */
            /* #deleted new TestDataCreateAction(this), */new ImportFromDBAction(this), new ImportFromFileAction(this),
            new ExportToImageAction(this), /* #deleted new ExportToExcelAction(this), */
            /* #deleted new ExportToHtmlAction(this), new ExportToJavaAction(this), */new ExportToDDLAction(this),
            /* #deleted new ExportToDictionaryAction(this), new ExportToTranslationDictionaryAction(this), */
            /* #deleted new ExportToTestDataAction(this), */new PageSettingAction(this),
            /* #deleted new EditAllAttributesAction(this), */
            new DirectEditAction((IWorkbenchPart) this), new ERDiagramAlignmentAction(this, PositionConstants.LEFT),
            new ERDiagramAlignmentAction(this, PositionConstants.CENTER), new ERDiagramAlignmentAction(this, PositionConstants.RIGHT),
            new ERDiagramAlignmentAction(this, PositionConstants.TOP), new ERDiagramAlignmentAction(this, PositionConstants.MIDDLE),
            new ERDiagramAlignmentAction(this, PositionConstants.BOTTOM), new ERDiagramMatchWidthAction(this),
            new ERDiagramMatchHeightAction(this), new HorizontalLineAction(this), new VerticalLineAction(this),
            new RightAngleLineAction(this), new DefaultLineAction(this), new CopyAction(this), new PasteAction(this),
            new SearchAction(this), new ResizeModelAction(this), new PrintImageAction(this), new DeleteWithoutUpdateAction(this),
            new SelectAllContentsAction(this), new VirtualDiagramAddAction(this), new ERDiagramQuickOutlineAction(this), }));
    Activator.debug(this, "createActions()", "...Preparing diagram actions: " + actionList.size());
    actionList.addAll(extensionLoader.createExtendedActions());
    for (final IAction action : actionList) {
        if (action instanceof SelectionAction) {
            final IAction originalAction = registry.getAction(action.getId());
            if (originalAction != null) {
                selectionActionList.remove(originalAction);
            }
            selectionActionList.add(action.getId());
        }
        registry.registerAction(action);
    }
    addKeyHandler(registry.getAction(SearchAction.ID));
    addKeyHandler(registry.getAction(ERDiagramQuickOutlineAction.ID));
}
项目:snaker-designer    文件:SnakerFlowDesignerEditor.java   
public void registerAction(SelectionAction action) {
    getActionRegistry().registerAction(action);
    this.editPartActionIDs.add(action.getId());
}
项目:birt    文件:GraphicalEditorWithFlyoutPalette.java   
protected void removeEditPartAction( SelectionAction action )
{
    getActionRegistry( ).removeAction( action );
    editPartActionIDs.remove( action.getId( ) );
}
项目:birt    文件:GraphicalEditorWithFlyoutPalette.java   
/**
 * Adds an <code>EditPart</code> action to this editor.
 * 
 * <p>
 * <code>EditPart</code> actions are actions that depend and work on the
 * selected <code>EditPart</code>s.
 * 
 * @param action
 *            the <code>EditPart</code> action
 */
protected void addEditPartAction( SelectionAction action )
{
    getActionRegistry( ).registerAction( action );
    editPartActionIDs.add( action.getId( ) );
}
项目:seg.jUCMNav    文件:ActionRegistryManager.java   
/**
 * Adds an <code>EditPart</code> action to this editor.
 * 
 * <p>
 * <code>EditPart</code> actions are actions that depend and work on the selected <code>EditPart</code>s.
 * 
 * @param action
 *            the <code>EditPart</code> action
 */
public void addEditPartAction(SelectionAction action) {
    getActionRegistry().registerAction(action);
    editPartActionIDs.add(action.getId());
}