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

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

Introduction

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

Prototype

String GROUP_TESTTREE_POPUP

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

Click Source Link

Usage

From source file:com.intellij.execution.testframework.sm.runner.ui.statistics.StatisticsPanel.java

License:Apache License

public StatisticsPanel(final Project project, final TestFrameworkRunningModel model) {
    myProject = project;/*from  ww  w.j  a v  a2s . c o  m*/
    myTableModel = new StatisticsTableModel();
    myStatisticsTableView.setModelAndUpdateColumns(myTableModel);
    myFrameworkRunningModel = model;

    final Runnable gotoSuiteOrParentAction = createGotoSuiteOrParentAction();
    new DoubleClickListener() {
        @Override
        protected boolean onDoubleClick(MouseEvent e) {
            gotoSuiteOrParentAction.run();
            return true;
        }
    }.installOn(myStatisticsTableView);

    // Fire selection changed and move focus on SHIFT+ENTER
    final KeyStroke shiftEnterKey = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, InputEvent.SHIFT_MASK);
    SMRunnerUtil.registerAsAction(shiftEnterKey, "select-test-proxy-in-test-view", new Runnable() {
        public void run() {
            showSelectedProxyInTestsTree();
        }
    }, myStatisticsTableView);

    // Expand selected or go to parent on ENTER
    final KeyStroke enterKey = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0);
    SMRunnerUtil.registerAsAction(enterKey, "go-to-selected-suite-or-parent", gotoSuiteOrParentAction,
            myStatisticsTableView);
    // Contex menu in Table
    PopupHandler.installPopupHandler(myStatisticsTableView, IdeActions.GROUP_TESTTREE_POPUP,
            ActionPlaces.TESTTREE_VIEW_POPUP);
    // set this statistic tab as dataprovider for test's table view
    DataManager.registerDataProvider(myStatisticsTableView, this);
}

From source file:com.intellij.execution.testframework.TestTreeView.java

License:Apache License

protected void installHandlers() {
    EditSourceOnDoubleClickHandler.install(this);
    new TreeSpeedSearch(this, new Convertor<TreePath, String>() {
        public String convert(final TreePath path) {
            final AbstractTestProxy testProxy = getSelectedTest(path);
            if (testProxy == null)
                return null;
            return testProxy.getName();
        }//  w  w w  .  j  ava 2  s.c  om
    });
    TreeUtil.installActions(this);
    PopupHandler.installPopupHandler(this, IdeActions.GROUP_TESTTREE_POPUP, ActionPlaces.TESTTREE_VIEW_POPUP);
    ViewAssertEqualsDiffAction.registerShortcut(this);
}