Search in sources :

Example 1 with ClosePaneAction

use of org.eclipse.che.ide.part.editor.actions.ClosePaneAction in project che by eclipse.

the class EditorPartStackPresenter method initializePaneMenu.

private void initializePaneMenu() {
    paneMenuTabItemHandler = new PaneMenuTabItemHandler();
    paneMenuActionItemHandler = new PaneMenuActionItemHandler();
    final EditorPaneMenuItem<Action> closePaneItemWidget = editorPaneMenuItemFactory.createMenuItem(closePaneAction);
    closePaneItemWidget.setDelegate(paneMenuActionItemHandler);
    editorPaneMenu.addItem(closePaneItemWidget);
    final EditorPaneMenuItem<Action> closeAllTabsItemWidget = editorPaneMenuItemFactory.createMenuItem(closeAllTabsPaneAction);
    closeAllTabsItemWidget.setDelegate(paneMenuActionItemHandler);
    editorPaneMenu.addItem(closeAllTabsItemWidget, true);
    final Action splitHorizontallyAction = actionManager.getAction(SPLIT_HORIZONTALLY);
    final EditorPaneMenuItem<Action> splitHorizontallyItemWidget = editorPaneMenuItemFactory.createMenuItem(splitHorizontallyAction);
    splitHorizontallyItemWidget.setDelegate(paneMenuActionItemHandler);
    editorPaneMenu.addItem(splitHorizontallyItemWidget);
    final Action splitVerticallyAction = actionManager.getAction(SPLIT_VERTICALLY);
    final EditorPaneMenuItem<Action> splitVerticallyItemWidget = editorPaneMenuItemFactory.createMenuItem(splitVerticallyAction);
    splitVerticallyItemWidget.setDelegate(paneMenuActionItemHandler);
    editorPaneMenu.addItem(splitVerticallyItemWidget);
}
Also used : CloseAllTabsPaneAction(org.eclipse.che.ide.part.editor.actions.CloseAllTabsPaneAction) ClosePaneAction(org.eclipse.che.ide.part.editor.actions.ClosePaneAction) Action(org.eclipse.che.ide.api.action.Action)

Aggregations

Action (org.eclipse.che.ide.api.action.Action)1 CloseAllTabsPaneAction (org.eclipse.che.ide.part.editor.actions.CloseAllTabsPaneAction)1 ClosePaneAction (org.eclipse.che.ide.part.editor.actions.ClosePaneAction)1