Package com.intellij.openapi.actionSystem

Examples of com.intellij.openapi.actionSystem.AnAction


            builder.setCenterPanel(diffPanel.getComponent());
            builder.setPreferredFocusComponent(diffPanel.getPreferredFocusedComponent());
            builder.setTitle(request.getWindowTitle());
            builder.setDimensionServiceKey(request.getGroupKey());

            new AnAction() {
                public void actionPerformed(final AnActionEvent e) {
                    builder.getDialogWrapper().close(0);
                }
            }.registerCustomShortcutSet(new CustomShortcutSet(KeymapManager.getInstance().getActiveKeymap().getShortcuts("CloseContent")),
                    diffPanel.getComponent());
            showDiffDialog(builder, hints);
        }
        else {
            final FrameWrapper frameWrapper = new FrameWrapper(request.getProject(), request.getGroupKey());
            DiffPanelImpl diffPanel = createDiffPanelIfShouldShow(request, frameWrapper.getFrame(), frameWrapper, true);
            if (diffPanel == null) {
                Disposer.dispose(frameWrapper);
                return;
            }
            if (hints.contains(DiffTool.HINT_DIFF_IS_APPROXIMATE)) {
                diffPanel.setPatchAppliedApproximately();
            }
            frameWrapper.setTitle(request.getWindowTitle());
            DiffUtil.initDiffFrame(diffPanel.getProject(), frameWrapper, diffPanel, diffPanel.getComponent());

            new AnAction() {
                public void actionPerformed(final AnActionEvent e) {
                    frameWrapper.getFrame().dispose();
                }
            }.registerCustomShortcutSet(new CustomShortcutSet(KeymapManager.getInstance().getActiveKeymap().getShortcuts("CloseContent")),
                    diffPanel.getComponent());
View Full Code Here


    myTreeCellRenderer = cellRenderer;
    myTreeView.setTreeCellRenderer(cellRenderer);
  }

  public AnAction getExpandAllAction() {
    return new AnAction(UIBundle.message("tree.view.expand.all.action.name"), null, IconLoader.getIcon("/actions/expandall.png")) {
      public void update(AnActionEvent e) {
        Presentation presentation = e.getPresentation();
        presentation.setVisible(true);
        presentation.setEnabled(myCurrentView == myTreeView);
      }
View Full Code Here

      }
    };
  }

  public AnAction getCollapseAllAction() {
    return new AnAction(UIBundle.message("tree.view.collapse.all.action.name"), null, IconLoader.getIcon("/actions/collapseall.png")) {
      public void update(AnActionEvent e) {
        Presentation presentation = e.getPresentation();
        presentation.setVisible(true);
        presentation.setEnabled(myCurrentView == myTreeView);
      }
View Full Code Here

            myChangeListener.run();
          }
        }
      });

      new AnAction() {
        public void actionPerformed(AnActionEvent e) {
          doOKAction();
        }
      }.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0)), myTextArea);
View Full Code Here

TOP

Related Classes of com.intellij.openapi.actionSystem.AnAction

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.