Java Code Examples for com.intellij.openapi.editor.actionSystem.TypedAction#setupHandler()

The following examples show how to use com.intellij.openapi.editor.actionSystem.TypedAction#setupHandler() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StartupEvent.java    From tmc-intellij with MIT License 5 votes vote down vote up
private void setupHandlersForSnapshots(ProgressObserver observer) {
    observer.progress(0, 0.70, "Setting handlers");
    final EditorActionManager actionManager = EditorActionManager.getInstance();
    final TypedAction typedAction = actionManager.getTypedAction();
    TypedActionHandler originalHandler = actionManager.getTypedAction().getHandler();
    typedAction.setupHandler(new ActivateSnapshotsAction(originalHandler));
}
 
Example 2
Source File: ConsoleViewImpl.java    From consulo with Apache License 2.0 4 votes vote down vote up
private static synchronized void initTypedHandler() {
  if (ourTypedHandlerInitialized) return;
  TypedAction typedAction = EditorActionManager.getInstance().getTypedAction();
  typedAction.setupHandler(new MyTypedHandler(typedAction.getHandler()));
  ourTypedHandlerInitialized = true;
}