provide remove assignment fix for silly assignment inspection (IDEA-125993)

This commit is contained in:
Anna Kozlova
2014-06-06 13:57:02 +04:00
parent 54e38eed37
commit de7387fd40
9 changed files with 223 additions and 127 deletions
@@ -0,0 +1,7 @@
// "Remove redundant assignment" "true"
class A {
{
String ss = "";
}
}
@@ -0,0 +1,8 @@
// "Remove redundant assignment" "true"
class A {
{
String ss = "";
s<caret>s = ss;
}
}
@@ -17,6 +17,7 @@ package com.intellij.codeInsight.daemon.quickFix;
import com.intellij.codeInspection.LocalInspectionTool;
import com.intellij.codeInspection.defUse.DefUseInspection;
import com.intellij.codeInspection.sillyAssignment.SillyAssignmentInspection;
import com.intellij.pom.java.LanguageLevel;
import org.jetbrains.annotations.NotNull;
@@ -26,7 +27,7 @@ public class RemoveUnusedAssignmentTest extends LightQuickFixTestCase {
@NotNull
@Override
protected LocalInspectionTool[] configureLocalInspectionTools() {
return new LocalInspectionTool[] {new DefUseInspection()};
return new LocalInspectionTool[] {new DefUseInspection(), new SillyAssignmentInspection()};
}
@Override