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

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

Introduction

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

Prototype

String ACTION_DEFAULT_RUNNER

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

Click Source Link

Usage

From source file:com.intellij.testIntegration.GotoTestOrCodeHandler.java

License:Apache License

@Nullable
@Override/*  ww  w .j a v a2s.  c  om*/
protected String getAdText(PsiElement source, int length) {
    if (length > 0 && !TestFinderHelper.isTest(source)) {
        final Keymap keymap = KeymapManager.getInstance().getActiveKeymap();
        final Shortcut[] shortcuts = keymap.getShortcuts(IdeActions.ACTION_DEFAULT_RUNNER);
        if (shortcuts.length > 0) {
            return ("Press " + KeymapUtil.getShortcutText(shortcuts[0]) + " to run selected tests");
        }
    }
    return null;
}