use of com.intellij.openapi.editor.actionSystem.TypedAction in project intellij-community by JetBrains.
the class ConsoleViewImplTest method testTypeInEmptyConsole.
public void testTypeInEmptyConsole() throws Exception {
ConsoleViewImpl console = myConsole;
console.clear();
EditorActionManager actionManager = EditorActionManager.getInstance();
DataContext dataContext = DataManager.getInstance().getDataContext(console.getComponent());
TypedAction action = actionManager.getTypedAction();
action.actionPerformed(console.getEditor(), 'h', dataContext);
assertEquals(1, console.getContentSize());
}
use of com.intellij.openapi.editor.actionSystem.TypedAction in project intellij-plugins by JetBrains.
the class HbActionHandlerTest method doCharTest.
/**
* Call this method to test behavior when the given charToType is typed at the <caret>.
* See class documentation for more info: {@link HbActionHandlerTest}
*/
void doCharTest(final char charToType, @NotNull String before, @NotNull String expected) {
final TypedAction typedAction = EditorActionManager.getInstance().getTypedAction();
doExecuteActionTest(before, expected, () -> typedAction.actionPerformed(myFixture.getEditor(), charToType, ((EditorEx) myFixture.getEditor()).getDataContext()));
}
Aggregations