Search in sources :

Example 21 with JSUnusedLocalSymbolsInspection

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

the class ActionScriptHighlightingTest method testUsingFunctionDeclarations.

public void testUsingFunctionDeclarations() throws Exception {
    enableInspectionTool(new JSUnusedLocalSymbolsInspection());
    defaultTest();
}
Also used : JSUnusedLocalSymbolsInspection(com.intellij.lang.javascript.inspections.JSUnusedLocalSymbolsInspection)

Example 22 with JSUnusedLocalSymbolsInspection

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

the class ActionScriptHighlightingTest method testUnusedParameterHasCreateFieldQuickFix_4.

public void testUnusedParameterHasCreateFieldQuickFix_4() throws Exception {
    enableInspectionTool(new JSUnusedLocalSymbolsInspection());
    doSimpleHighlightingWithInvokeFixAndCheckResult("Create Field '_value'");
}
Also used : JSUnusedLocalSymbolsInspection(com.intellij.lang.javascript.inspections.JSUnusedLocalSymbolsInspection)

Example 23 with JSUnusedLocalSymbolsInspection

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

the class ActionScriptHighlightingTest method testUnusedParameterHasAssignToFieldQuickFix.

public void testUnusedParameterHasAssignToFieldQuickFix() throws Exception {
    enableInspectionTool(new JSUnusedLocalSymbolsInspection());
    doSimpleHighlightingWithInvokeFixAndCheckResult("Assign parameter 'xxx' to field");
}
Also used : JSUnusedLocalSymbolsInspection(com.intellij.lang.javascript.inspections.JSUnusedLocalSymbolsInspection)

Example 24 with JSUnusedLocalSymbolsInspection

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

the class ActionScriptHighlightingTest method testOptimizeImports.

@JSTestOptions({ JSTestOption.WithJsSupportLoader, JSTestOption.WithFlexSdk, JSTestOption.WithUnusedImports })
public void testOptimizeImports() throws Exception {
    enableInspectionTool(new JSUnusedLocalSymbolsInspection());
    final String testName = getTestName(false);
    Collection<HighlightInfo> infos = doTestFor(true, (Runnable) null, testName + ".js2", testName + "_2.js2");
    findAndInvokeIntentionAction(infos, "Optimize imports", myEditor, myFile);
    checkResultByFile(BASE_PATH + getTestName(false) + "_after.js2");
}
Also used : HighlightInfo(com.intellij.codeInsight.daemon.impl.HighlightInfo) JSUnusedLocalSymbolsInspection(com.intellij.lang.javascript.inspections.JSUnusedLocalSymbolsInspection)

Aggregations

JSUnusedLocalSymbolsInspection (com.intellij.lang.javascript.inspections.JSUnusedLocalSymbolsInspection)24 HighlightInfo (com.intellij.codeInsight.daemon.impl.HighlightInfo)1