Package com.intellij.codeInsight

Examples of com.intellij.codeInsight.CodeInsightActionHandler


    return "/gotoSuper/";
  }

  private void doTest() throws Throwable {
    myFixture.configureByFile(getTestName(false) + ".hx");
    final CodeInsightActionHandler handler = CodeInsightActions.GOTO_SUPER.forLanguage(HaxeLanguage.INSTANCE);
    handler.invoke(getProject(), myFixture.getEditor(), myFixture.getFile());
    myFixture.checkResultByFile(getTestName(false) + ".txt");
  }
View Full Code Here


    return DartTestUtils.BASE_TEST_DATA_PATH +  FileUtil.toSystemDependentName("/gotoSuper/html");
  }

  private void doTest() throws Throwable {
    myFixture.configureByFile(getTestName(false) + ".html");
    final CodeInsightActionHandler handler = CodeInsightActions.GOTO_SUPER.forLanguage(DartLanguage.INSTANCE);
    handler.invoke(getProject(), myFixture.getEditor(), myFixture.getFile());
    myFixture.checkResultByFile(getTestName(false) + ".txt");
  }
View Full Code Here

    return DartTestUtils.BASE_TEST_DATA_PATH +  FileUtil.toSystemDependentName("/gotoSuper/");
  }

  private void doTest() throws Throwable {
    myFixture.configureByFile(getTestName(false) + ".dart");
    final CodeInsightActionHandler handler = CodeInsightActions.GOTO_SUPER.forLanguage(DartLanguage.INSTANCE);
    handler.invoke(getProject(), myFixture.getEditor(), myFixture.getFile());
    myFixture.checkResultByFile(getTestName(false) + ".txt");
  }
View Full Code Here

    if (editor == null) return;
    final PsiFile psiFile = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument());
    if (psiFile == null) return;
    CommandProcessor.getInstance().executeCommand(project, new Runnable() {
      public void run() {
        final CodeInsightActionHandler handler = getHandler();
        final Runnable action = new Runnable() {
          public void run() {
            if (!ApplicationManager.getApplication().isUnitTestMode() && !editor.getContentComponent().isShowing()) return;
            handler.invoke(project, editor, psiFile);
          }
        };
        if (handler.startInWriteAction()) {
          ApplicationManager.getApplication().runWriteAction(action);
        }
        else {
          action.run();
        }
View Full Code Here

public class GenerateDomElementAction extends BaseGenerateAction {

  protected final GenerateDomElementProvider myProvider;

  public GenerateDomElementAction(final GenerateDomElementProvider generateProvider) {
    super(new CodeInsightActionHandler() {
      public void invoke(final Project project, final Editor editor, final PsiFile file) {
        new WriteCommandAction(project, file) {
          protected void run(final Result result) throws Throwable {
            final DomElement element = generateProvider.generate(project, editor, file);
            generateProvider.navigate(element);
View Full Code Here

TOP

Related Classes of com.intellij.codeInsight.CodeInsightActionHandler

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.