Search in sources :

Example 51 with JSTestOptions

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

the class FlexCompletionTest method testCompletionOfPackageLocalClass.

@JSTestOptions({ JSTestOption.WithJsSupportLoader, JSTestOption.WithFlexFacet })
public final void testCompletionOfPackageLocalClass() throws Exception {
    final String testName = getTestName(false);
    doTestForFiles(new VirtualFile[] { getVirtualFile(BASE_PATH + testName + "/aaa/" + testName + ".mxml"), getVirtualFile(BASE_PATH + testName + "/aaa/" + testName + ".as") }, "", "mxml", 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)

Example 52 with JSTestOptions

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

the class FlexCompletionTest method testMxmlFieldReference.

@JSTestOptions({ JSTestOption.WithFlexFacet })
public final void testMxmlFieldReference() throws Exception {
    final String testName = getTestName(false);
    doTestForFiles(new VirtualFile[] { getVirtualFile(BASE_PATH + testName + "/aaa/" + testName + ".mxml") }, "", "mxml", 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)

Example 53 with JSTestOptions

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

the class FlexUnitHighlightingTest method testNoUnusedHighlighting.

@JSTestOptions({ JSTestOption.WithFlexFacet, JSTestOption.WithFlexUnit4 })
public void testNoUnusedHighlighting() throws Exception {
    enableInspectionTool(new JSUnusedGlobalSymbolsInspection() {
    });
    doTest(getBasePath() + getTestName(false) + ".as", true, false, true);
}
Also used : JSUnusedGlobalSymbolsInspection(com.intellij.lang.javascript.inspections.JSUnusedGlobalSymbolsInspection) JSTestOptions(com.intellij.lang.javascript.JSTestOptions)

Example 54 with JSTestOptions

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

the class FlexCompletionTest method testAssetFromAnotherSourceRoot.

@JSTestOptions({ JSTestOption.WithJsSupportLoader, JSTestOption.WithFlexFacet })
public void testAssetFromAnotherSourceRoot() throws Exception {
    final String testName = getTestName(false);
    final VirtualFile secondSourceRoot = getVirtualFile(BASE_PATH + testName);
    PsiTestUtil.addSourceRoot(myModule, secondSourceRoot);
    withNoAbsoluteReferences(() -> doTest("", "mxml"));
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) JSTestOptions(com.intellij.lang.javascript.JSTestOptions)

Example 55 with JSTestOptions

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

the class FlexCompletionTest method testMxmlFromOtherPackage.

@JSTestOptions({ JSTestOption.WithGumboSdk })
public void testMxmlFromOtherPackage() throws Exception {
    final String testName = getTestName(false);
    doTestForFiles(new VirtualFile[] { getVirtualFile(getBasePath() + testName + ".mxml"), getVirtualFile(getBasePath() + testName + "/" + "CustomButton.mxml") }, "", "mxml", new File(getTestDataPath() + getBasePath()));
}
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