mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
IfStatementWithIdenticalBranches: remove trailing space
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part with variables from if " "true"
|
||||
// "Extract common part with variables from 'if'" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part with variables from if " "true"
|
||||
// "Extract common part with variables from 'if'" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part with variables from if (may change semantics)" "INFORMATION"
|
||||
// "Extract common part with variables from 'if' (may change semantics)" "INFORMATION"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part with variables from if " "true"
|
||||
// "Extract common part with variables from 'if'" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part with variables from if " "true"
|
||||
// "Extract common part with variables from 'if'" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part removing branch " "true"
|
||||
// "Extract common part removing branch" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part with variables from if " "true"
|
||||
// "Extract common part with variables from 'if'" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part from if (may change semantics)" "INFORMATION"
|
||||
// "Extract common part from 'if' (may change semantics)" "INFORMATION"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part from if (may change semantics)" "INFORMATION"
|
||||
// "Extract common part from 'if' (may change semantics)" "INFORMATION"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part removing branch " "true"
|
||||
// "Extract common part removing branch" "true"
|
||||
|
||||
import java.io.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part removing branch " "true"
|
||||
// "Extract common part removing branch" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract variables from if " "true"
|
||||
// "Extract variables from 'if'" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part with variables from if " "true"
|
||||
// "Extract common part with variables from 'if'" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part with variables from if " "true"
|
||||
// "Extract common part with variables from 'if'" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part with variables from if (may change semantics)" "INFORMATION"
|
||||
// "Extract common part with variables from 'if' (may change semantics)" "INFORMATION"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part with variables from if " "false"
|
||||
// "Extract common part with variables from 'if'" "false"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part with variables from if " "true"
|
||||
// "Extract common part with variables from 'if'" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part with variables from if " "true"
|
||||
// "Extract common part with variables from 'if'" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Fix all 'Common parts of if statement branches can be extracted' problems in file" "false"
|
||||
// "Fix all 'Common parts of 'if' statement branches can be extracted' problems in file" "false"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part removing branch " "false"
|
||||
// "Extract common part removing branch" "false"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part removing branch " "false"
|
||||
// "Extract common part removing branch" "false"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part removing branch " "true"
|
||||
// "Extract common part removing branch" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part with variables from if " "true"
|
||||
// "Extract common part with variables from 'if'" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "false"
|
||||
// "Collapse 'if' statement" "false"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "false"
|
||||
// "Collapse 'if' statement" "false"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "false"
|
||||
// "Collapse 'if' statement" "false"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Collapse if statement " "true"
|
||||
// "Collapse 'if' statement" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part from if (may change semantics)" "INFORMATION"
|
||||
// "Extract common part from 'if' (may change semantics)" "INFORMATION"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part from if (may change semantics)" "INFORMATION"
|
||||
// "Extract common part from 'if' (may change semantics)" "INFORMATION"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part from if " "false"
|
||||
// "Extract common part from 'if'" "false"
|
||||
|
||||
public class Main {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part from if " "false"
|
||||
// "Extract common part from 'if'" "false"
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part removing branch " "true"
|
||||
// "Extract common part removing branch" "true"
|
||||
|
||||
import java.io.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract common part removing branch " "true"
|
||||
// "Extract common part removing branch" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Extract variables from if " "true"
|
||||
// "Extract variables from 'if'" "true"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Common parts of if statement can be extracted" "false"
|
||||
// "Common parts of 'if' statement can be extracted" "false"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -260,11 +260,11 @@ inspection.export.error.writing.to=Error writing to {0}: {1}
|
||||
|
||||
inspection.common.if.parts.family=Extract common parts of 'if' statement
|
||||
inspection.common.if.parts.family.else.if=Merge 'else if' statement
|
||||
inspection.common.if.parts.message.variables.only=Extract variables from 'if' {0}
|
||||
inspection.common.if.parts.message.with.variables.extract=Extract common part with variables from 'if' {0}
|
||||
inspection.common.if.parts.message.without.variables.extract=Extract common part from 'if' {0}
|
||||
inspection.common.if.parts.message.whole.branch=Extract common part removing branch {0}
|
||||
inspection.common.if.parts.message.complete.duplicate=Collapse 'if' statement {0}
|
||||
inspection.common.if.parts.message.variables.only=Extract variables from ''if''{0}
|
||||
inspection.common.if.parts.message.with.variables.extract=Extract common part with variables from ''if''{0}
|
||||
inspection.common.if.parts.message.without.variables.extract=Extract common part from ''if''{0}
|
||||
inspection.common.if.parts.message.whole.branch=Extract common part removing branch{0}
|
||||
inspection.common.if.parts.message.complete.duplicate=Collapse ''if'' statement{0}
|
||||
inspection.common.if.parts.message.complete.duplicate.side.effect=Collapse 'if' statement and extract side effect
|
||||
inspection.common.if.parts.description='if' statement with common parts
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public class IfStatementWithIdenticalBranchesInspection extends AbstractBaseJava
|
||||
if (!isOnTheFly) return;
|
||||
highlightType = ProblemHighlightType.INFORMATION;
|
||||
}
|
||||
holder.registerProblem(result.myElementToHighlight, InspectionsBundle.message("inspection.common.if.parts.description"), highlightType, result.myFix);
|
||||
holder.registerProblem(result.myElementToHighlight, result.myMessage, highlightType, result.myFix);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -455,7 +455,7 @@ public class IfStatementWithIdenticalBranchesInspection extends AbstractBaseJava
|
||||
|
||||
@NotNull
|
||||
private String getMessage(boolean mayChangeSemantics) {
|
||||
String mayChangeSemanticsText = mayChangeSemantics ? "(may change semantics)" : "";
|
||||
String mayChangeSemanticsText = mayChangeSemantics ? " (may change semantics)" : "";
|
||||
return InspectionsBundle.message(myBundleKey, mayChangeSemanticsText);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,8 @@
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-engine/1.1.0/junit-platform-engine-1.1.0.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-commons/1.1.0/junit-platform-commons-1.1.0.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/opentest4j/opentest4j/1.0.0/opentest4j-1.0.0.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
@@ -55,6 +57,8 @@
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-engine/1.1.0/junit-platform-engine-1.1.0-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-commons/1.1.0/junit-platform-commons-1.1.0-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/opentest4j/opentest4j/1.0.0/opentest4j-1.0.0-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
|
||||
Reference in New Issue
Block a user