Package com.intellij.codeInsight.intention

Examples of com.intellij.codeInsight.intention.IntentionAction


  protected void doTest(String quickFixName) {
    String testName = getTestName(true);
    myFixture.configureByFile(testName + ".erl");
    List<IntentionAction> availableIntentions = myFixture.filterAvailableIntentions(quickFixName);
    IntentionAction action = ContainerUtil.getFirstItem(availableIntentions);
    assertNotNull(action);
    myFixture.launchAction(action);
    String after = String.format("%s-after.erl", testName);
    myFixture.checkResultByFile(after);
  }
View Full Code Here


    myFixture.checkResultByFile(expectedResultFile);
  }

  private void applyImplementAllCallbacksFix() {
    List<IntentionAction> availableIntentions = myFixture.filterAvailableIntentions("Implement all callbacks");
    IntentionAction action = ContainerUtil.getFirstItem(availableIntentions);
    assertNotNull(action);
    myFixture.launchAction(action);
  }
View Full Code Here

    assertTrue(includeDirectories.get(0).getPath().endsWith(expectedIncludePath));
  }

  private void runQuickFix() {
    List<IntentionAction> availableIntentions = myFixture.filterAvailableIntentions("Find include");
    IntentionAction action = ContainerUtil.getFirstItem(availableIntentions);
    assertNotNull(action);
    myFixture.launchAction(action);
  }
View Full Code Here

  public void testNoActionIfSpecExists() throws Throwable {
    String testName = getTestName(true);
    myFixture.configureByFile(testName + ".erl");
    List<IntentionAction> availableIntentions = myFixture.filterAvailableIntentions(ErlangGenerateSpecFix.NAME);
    IntentionAction action = ContainerUtil.getFirstItem(availableIntentions);
    assertNull("Generate spec fix should not be available if spec already exists.", action);
  }
View Full Code Here

    final PsiClass targetClass = getTargetClass(context);
    if (targetClass == null) return super.getQuickFixes(context);
    final PropertyMemberType memberType = getMemberTypes(context)[0];

    final PsiType psiType = getPsiType(context);
    final IntentionAction fix = QuickFixFactory.getInstance().createCreateFieldOrPropertyFix(targetClass, targetName, psiType, memberType);
    return fix instanceof LocalQuickFix? new LocalQuickFix[] {(LocalQuickFix)fix} : super.getQuickFixes(context);
  }
View Full Code Here

TOP

Related Classes of com.intellij.codeInsight.intention.IntentionAction

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.