Package com.volantis.mcs.eclipse.ab.actions

Examples of com.volantis.mcs.eclipse.ab.actions.DefaultActionCommand


    protected static void populateUndefinedSubMenuActions(Map actions) {
        // Build the New sub-menu
        SubMenuAction newMenu =
                (SubMenuAction) actions.get(ActionID.UNDEFINED_NEW_MENU);

        newMenu.add(new ODOMAction(new DefaultActionCommand(),
                BUNDLE,
                "dummy")); //$NON-NLS-1$

        // Build the Wrap sub-menu
        SubMenuAction wrapMenu =
                (SubMenuAction) actions.get(ActionID.UNDEFINED_WRAP_MENU);

        wrapMenu.add(new ODOMAction(new DefaultActionCommand(),
                BUNDLE,
                "dummy")); //$NON-NLS-1$
    }
View Full Code Here


                        null,
                        LayoutActions.BUNDLE,
                        ActionID.CANVAS_NEW_MENU.getPrefix()));
        actions.put(ActionID.NEW_PANE_MENU,
                new SubMenuAction(
                        new DefaultActionCommand(),
                        LayoutActions.BUNDLE,
                        ActionID.NEW_PANE_MENU.getPrefix()));
        actions.put(ActionID.NEW_PANE,
                new ODOMAction(
                        new NewNonGridFormatActionCommand(
                                FormatType.PANE,
                                manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.NEW_PANE.getPrefix()));
        actions.put(ActionID.NEW_ROW_ITERATOR_PANE,
                new ODOMAction(
                        new NewNonGridFormatActionCommand(
                                FormatType.ROW_ITERATOR_PANE,
                                manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.NEW_ROW_ITERATOR_PANE.getPrefix()));
        actions.put(ActionID.NEW_COLUMN_ITERATOR_PANE,
                new ODOMAction(
                        new NewNonGridFormatActionCommand(
                                FormatType.COLUMN_ITERATOR_PANE,
                                manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.NEW_COLUMN_ITERATOR_PANE.getPrefix()));
        actions.put(ActionID.NEW_DISSECTING_PANE,
                new ODOMAction(
                        new NewNonGridFormatActionCommand(
                                FormatType.DISSECTING_PANE,
                                manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.NEW_DISSECTING_PANE.getPrefix()));
        actions.put(ActionID.NEW_ITERATOR_MENU,
                new SubMenuAction(
                        new DefaultActionCommand(),
                        LayoutActions.BUNDLE,
                        ActionID.NEW_ITERATOR_MENU.getPrefix()));
        actions.put(ActionID.NEW_SPATIAL_ITERATOR,
                new ODOMAction(
                        new NewNonGridFormatActionCommand(
                                FormatType.SPATIAL_FORMAT_ITERATOR,
                                manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.NEW_SPATIAL_ITERATOR.getPrefix()));
        actions.put(ActionID.NEW_TEMPORAL_ITERATOR,
                new ODOMAction(
                        new NewNonGridFormatActionCommand(
                                FormatType.TEMPORAL_FORMAT_ITERATOR,
                                manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.NEW_TEMPORAL_ITERATOR.getPrefix()));
        actions.put(ActionID.NEW_GRID_MENU,
                new SubMenuAction(
                        new DefaultActionCommand(),
                        LayoutActions.BUNDLE,
                        ActionID.NEW_GRID_MENU.getPrefix()));
        actions.put(ActionID.NEW_2_COLUMN_GRID,
                new ODOMAction(
                        new NewGridFormatActionCommand(FormatType.GRID,
                                manager) {
                            protected Dimension getGridDimensions() {
                                return new Dimension(2, 1);
                            }
                        },
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.NEW_2_COLUMN_GRID.getPrefix()));
        actions.put(ActionID.NEW_3_ROW_GRID,
                new ODOMAction(
                        new NewGridFormatActionCommand(FormatType.GRID,
                                manager) {
                            protected Dimension getGridDimensions() {
                                return new Dimension(1, 3);
                            }
                        },
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.NEW_3_ROW_GRID.getPrefix()));
        actions.put(ActionID.NEW_N_BY_M_GRID,
                new ODOMAction(
                        new NewGridFormatActionCommand(FormatType.GRID,
                                manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.NEW_N_BY_M_GRID.getPrefix()));
        actions.put(ActionID.NEW_FRAGMENT,
                new ODOMAction(
                        new NewNonGridFormatActionCommand(
                                FormatType.FRAGMENT, manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.NEW_FRAGMENT.getPrefix()));
        actions.put(ActionID.NEW_FORM,
                new ODOMAction(
                        new NewNonGridFormatActionCommand(
                                FormatType.FORM,
                                manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.NEW_FORM.getPrefix()));
        actions.put(ActionID.NEW_REGION,
                new ODOMAction(
                        new NewNonGridFormatActionCommand(
                                FormatType.REGION,
                                manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.NEW_REGION.getPrefix()));
        actions.put(ActionID.NEW_REPLICA,
                new ODOMAction(
                        new NewNonGridFormatActionCommand(
                                FormatType.REPLICA,
                                manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.NEW_REPLICA.getPrefix()));
        actions.put(ActionID.NEW_FORM_FRAGMENT,
                new ODOMAction(
                        new NewNonGridFormatActionCommand(
                                FormatType.FORM_FRAGMENT,
                                manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.NEW_FORM_FRAGMENT.getPrefix()));

        actions.put(ActionID.MONTAGE_NEW_MENU,
                new SubMenuAction(
                        new NewMenuActionCommand(manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.MONTAGE_NEW_MENU.getPrefix()));
        actions.put(ActionID.NEW_SEGMENT_GRID_MENU,
                new SubMenuAction(
                        new DefaultActionCommand(),
                        LayoutActions.BUNDLE,
                        ActionID.NEW_SEGMENT_GRID_MENU.getPrefix()));
        actions.put(ActionID.NEW_2_COLUMN_SEGMENT_GRID,
                new ODOMAction(
                        new NewGridFormatActionCommand(
                                FormatType.SEGMENT_GRID,
                                manager) {
                            protected Dimension getGridDimensions() {
                                return new Dimension(2, 1);
                            }
                        },
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.NEW_2_COLUMN_SEGMENT_GRID.getPrefix()));
        actions.put(ActionID.NEW_3_ROW_SEGMENT_GRID,
                new ODOMAction(
                        new NewGridFormatActionCommand(
                                FormatType.SEGMENT_GRID,
                                manager) {
                            protected Dimension getGridDimensions() {
                                return new Dimension(1, 3);
                            }
                        },
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.NEW_3_ROW_SEGMENT_GRID.getPrefix()));
        actions.put(ActionID.NEW_N_BY_M_SEGMENT_GRID,
                new ODOMAction(
                        new NewGridFormatActionCommand(
                                FormatType.SEGMENT_GRID,
                                manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.NEW_N_BY_M_SEGMENT_GRID.getPrefix()));
        actions.put(ActionID.NEW_SEGMENT,
                new ODOMAction(
                        new NewNonGridFormatActionCommand(
                                FormatType.SEGMENT,
                                manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.NEW_SEGMENT.getPrefix()));

        actions.put(ActionID.UNDEFINED_NEW_MENU,
                new SubMenuAction(
                        new DefaultActionCommand() {
                            // javadoc inherited
                            public boolean enable(ODOMActionDetails context) {
                                return false;
                            }
                        },
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.UNDEFINED_NEW_MENU.getPrefix()));

        actions.put(ActionID.CANVAS_WRAP_MENU,
                new SubMenuAction(
                        new WrapMenuActionCommand(manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.CANVAS_WRAP_MENU.getPrefix()));
        actions.put(ActionID.WRAP_ITERATOR_MENU,
                new SubMenuAction(
                        new DefaultActionCommand(),
                        LayoutActions.BUNDLE,
                        ActionID.WRAP_ITERATOR_MENU.getPrefix()));
        actions.put(ActionID.WRAP_SPATIAL_ITERATOR,
                new ODOMAction(
                        new WrapNonGridFormatActionCommand(
                                FormatType.SPATIAL_FORMAT_ITERATOR,
                                manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.WRAP_SPATIAL_ITERATOR.getPrefix()));
        actions.put(ActionID.WRAP_TEMPORAL_ITERATOR,
                new ODOMAction(
                        new WrapNonGridFormatActionCommand(
                                FormatType.TEMPORAL_FORMAT_ITERATOR,
                                manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.WRAP_TEMPORAL_ITERATOR.getPrefix()));
        actions.put(ActionID.WRAP_N_BY_M_GRID,
                new ODOMAction(
                        new WrapGridFormatActionCommand(FormatType.GRID,
                                manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.WRAP_N_BY_M_GRID.getPrefix()));
        actions.put(ActionID.WRAP_FRAGMENT,
                new ODOMAction(
                        new WrapNonGridFormatActionCommand(
                                FormatType.FRAGMENT, manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.WRAP_FRAGMENT.getPrefix()));
        actions.put(ActionID.WRAP_FORM,
                new ODOMAction(
                        new WrapNonGridFormatActionCommand(
                                FormatType.FORM,
                                manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.WRAP_FORM.getPrefix()));
        actions.put(ActionID.WRAP_FORM_FRAGMENT,
                new ODOMAction(
                        new WrapNonGridFormatActionCommand(
                                FormatType.FORM_FRAGMENT,
                                manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.WRAP_FORM_FRAGMENT.getPrefix()));

        actions.put(ActionID.MONTAGE_WRAP_MENU,
                new SubMenuAction(
                        new WrapMenuActionCommand(manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.MONTAGE_WRAP_MENU.getPrefix()));
        actions.put(ActionID.WRAP_N_BY_M_SEGMENT_GRID,
                new ODOMAction(
                        new WrapGridFormatActionCommand(
                                FormatType.SEGMENT_GRID,
                                manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.WRAP_N_BY_M_SEGMENT_GRID.getPrefix()));

        actions.put(ActionID.UNDEFINED_WRAP_MENU,
                new SubMenuAction(
                        new DefaultActionCommand() {
                            // javadoc inherited
                            public boolean enable(ODOMActionDetails context) {
                                return false;
                            }
                        },
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.UNDEFINED_WRAP_MENU.getPrefix()));

        actions.put(ActionID.CUT,
                new ODOMAction(
                        new CutActionCommand(
                                EclipseCommonPlugin.getClipboard(
                                        Display.getDefault()), manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.CUT.getPrefix()));
        actions.put(ActionID.COPY,
                new ODOMAction(
                        new CopyActionCommand(
                                EclipseCommonPlugin.getClipboard(
                                        Display.getDefault()), manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.COPY.getPrefix()));
        actions.put(ActionID.PASTE,
                new ODOMAction(
                        new PasteActionCommand(
                                EclipseCommonPlugin.getClipboard(
                                        Display.getDefault()),
                                context),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.PASTE.getPrefix()));
        actions.put(ActionID.DELETE,
                new ODOMAction(
                        new DeleteActionCommand(manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.DELETE.getPrefix()));
        actions.put(ActionID.REPLACE,
                new ODOMAction(
                        new ReplaceActionCommand(
                                EclipseCommonPlugin.getClipboard(
                                        Display.getDefault()),
                                context),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.REPLACE.getPrefix()));
        actions.put(ActionID.SWAP,
                new ODOMAction(new SwapActionCommand(manager),
                        context,
                        null,
                        LayoutActions.BUNDLE,
                        ActionID.SWAP.getPrefix()));
        actions.put(ActionID.GRID_MODIFY_MENU,
                new SubMenuAction(
                        // @todo later implement: placeholder only
                        new DefaultActionCommand(),
                        LayoutActions.BUNDLE,
                        ActionID.GRID_MODIFY_MENU.getPrefix()));
        actions.put(ActionID.INSERT_ROWS,
                new ODOMAction(
                        new RowInsertActionCommand(manager),
View Full Code Here

TOP

Related Classes of com.volantis.mcs.eclipse.ab.actions.DefaultActionCommand

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.