Example usage for com.intellij.openapi.actionSystem IdeActions ACTION_CUT

List of usage examples for com.intellij.openapi.actionSystem IdeActions ACTION_CUT

Introduction

In this page you can find the example usage for com.intellij.openapi.actionSystem IdeActions ACTION_CUT.

Prototype

String ACTION_CUT

To view the source code for com.intellij.openapi.actionSystem IdeActions ACTION_CUT.

Click Source Link

Usage

From source file:com.android.tools.idea.uibuilder.editor.NlActionManager.java

License:Apache License

@NotNull
private DefaultActionGroup createPopupMenu(@NotNull ActionManager actionManager,
        @Nullable ScreenView screenView, @Nullable NlComponent leafComponent) {
    DefaultActionGroup group = new DefaultActionGroup();

    if (screenView != null) {
        if (leafComponent != null) {
            addViewHandlerActions(group, leafComponent, screenView.getSelectionModel().getSelection());
        }//from  www . j a v a  2 s.c  o  m

        group.add(createSelectActionGroup(screenView.getSelectionModel()));
        group.addSeparator();
    }

    group.add(new MockupEditAction(mySurface));
    if (leafComponent != null && Mockup.hasMockupAttribute(leafComponent)) {
        group.add(new MockupDeleteAction(leafComponent));
    }
    group.addSeparator();

    group.add(actionManager.getAction(IdeActions.ACTION_CUT));
    group.add(actionManager.getAction(IdeActions.ACTION_COPY));
    group.add(actionManager.getAction(IdeActions.ACTION_PASTE));
    group.addSeparator();
    group.add(actionManager.getAction(IdeActions.ACTION_DELETE));
    group.addSeparator();
    group.add(myGotoComponentAction);
    group.add(createRefactoringMenu());
    group.add(new SaveScreenshotAction(mySurface));

    if (ConvertToConstraintLayoutAction.ENABLED) {
        group.addSeparator();
        group.add(new ConvertToConstraintLayoutAction(mySurface));
    }

    return group;
}

From source file:org.cordovastudio.editors.designer.actions.DesignerActionPanel.java

License:Apache License

public DesignerActionPanel(CordovaDesignerEditorPanel designer, JComponent shortcuts) {
    myDesigner = designer;/*from  w w w. j  ava 2s  .com*/
    myCommonEditActionsProvider = new CommonEditActionsProvider(designer);
    myShortcuts = shortcuts;

    createInplaceEditingAction(myShortcuts).setDesignerPanel(designer);

    myActionGroup = createActionGroup();
    myToolbar = createToolbar();

    ActionManager actionManager = ActionManager.getInstance();
    myPopupGroup.add(actionManager.getAction(IdeActions.ACTION_CUT));
    myPopupGroup.add(actionManager.getAction(IdeActions.ACTION_COPY));
    myPopupGroup.add(actionManager.getAction(IdeActions.ACTION_PASTE));
    myPopupGroup.addSeparator();
    myPopupGroup.add(actionManager.getAction(IdeActions.ACTION_DELETE));
    myPopupGroup.addSeparator();
    myPopupGroup.add(createSelectActionGroup(designer));
    myPopupGroup.addSeparator();
    myPopupGroup.add(myDynamicPopupGroup);

    designer.getSurfaceArea().addSelectionListener(new ComponentSelectionListener() {
        @Override
        public void selectionChanged(IEditableArea area) {
            updateSelectionActions(area.getSelection());
        }
    });
}

From source file:org.cordovastudio.editors.designer.CordovaDesignerActionPanel.java

License:Apache License

public CordovaDesignerActionPanel(CordovaDesignerEditorPanel designer, JComponent shortcuts) {
    myDesigner = designer;/*  w  w  w  .  j ava 2s. com*/
    myCommonEditActionsProvider = new CommonEditActionsProvider(designer);
    myShortcuts = shortcuts;

    createInplaceEditingAction(myShortcuts).setDesignerPanel(designer);

    myActionGroup = createActionGroup();
    myToolbar = createToolbar();

    ActionManager actionManager = ActionManager.getInstance();
    myPopupGroup.add(actionManager.getAction(IdeActions.ACTION_CUT));
    myPopupGroup.add(actionManager.getAction(IdeActions.ACTION_COPY));
    myPopupGroup.add(actionManager.getAction(IdeActions.ACTION_PASTE));
    myPopupGroup.addSeparator();
    myPopupGroup.add(actionManager.getAction(IdeActions.ACTION_DELETE));
    myPopupGroup.addSeparator();
    myPopupGroup.add(createSelectActionGroup(designer));
    myPopupGroup.addSeparator();
    myPopupGroup.add(myDynamicPopupGroup);

    designer.getSurfaceArea().addSelectionListener(new ComponentSelectionListener() {
        @Override
        public void selectionChanged(IEditableArea area) {
            updateSelectionActions(area.getSelection());
        }
    });
}

From source file:org.jetbrains.jet.plugin.codeInsight.AbstractInsertImportOnPasteTest.java

License:Apache License

public void doTestCut(String path) throws Exception {
    doTestAction(IdeActions.ACTION_CUT, path);
}