mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ensure inspection provides expected getShortName() used in tests
This commit is contained in:
+1
-9
@@ -2,24 +2,16 @@
|
||||
package com.intellij.java.codeInsight.daemon.quickFix;
|
||||
|
||||
import com.intellij.codeInsight.daemon.quickFix.LightQuickFixParameterizedTestCase;
|
||||
import com.intellij.codeInspection.InspectionProfileEntry;
|
||||
import com.intellij.codeInspection.LocalInspectionTool;
|
||||
import com.intellij.testFramework.InspectionTestUtil;
|
||||
import com.siyeh.ig.redundancy.RedundantStringOperationInspection;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class RedundantStringOperationInspectionTest extends LightQuickFixParameterizedTestCase {
|
||||
@NotNull
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
List<InspectionProfileEntry> tools =
|
||||
InspectionTestUtil.instantiateTools(Collections.singleton(RedundantStringOperationInspection.class));
|
||||
|
||||
return new LocalInspectionTool[]{(LocalInspectionTool)tools.iterator().next()};
|
||||
return new LocalInspectionTool[]{new RedundantStringOperationInspection()};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+6
@@ -57,6 +57,12 @@ public class RedundantStringOperationInspection extends AbstractBaseJavaLocalIns
|
||||
return InspectionGadgetsBundle.message("inspection.redundant.string.operation.display.name");
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getShortName() {
|
||||
return "StringOperationCanBeSimplified";
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiElementVisitor buildVisitor(@NotNull ProblemsHolder holder, boolean isOnTheFly) {
|
||||
|
||||
Reference in New Issue
Block a user