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

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

Introduction

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

Prototype

String ACTION_EDITOR_SELECT_WORD_AT_CARET

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

Click Source Link

Usage

From source file:com.intellij.codeInsight.CodeInsightTestCase.java

License:Apache License

public static void ctrlW() {
    AnAction action = ActionManager.getInstance().getAction(IdeActions.ACTION_EDITOR_SELECT_WORD_AT_CARET);
    DataContext dataContext = DataManager.getInstance().getDataContext();
    AnActionEvent event = new AnActionEvent(null, dataContext, "", action.getTemplatePresentation(),
            ActionManager.getInstance(), 0);
    event.setInjectedContext(true);/*from   www. j a  v  a  2s . c  om*/
    action.actionPerformed(event);
}