mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java-inspections] IJ-CR-177985 improve inspection descriptions
Related: IDEA-372834 GitOrigin-RevId: 6cceb2c89e45572f6244768031ef29fe455eb437
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cce222ba31
commit
9f4c117fb2
@@ -1868,6 +1868,7 @@ unnecessary.final.report.method.parameters.option=Report method parameters
|
||||
unnecessary.final.report.foreach.parameters.option=Report foreach parameter
|
||||
unnecessary.final.report.catch.parameters.option=Report catch parameters
|
||||
unnecessary.final.on.parameter.only.interface.option=Only warn on abstract or interface methods
|
||||
unnecessary.final.on.parameter.only.interface.option.description=<code>final</code> parameters of <code>abstract</code> or interface methods may be considered extra unnecessary as they don't affect the implementation of these methods.
|
||||
choose.exception.class=Choose Exception Class
|
||||
choose.exception.label=Prohibited exceptions:
|
||||
class.independent.of.module.display.name=Class independent of its module
|
||||
|
||||
+2
@@ -18,6 +18,7 @@ package com.siyeh.ig.style;
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool;
|
||||
import com.intellij.codeInspection.LocalQuickFix;
|
||||
import com.intellij.codeInspection.options.OptPane;
|
||||
import com.intellij.openapi.util.text.HtmlChunk;
|
||||
import com.intellij.pom.java.JavaFeature;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
@@ -71,6 +72,7 @@ public final class UnnecessaryFinalOnLocalVariableOrParameterInspection extends
|
||||
checkbox("reportPatternVariables", InspectionGadgetsBundle.message("unnecessary.final.report.pattern.variables.option")),
|
||||
checkbox("reportParameters", InspectionGadgetsBundle.message("unnecessary.final.report.method.parameters.option"),
|
||||
checkbox("onlyWarnOnAbstractMethods",InspectionGadgetsBundle.message("unnecessary.final.on.parameter.only.interface.option"))
|
||||
.description(HtmlChunk.raw(InspectionGadgetsBundle.message("unnecessary.final.on.parameter.only.interface.option.description")))
|
||||
),
|
||||
checkbox("reportCatchParameters", InspectionGadgetsBundle.message("unnecessary.final.report.catch.parameters.option")),
|
||||
checkbox("reportForeachParameters", InspectionGadgetsBundle.message("unnecessary.final.report.foreach.parameters.option"))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
Reports parameters or local variables that may have the <code>final</code> modifier added to their declaration.
|
||||
Reports local variables or parameters that may have the <code>final</code> modifier added to their declaration.
|
||||
<p>Example:</p>
|
||||
<pre><code>
|
||||
ArrayList<Integer> list = new ArrayList();
|
||||
@@ -15,7 +15,7 @@ Reports parameters or local variables that may have the <code>final</code> modif
|
||||
</code></pre>
|
||||
<!-- tooltip end -->
|
||||
<p>
|
||||
Use the inspection's options to define whether parameters or local variables should be reported.
|
||||
Use the inspection's options to define what kinds of parameters or local variables should be reported.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+1
-16
@@ -24,22 +24,7 @@ Reports local variables or parameters unnecessarily declared <code>final</code>.
|
||||
</code></pre>
|
||||
<!-- tooltip end -->
|
||||
<p>
|
||||
Use the inspection options to toggle the reporting for:
|
||||
Use the inspection's options to define what kinds of parameters or local variables should be reported.
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
local variables
|
||||
</li>
|
||||
<li>
|
||||
parameters (including
|
||||
parameters of <code>catch</code> blocks and enhanced <code>for</code> statements)
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Also, you can configure the inspection to only report <code>final</code> parameters of <code>abstract</code> or interface
|
||||
methods, which may be considered extra unnecessary as such markings don't
|
||||
affect the implementation of these methods.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user