Search in sources :

Example 46 with JSTestOptions

use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.

the class ActionScriptStubsTest method testCreateVariable.

@JSTestOptions({ JSTestOption.WithLineMarkers })
public void testCreateVariable() throws Exception {
    doTest(() -> {
        final IntentionAction action = LightQuickFixTestCase.findActionWithText(LightQuickFixTestCase.getAvailableActions(myEditor, myFile), "Create Field 'myfield'");
        CommandProcessor.getInstance().executeCommand(getProject(), () -> action.invoke(myProject, myEditor, myFile), "Create field", null);
        checkResultByFile(getBasePath() + "/" + getTestName(false) + "_after.as");
    }, getTestName(false) + ".as", "restparam.swc");
}
Also used : IntentionAction(com.intellij.codeInsight.intention.IntentionAction) JSTestOptions(com.intellij.lang.javascript.JSTestOptions)

Example 47 with JSTestOptions

use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.

the class FlexColorAnnotatorTest method testGutter4.

@JSTestOptions({ JSTestOption.WithFlexFacet, JSTestOption.WithCssSupportLoader })
public void testGutter4() throws Exception {
    GutterMark r = myFixture.findGutter(getTestName(false) + '.' + "css");
    assertNotNull(r);
    assertInstanceOf(r.getIcon(), ColorIconCache.ColorIcon.class);
}
Also used : GutterMark(com.intellij.codeInsight.daemon.GutterMark) ColorIconCache(com.intellij.xml.util.ColorIconCache) JSTestOptions(com.intellij.lang.javascript.JSTestOptions)

Example 48 with JSTestOptions

use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.

the class FlexColorAnnotatorTest method testGutter5.

@JSTestOptions({ JSTestOption.WithFlexFacet, JSTestOption.WithCssSupportLoader })
public void testGutter5() throws Exception {
    GutterMark r = myFixture.findGutter(getTestName(false) + '.' + "css");
    assertNotNull(r);
    assertInstanceOf(r.getIcon(), ColorIconCache.ColorIcon.class);
}
Also used : GutterMark(com.intellij.codeInsight.daemon.GutterMark) ColorIconCache(com.intellij.xml.util.ColorIconCache) JSTestOptions(com.intellij.lang.javascript.JSTestOptions)

Example 49 with JSTestOptions

use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.

the class FlexCssCompletionTest method testClassReferenceCompletion.

@JSTestOptions({ JSTestOption.WithJsSupportLoader, JSTestOption.WithFlexFacet })
public void testClassReferenceCompletion() throws Exception {
    configureByFiles(null, FlexCompletionTest.BASE_PATH + getTestName(false) + ".css");
    new CodeCompletionHandlerBase(CompletionType.BASIC).invokeCompletion(myProject, myEditor);
    checkResultByFile(FlexCompletionTest.BASE_PATH + getTestName(false) + "_after.css");
}
Also used : CodeCompletionHandlerBase(com.intellij.codeInsight.completion.CodeCompletionHandlerBase) JSTestOptions(com.intellij.lang.javascript.JSTestOptions)

Example 50 with JSTestOptions

use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.

the class FlexCompletionTest method testCompletionOfMxmlInAnotherDirectory.

@JSTestOptions({ JSTestOption.WithJsSupportLoader, JSTestOption.WithFlexFacet })
public final void testCompletionOfMxmlInAnotherDirectory() throws Exception {
    final String testName = getTestName(false);
    doTestForFiles(new VirtualFile[] { getVirtualFile(BASE_PATH + testName + "/" + testName + ".as"), getVirtualFile(BASE_PATH + testName + "/aaa/" + testName + ".mxml") }, "", "as", new File(getTestDataPath() + getBasePath() + File.separatorChar + testName));
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) PsiFile(com.intellij.psi.PsiFile) File(java.io.File) JSTestOptions(com.intellij.lang.javascript.JSTestOptions)

Aggregations

JSTestOptions (com.intellij.lang.javascript.JSTestOptions)59 VirtualFile (com.intellij.openapi.vfs.VirtualFile)20 PsiFile (com.intellij.psi.PsiFile)12 PsiElement (com.intellij.psi.PsiElement)11 JSExpressionCodeFragment (com.intellij.lang.javascript.psi.JSExpressionCodeFragment)5 File (java.io.File)5 CssDocumentationProvider (com.intellij.psi.css.impl.util.CssDocumentationProvider)4 THashMap (gnu.trove.THashMap)4 GutterMark (com.intellij.codeInsight.daemon.GutterMark)3 FlexDocumentationProvider (com.intellij.javascript.flex.FlexDocumentationProvider)3 DocumentationProvider (com.intellij.lang.documentation.DocumentationProvider)3 JSDocumentationProvider (com.intellij.lang.javascript.documentation.JSDocumentationProvider)3 JSCodeStyleSettings (com.intellij.lang.javascript.formatter.JSCodeStyleSettings)3 JSClass (com.intellij.lang.javascript.psi.ecmal4.JSClass)3 Sdk (com.intellij.openapi.projectRoots.Sdk)3 SdkModificator (com.intellij.openapi.projectRoots.SdkModificator)3 LookupElement (com.intellij.codeInsight.lookup.LookupElement)2 RunManager (com.intellij.execution.RunManager)2 ModifiableFlexBuildConfiguration (com.intellij.lang.javascript.flex.projectStructure.model.ModifiableFlexBuildConfiguration)2 ECMA4CodeStyleSettings (com.intellij.lang.javascript.formatter.ECMA4CodeStyleSettings)2