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

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

Introduction

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

Prototype

String ACTION_COPY_REFERENCE

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

Click Source Link

Usage

From source file:com.intellij.testFramework.EditorTestUtil.java

License:Apache License

public static void performReferenceCopy(DataContext dataContext) {
    ActionManager actionManager = ActionManager.getInstance();
    AnAction action = actionManager.getAction(IdeActions.ACTION_COPY_REFERENCE);
    AnActionEvent event = new AnActionEvent(null, dataContext, "", action.getTemplatePresentation(),
            ActionManager.getInstance(), 0);
    action.update(event);//from  w  w  w. java2 s  . c  o  m
    Assert.assertTrue(event.getPresentation().isEnabled());
    action.actionPerformed(event);
}