mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-184825 "Redundant String operation" inspection - rename 'Delete element' to 'Delete argument'
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Delete element" "true"
|
||||
// "Remove argument" "true"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
System.out.println();
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Delete element" "true"
|
||||
// "Remove argument" "true"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
StringBuilder s = new StringBuilder();
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Delete element" "true"
|
||||
// "Remove argument" "true"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("<caret>");
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Delete element" "true"
|
||||
// "Remove argument" "true"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
StringBuilder s = new StringBuilder(("<caret>"));
|
||||
|
||||
+1
@@ -2216,6 +2216,7 @@ inspection.redundant.string.remove.fix.name=Remove redundant ''{0}()'' call
|
||||
inspection.redundant.string.fix.family.name=Remove redundant call
|
||||
inspection.redundant.string.call.message=Call to <code>#ref</code> is redundant #loc
|
||||
inspection.redundant.string.argument.message=Unnecessary empty string argument
|
||||
inspection.redundant.string.remove.argument.fix.name=Remove argument
|
||||
inspection.redundant.string.intern.on.constant.message=Call to <code>#ref</code> on compile-time constant is unnecessary #loc
|
||||
|
||||
inspection.type.may.be.weakened.display.name=Type may be weakened
|
||||
|
||||
+3
-1
@@ -77,8 +77,10 @@ public class RedundantStringOperationInspection extends AbstractBaseJavaLocalIns
|
||||
private void checkUnnecessaryEmptyStringArgument(PsiCall call) {
|
||||
PsiExpression argument = getSingleEmptyStringArgument(call);
|
||||
if (argument != null) {
|
||||
LocalQuickFix fix =
|
||||
new DeleteElementFix(argument, InspectionGadgetsBundle.message("inspection.redundant.string.remove.argument.fix.name"));
|
||||
holder.registerProblem(argument, InspectionGadgetsBundle.message("inspection.redundant.string.argument.message"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL, new DeleteElementFix(argument));
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL, fix);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user