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

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

Introduction

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

Prototype

String ACTION_EDITOR_DUPLICATE

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

Click Source Link

Usage

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

License:Apache License

public static void ctrlD() {
    AnAction action = ActionManager.getInstance().getAction(IdeActions.ACTION_EDITOR_DUPLICATE);
    DataContext dataContext = DataManager.getInstance().getDataContext();
    AnActionEvent event = new AnActionEvent(null, dataContext, "", action.getTemplatePresentation(),
            ActionManager.getInstance(), 0);
    event.setInjectedContext(true);//w  w w .  ja  v  a  2s . co  m
    action.actionPerformed(event);
}