use of com.intellij.testFramework.TestActionEvent in project intellij-plugins by JetBrains.
the class FlexExtractSuperTest method checkAction.
private void checkAction(String actionId, boolean enabled, int pos) {
AnAction action = ActionManager.getInstance().getAction(actionId);
AnActionEvent e = new TestActionEvent(DataManager.getInstance().getDataContext(getEditor().getComponent()), action);
action.beforeActionPerformedUpdate(e);
assertEquals("Action " + actionId + " should be " + (enabled ? "enabled" : "disabled") + " at position " + pos, enabled, e.getPresentation().isEnabled());
}
Aggregations