Search in sources :

Example 6 with JSMethodCanBeStaticInspection

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

the class FlexHighlightingTest method testFlex.

@NeedsJavaModule
public void testFlex() throws Exception {
    enableInspectionTool(new JSMethodCanBeStaticInspection());
    final String testName = getTestName(false);
    doTestFor(true, testName + ".mxml", testName + ".css");
    final List<PsiReference> cssRefs = collectCssRefs();
    assertEquals(1, cssRefs.size());
    final PsiElement element = cssRefs.get(0).resolve();
    assertNotNull(element);
    assertEquals(element.getContainingFile().getName(), testName + ".css");
}
Also used : JSMethodCanBeStaticInspection(com.intellij.lang.javascript.inspections.JSMethodCanBeStaticInspection)

Example 7 with JSMethodCanBeStaticInspection

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

the class ActionScriptHighlightingTest method testMethodCanBeStatic2.

public void testMethodCanBeStatic2() throws Exception {
    enableInspectionTool(new JSMethodCanBeStaticInspection());
    doSimpleHighlightingWithInvokeFixAndCheckResult("Make 'static'");
}
Also used : JSMethodCanBeStaticInspection(com.intellij.lang.javascript.inspections.JSMethodCanBeStaticInspection)

Example 8 with JSMethodCanBeStaticInspection

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

the class FlexHighlightingTest method testMakeMethodStatic.

@JSTestOptions(JSTestOption.WithFlexFacet)
public void testMakeMethodStatic() throws Exception {
    enableInspectionTool(new JSMethodCanBeStaticInspection());
    doHighlightingWithInvokeFixAndCheckResult("Make 'static'", "mxml", getTestName(false) + ".mxml");
}
Also used : JSMethodCanBeStaticInspection(com.intellij.lang.javascript.inspections.JSMethodCanBeStaticInspection)

Aggregations

JSMethodCanBeStaticInspection (com.intellij.lang.javascript.inspections.JSMethodCanBeStaticInspection)8 JSTestOptions (com.intellij.lang.javascript.JSTestOptions)1