Package com.intellij.openapi.command

Examples of com.intellij.openapi.command.CommandProcessor


  }

  public final void actionPerformed(final Editor editor, final DataContext dataContext) {
    if (editor == null) return;

    CommandProcessor commandProcessor = CommandProcessor.getInstance();
    Runnable command = new Runnable() {
      public void run() {
        getHandler().execute(editor, getProjectAwareDataContext(editor, dataContext));
      }
    };

    String commandName = getTemplatePresentation().getText();
    if (commandName == null) commandName = "";
    // use new Ref() here to avoid merging two consequential commands, and, in the same time, pass along the Document
    commandProcessor.executeCommand(editor.getProject(), command, commandName, new Ref(editor.getDocument()));
  }
View Full Code Here

TOP

Related Classes of com.intellij.openapi.command.CommandProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.