[i18n] move properties used in Java plugin only to from InspectionsBundle to JavaAnalysisBundle

This is needed to reduce amount of platform properties which are included into all IDEs (IDEA-209382).

GitOrigin-RevId: 545fb9e9284185b93fa0e12598f504428c686e6e
This commit is contained in:
nik
2020-02-17 08:13:34 +00:00
committed by intellij-monorepo-bot
parent 1784d68ee0
commit fec8e2b00f
91 changed files with 579 additions and 536 deletions
@@ -139,4 +139,220 @@ replace.get.class.with.class.literal=Replace getClass() with .class literal
service.provides=Provides service <a href="#javaClass/{0}">{0}</a><br><div style='margin-top: 5px'><font size='2'>Click to navigate</font></div>
service.uses=Uses service <a href="#javaClass/{0}">{0}</a><br><div style='margin-top: 5px'><font size='2'>Click to navigate</font></div>
suppress.for.parameter=Suppress for parameter
suppress.for.statement.with.comment=Suppress for statement with comment
suppress.for.statement.with.comment=Suppress for statement with comment
0.field.is.always.initialized.not.null=@{0} field is always initialized not-null
access.can.be.0=Access can be {0}
access.to.field.code.ref.code.outside.of.declared.guards.loc=Access to field <code>#ref</code> outside of declared guards #loc
annotate.as.safevarargs=Annotate as @SafeVarargs
annotate.overridden.methods.parameters.family.name=Annotate overridden method parameters
annotate.overridden.methods.parameters=Annotate overridden method parameters as ''@{0}''
anonymous.ref.loc.can.be.replaced.with.0=Anonymous #ref #loc can be replaced with {0}
anonymous.ref.loc.can.be.replaced.with.lambda=Anonymous #ref #loc can be replaced with lambda
assigning.a.collection.of.nullable.elements=Assigning a collection of nullable elements into a collection of non-null elements
comparision.between.object.and.primitive=Comparision between Object and primitive is illegal and is accepted in java 7 only
custom.exception.class.should.have.a.constructor=Custom exception class should have a constructor with a single message parameter of String type
delimiters.argument.contains.duplicated.characters=Delimiters argument contains duplicated characters
deprecated.class.usage.group.xml=XML
deprecated.member.0.is.still.used=Deprecated member ''{0}'' is still used
detach.library.quickfix.name=Detach library
detach.library.roots.quickfix.name=Detach unused library roots
don.t.report.unused.jars.inside.used.library=Don't report unused jars inside used library
explicit.type.argument.ref.loc.can.be.replaced.with=Explicit type argument #ref #loc can be replaced with <>
exports.to.itself.delete.module.ref.fix=Delete reference to module ''{0}''
exports.to.itself.delete.statement.fix=Delete directive
html.classes.exposed.with.code.module.info.code.html=<html>Classes exposed with <code>module-info</code></html>
html.ignore.overrides.of.deprecated.abstract.methods=<html>Ignore overrides of deprecated abstract methods from non-deprecated supers</html>
ignore.casts.in.suspicious.collections.method.calls=Ignore casts in suspicious collections method calls
ignore.exceptions.thrown.by.entry.points.methods=Ignore exceptions thrown by entry points methods
ignore.in.the.same.outermost.class=Ignore in the same outermost class
ignore.inside.deprecated.members=Ignore inside deprecated members
ignore.inside.non.static.imports=Ignore inside non-static imports
ignore.members.of.deprecated.classes=Ignore members of deprecated classes
ignore.operation.which.results.in.negative.value=Ignore '<<' operation which results in negative value
inspection.annotate.method.quickfix.family.name=Annotate method
inspection.annotate.overridden.method.and.self.quickfix.family.name=Annotate overridden methods and self
inspection.annotate.overridden.method.quickfix.family.name=Annotate overridden methods
inspection.c.style.array.declarations.option=Ignore C-style declarations in variables
inspection.can.be.final.accept.quickfix=Make final
inspection.can.be.final.option1=Report methods
inspection.can.be.final.option2=Report fields
inspection.can.be.final.option=Report classes
inspection.can.be.local.parameter.problem.descriptor=Parameter <code>#ref</code> can have <code>final</code> modifier
inspection.can.be.local.variable.problem.descriptor=Variable <code>#ref</code> can have <code>final</code> modifier
inspection.can.be.replaced.with.message=Can be replaced with ''{0}''
inspection.class.getclass.display.name=Class.getClass() call
inspection.class.getclass.fix.remove.name=Remove 'getClass()' call
inspection.class.getclass.fix.replace.name=Replace with 'Class.class'
inspection.class.getclass.message='getClass()' is called on Class instance
inspection.class.has.no.to.string.method.description=Class ''{0}'' does not override ''toString()'' method
inspection.class.has.no.to.string.method.exclude.classes.reg.exp.option=Exclude classes (reg exp):
inspection.class.has.no.to.string.method.ignore.abstract.classes.option=Ignore abstract classes
inspection.class.has.no.to.string.method.ignore.deprecated.classes.option=Ignore deprecated classes
inspection.class.has.no.to.string.method.ignore.enum.classes.option=Ignore enum classes
inspection.class.has.no.to.string.method.ignore.exception.classes.option=Ignore exception classes
inspection.class.has.no.to.string.method.ignore.inner.classes.option=Ignore inner classes
inspection.class.has.no.to.string.method.ignore.test.classes.option=Ignore test classes
inspection.common.if.parts.disable.highlight.tail.call=Do not highlight common parts, if tail statement is call
inspection.common.if.parts.family.else.if.description='else if' can be merged
inspection.common.if.parts.family.else.if=Merge 'else if' statement
inspection.common.if.parts.family=Extract common parts of 'if' statement
inspection.common.if.parts.settings.highlight.when.tail.call=Highlight when last common statement is call
inspection.compiler.javac.quirks.anno.array.comma.fix=Remove trailing comma
inspection.compiler.javac.quirks.anno.array.comma.problem=Trailing comma in annotation array initializer may cause compilation error in some Javac versions (e.g. JDK 5 and JDK 6).
inspection.compiler.javac.quirks.name=Javac quirks
inspection.compiler.javac.quirks.qualifier.type.args.fix=Remove generic parameter
inspection.compiler.javac.quirks.qualifier.type.args.problem=Generics in qualifier reference may cause compilation error in some Javac versions (e.g. JDK 5 and JDK 6).
inspection.constant.on.wrong.side.of.a.comparison.side.option=Constant should be on this side of a comparison:
inspection.contract.display.name=Contract issues
inspection.data.flow.redundant.instanceof.quickfix=Replace with a null check
inspection.data.flow.simplify.boolean.expression.quickfix=Simplify boolean expression
inspection.data.flow.simplify.to.assignment.quickfix.name=Simplify to normal assignment
inspection.data.flow.turn.off.constant.references.quickfix=Don't report values which are guaranteed to be constant
inspection.data.flow.turn.off.nullable.returning.notnull.quickfix=Don't report nullable methods which always return not-null value
inspection.data.flow.turn.off.true.asserts.quickfix=Don't report always true assertions
inspection.duplicate.throws.display.name=Duplicate throws
inspection.duplicate.throws.ignore.subclassing.option=Ignore exceptions subclassing others
inspection.duplicate.throws.more.general.problem=There is a more general exception, ''{0}'', in the throws list already.
inspection.duplicate.throws.problem=Duplicate throws
inspection.equals.hashcode.only.one.defined.problem.descriptor=Class has {0} defined but does not define {1}
inspection.export.results.can.be.final.description=Declaration can have final modifier
inspection.field.not.used.in.to.string.description2=Field ''{0}'' is not used in ''toString()'' method
inspection.field.not.used.in.to.string.description=Method ''{0}'' is not used in ''toString()'' method
inspection.implicit.subclass.display.forClass=Class ''{0}'' could be implicitly subclassed and must not be final
inspection.implicit.subclass.display.name=Final declaration can't be overridden at runtime
inspection.implicit.subclass.extendable=Make ''{0}'' overridable
inspection.implicit.subclass.make.class.extendable=Make class ''{0}'' {1,choice,0#|1#and method {2} |1<and {1} required methods }extendable
inspection.infinite.loop.option=Ignore when placed in Thread.run
inspection.java.module.naming.terminal.digits=Module name component ''{0}'' should avoid terminal digits
inspection.java.module.naming=Java module naming conventions
inspection.local.can.be.final.display.name=Local variable or parameter can be final
inspection.local.can.be.final.option1=Report method parameters
inspection.local.can.be.final.option2=Report catch parameters
inspection.local.can.be.final.option3=Report foreach parameters
inspection.local.can.be.final.option4=Report variables which are implicit final
inspection.local.can.be.final.option=Report local variables
inspection.module.exports.package.to.itself=Module exports/opens package to itself
inspection.nullable.problems.NotNull.parameter.overrides.Nullable=Parameter annotated @{0} must not override @{1} parameter
inspection.nullable.problems.NotNull.parameter.overrides.not.annotated=Parameter annotated @{0} should not override non-annotated parameter
inspection.nullable.problems.NotNull.parameter.receives.null.literal=Parameter annotated @{0} should not receive ''null'' as an argument
inspection.nullable.problems.Nullable.NotNull.conflict=Cannot annotate with both @{0} and @{1}
inspection.nullable.problems.Nullable.method.overrides.NotNull=Method annotated with @{0} must not override @{1} method
inspection.nullable.problems.annotated.field.constructor.parameter.not.annotated=Constructor parameter for @{0} field might be annotated @{0} itself
inspection.nullable.problems.annotated.field.getter.conflict=Getter for @{0} field is annotated @{1}
inspection.nullable.problems.annotated.field.getter.not.annotated=Getter for @{0} field might be annotated @{0} itself
inspection.nullable.problems.annotated.field.setter.parameter.conflict=Setter parameter for @{0} field is annotated @{1}
inspection.nullable.problems.annotated.field.setter.parameter.not.annotated=Setter parameter for @{0} field might be annotated @{0} itself
inspection.nullable.problems.method.overrides.NotNull=Not annotated method overrides method annotated with @{0}
inspection.nullable.problems.parameter.overrides.NotNull=Not annotated parameter overrides @{0} parameter
inspection.nullable.problems.primitive.type.annotation=Primitive type members cannot be annotated
inspection.objects.equals.can.be.simplified.display.name=Objects.equals() can be replaced with equals()
inspection.redundant.cast.problem.descriptor=Casting {0} to {1} is redundant
inspection.redundant.cast.remove.quickfix=Remove redundant cast(s)
inspection.redundant.field.initialization.option=Only warn on initialization to null
inspection.redundant.requires.statement.description=Redundant directive ''requires {0}''
inspection.redundant.requires.statement.fix.family=Delete redundant 'requires' directive
inspection.redundant.requires.statement.fix.name=Delete directive ''requires {0}''
inspection.redundant.throws.problem.descriptor1=The declared exception {0} is never thrown in this method, nor in its derivables
inspection.redundant.throws.problem.descriptor2=The declared exception {0} is never thrown
inspection.redundant.throws.problem.descriptor=The declared exception {0} is never thrown in method implementations
inspection.redundant.throws.remove.quickfix=Remove unnecessary 'throws' declarations
inspection.redundant.type.display.name=Redundant type arguments
inspection.redundant.type.no.generics.method.reference.problem.descriptor=Type arguments are redundant for the non-generic method reference
inspection.redundant.type.no.generics.problem.descriptor=Type arguments are redundant for the non-generic method call
inspection.redundant.type.problem.descriptor=Explicit type arguments can be inferred
inspection.redundant.type.remove.quickfix=Remove type arguments
inspection.reference.anonymous.name=anonymous ({0})
inspection.reference.implicit.constructor.name=implicit constructor of {0}
inspection.reference.jsp.holder.method.anonymous.name=<% page content %>
inspection.requires.auto.module.message='requires' directive for an automatic module
inspection.requires.auto.module.option=Highlight only transitive dependencies
inspection.requires.auto.module.transitive='requires transitive' directive for an automatic module
inspection.requires.auto.module=Dependencies on automatic modules
inspection.same.return.value.display.name=Method returns the same value
inspection.same.return.value.problem.descriptor1=Method and all its derivables always return {0}
inspection.same.return.value.problem.descriptor2=All implementations of this method always return {0}
inspection.same.return.value.problem.descriptor=Method always returns {0}
inspection.surround.requirenonnull.quickfix=Replace with ''Objects.requireNonNull({0})''
inspection.suspicious.array.method.call.display.name=Suspicious Arrays method calls
inspection.suspicious.array.method.call.problem.arrays=Array types are incompatible: arrays are always different
inspection.suspicious.array.method.call.problem.element=Element type is not compatible with array type
inspection.suspicious.collections.method.calls.display.name=Suspicious collections method calls
inspection.suspicious.collections.method.calls.problem.descriptor1=Suspicious call to ''{0}''
inspection.suspicious.collections.method.calls.problem.descriptor=''{0}'' may not contain {2} of type ''{1}''
inspection.suspicious.getter.setter.field.option=Only warn when field matching getter/setter name is present
inspection.suspicious.integer.div.assignment.option=Report suspicious but possibly exact divisions
inspection.test.only.problems.display.name=Test-only class or method call in production code
inspection.test.only.problems.test.only.class.reference=Test-only class is referenced in production code
inspection.test.only.problems.test.only.field.reference=Test-only field is referenced in production code
inspection.test.only.problems.test.only.method.call=Test-only method is called in production code
inspection.unary.plus.unary.binary.option=Only report in confusing binary or unary expression context
inspection.unnecessary.super.qualifier.option=Ignore clarification 'super' qualifier
inspection.use.compare.method.fix.family.name=Replace with single comparison method
inspection.visibility.accept.quickfix=Accept suggested access level
inspection.visibility.compose.suggestion=Can be {0}
inspection.visibility.option.constants=Suggest weaker visibility for constants
inspection.visibility.option.package.private.members=Suggest package-private visibility level for class members
inspection.visibility.package.private.top.level.classes=Suggest package-private visibility level for top-level classes
inspection.visibility.private.inner.members=<html>Suggest private for inner class members when referenced from outer class only</html>
instance.member.guarded.by.static.0.loc=Instance member guarded by static "{0}" #loc
instance.member.guarded.by.static.ref.loc=Instance member guarded by static #ref #loc
junit.rule.classrule.option=Report @ClassRule problems
junit.rule.rule.option=Report @Rule problems
make.0.default.annotation=Make "{0}" default annotation
make.default.the.last.case.family.name=Make 'default' the last case
make.final.and.annotate.as.safevarargs=Make final and annotate as @SafeVarargs
method.reference.mapped.to.comparator=Method reference mapped to Comparator interface does not fulfill the Comparator contract
module.0.with.language.level.1.depends.on.module.2.with.language.level.3=Module {0} with language level {1} depends on module {2} with language level {3}
non.final.field.code.ref.code.in.immutable.class.loc=Non-final field <code>#ref</code> in @Immutable class #loc
non.final.guarded.by.field.0.loc=Non-final @GuardedBy field "{0}" #loc
non.final.guarded.by.field.ref.loc=Non-final @GuardedBy field #ref #loc
non.null.type.argument.is.expected=Non-null type argument is expected
not.annotated.method.is.used.as.an.override.for.a.method.annotated.with.0=Not annotated method is used as an override for a method annotated with {0}
nullable.stuff.problems.overridden.method.parameters.are.not.annotated=Overridden method parameters are not annotated
nullable.stuff.problems.overridden.methods.are.not.annotated=Overridden methods are not annotated
parameter.can.be.null=Parameter can be null
parameter.is.always.not.null=Parameter is always not-null
possible.heap.pollution.from.parameterized.vararg.type.loc=Possible heap pollution from parameterized vararg type #loc
redundant.block.marker=Redundant block marker
remove.block.marker.comments=Remove block marker comments
remove.dependency=Remove dependency
remove.switch.branch.0=Remove switch branch ''{0}''
remove.switch.label.0=Remove switch label ''{0}''
remove.switch.label=Remove switch label
replace.0.with=Replace ''''{0}'''' with ''''=''''
replace.anonymous.class.with.lambda.alternative=Replace anonymous class with lambda alternative
replace.operator.assignment.with.assignment=Replace Operator Assignment with Assignment
replace.stringtokenizer.delimiters.parameter.with.unique.symbols=Replace StringTokenizer delimiters parameter with unique symbols
replace.var.with.explicit.type=Replace 'var' with explicit type
replace.with.0=Replace with {0}
replace.with.comparator=Replace with comparator
replace.with.constant.value=Replace with constant value
replace.with.expression.lambda=Replace with expression lambda
replace.with.lambda=Replace with lambda
report.suspicious.but.possibly.correct.method.calls=&Report suspicious but possibly correct method calls
report.when.interface.is.not.annotated.with.functional.interface=Report when interface is not annotated with @FunctionalInterface
searching.for.overriding.methods=Searching for Overriding Methods
statement.lambda.can.be.replaced.with.expression.lambda=Statement lambda can be replaced with expression lambda
static.inheritrance.fix.replace.progress=Replacing usages of {0}
static.member.guarded.by.instance.0.loc=Static member guarded by instance "{0}" #loc
static.member.guarded.by.instance.ref.loc=Static member guarded by instance #ref #loc
suppress.all.for.class=Suppress all inspections for class
suppress.inspection.class=Suppress for class
suppress.inspection.field=Suppress for field
suppress.inspection.member=Suppress for member
suppress.inspection.method=Suppress for method
suppress.inspection.module=Suppress for module declaration
suspected.module.dependency.problem.descriptor=Module ''{0}'' does not depend on module ''{1}''. Though ''{1}'' was not inspected for exported dependencies needed for scope ''{2}''
unknown.guardedby.reference.0.loc=Unknown @GuardedBy reference "{0}" #loc
unknown.guardedby.reference.ref.loc=Unknown @GuardedBy reference #ref #loc
unnecessary.module.dependency.display.name=Unnecessary module dependency
unnecessary.module.dependency.problem.descriptor=Module ''{0}'' sources do not depend on module ''{1}'' sources
unused.import.display.name=Unused import
unused.import.statement=Unused import statement
unused.library.display.name=Unused library
unused.library.problem.descriptor=Unused library ''{0}''
unused.library.roots.problem.descriptor=Unused roots {0} from library ''{1}''
var.can.be.replaced.with.explicit.type='var' can be replaced with explicit type
vararg.method.call.with.50.poly.arguments=Vararg method call with 50+ poly arguments may cause compilation and analysis slowdown
visible.for.testing.makes.little.sense.on.test.only.code=@VisibleForTesting makes little sense on @TestOnly code
@@ -72,17 +72,17 @@
<annotator language="JAVA" implementationClass="com.intellij.codeInsight.daemon.impl.JavaDocAnnotator"/>
<localInspection language="JAVA" shortName="JavaModuleNaming" enabledByDefault="true" level="WARNING"
groupPath="Java" groupBundle="messages.InspectionsBundle" groupKey="group.names.naming.conventions"
bundle="messages.InspectionsBundle" key="inspection.java.module.naming"
bundle="messages.JavaAnalysisBundle" key="inspection.java.module.naming"
implementationClass="com.intellij.codeInspection.java19modules.JavaModuleNamingInspection"/>
<localInspection language="JAVA" shortName="JavaRequiresAutoModule" enabledByDefault="true" level="WARNING"
groupPath="Java,Java language level migration aids"
groupBundle="messages.InspectionsBundle" groupKey="group.names.language.level.specific.issues.and.migration.aids9"
bundle="messages.InspectionsBundle" key="inspection.requires.auto.module"
bundle="messages.JavaAnalysisBundle" key="inspection.requires.auto.module"
implementationClass="com.intellij.codeInspection.java19modules.JavaRequiresAutoModuleInspection"/>
<localInspection groupPath="Java" language="JAVA" shortName="Java9ModuleExportsPackageToItself"
groupBundle="messages.InspectionsBundle" groupKey="group.names.visibility.issues"
enabledByDefault="true" level="WARNING"
key="inspection.module.exports.package.to.itself" bundle="messages.InspectionsBundle"
key="inspection.module.exports.package.to.itself" bundle="messages.JavaAnalysisBundle"
implementationClass="com.intellij.codeInspection.java19modules.Java9ModuleExportsPackageToItselfInspection"/>
<localInspection groupPath="Java,Java language level migration aids" language="JAVA" shortName="Java8ListSort"
groupBundle="messages.InspectionsBundle"
@@ -103,13 +103,13 @@
implementationClass="com.intellij.codeInspection.BlockMarkerCommentsInspection"
displayName="Block marker comment"/>
<localInspection language="UAST" shortName="ImplicitSubclassInspection"
bundle="messages.InspectionsBundle" key="inspection.implicit.subclass.display.name"
bundle="messages.JavaAnalysisBundle" key="inspection.implicit.subclass.display.name"
groupBundle="messages.InspectionsBundle" groupKey="group.names.inheritance.issues"
groupPath="Java"
enabledByDefault="true" level="ERROR"
implementationClass="com.intellij.codeInspection.inheritance.ImplicitSubclassInspection"/>
<localInspection groupPath="Java" language="JAVA" shortName="JavacQuirks" bundle="messages.InspectionsBundle" key="inspection.compiler.javac.quirks.name"
groupKey="group.names.compiler.issues" enabledByDefault="true" level="WARNING"
<localInspection groupPath="Java" language="JAVA" shortName="JavacQuirks" bundle="messages.JavaAnalysisBundle" key="inspection.compiler.javac.quirks.name"
groupBundle="messages.InspectionsBundle" groupKey="group.names.compiler.issues" enabledByDefault="true" level="WARNING"
implementationClass="com.intellij.codeInspection.compiler.JavacQuirksInspection" />
<localInspection groupPath="Java,Java language level migration aids" language="JAVA" suppressId="unchecked" shortName="SafeVarargsDetector"
displayName="Possible heap pollution from parameterized vararg type" groupKey="group.names.language.level.specific.issues.and.migration.aids7" groupBundle="messages.InspectionsBundle"
@@ -148,15 +148,15 @@
<localInspection groupPath="Java" language="JAVA" shortName="FieldAccessNotGuarded" displayName="Unguarded field access" groupKey="group.names.concurrency.annotation.issues" groupBundle="messages.InspectionsBundle"
enabledByDefault="false" level="WARNING"
implementationClass="com.intellij.codeInspection.concurrencyAnnotations.FieldAccessNotGuardedInspection" />
<localInspection groupPath="Java" language="JAVA" shortName="DuplicateThrows" bundle="messages.InspectionsBundle" key="inspection.duplicate.throws.display.name"
groupKey="group.names.declaration.redundancy" enabledByDefault="true" level="WARNING" cleanupTool="true"
<localInspection groupPath="Java" language="JAVA" shortName="DuplicateThrows" bundle="messages.JavaAnalysisBundle" key="inspection.duplicate.throws.display.name"
groupBundle="messages.InspectionsBundle" groupKey="group.names.declaration.redundancy" enabledByDefault="true" level="WARNING" cleanupTool="true"
implementationClass="com.intellij.codeInspection.duplicateThrows.DuplicateThrowsInspection" />
<globalInspection groupPath="Java" shortName="UnnecessaryModuleDependencyInspection" bundle="messages.InspectionsBundle"
key="unnecessary.module.dependency.display.name" groupKey="group.names.declaration.redundancy" enabledByDefault="true"
<globalInspection groupPath="Java" shortName="UnnecessaryModuleDependencyInspection" bundle="messages.JavaAnalysisBundle"
key="unnecessary.module.dependency.display.name" groupBundle="messages.InspectionsBundle" groupKey="group.names.declaration.redundancy" enabledByDefault="true"
level="WARNING"
implementationClass="com.intellij.codeInspection.unnecessaryModuleDependency.UnnecessaryModuleDependencyInspection"/>
<localInspection groupPath="Java" language="JAVA" shortName="TestOnlyProblems" bundle="messages.InspectionsBundle" key="inspection.test.only.problems.display.name"
groupKey="inspection.general.tools.group.name" enabledByDefault="false" level="WARNING"
<localInspection groupPath="Java" language="JAVA" shortName="TestOnlyProblems" bundle="messages.JavaAnalysisBundle" key="inspection.test.only.problems.display.name"
groupBundle="messages.InspectionsBundle" groupKey="inspection.general.tools.group.name" enabledByDefault="false" level="WARNING"
implementationClass="com.intellij.codeInspection.testOnly.TestOnlyInspection" />
<localInspection language="XML" shortName="DeprecatedClassUsageInspection" displayName="Deprecated API usage in XML" groupKey="group.names.xml" groupBundle="messages.InspectionsBundle"
enabledByDefault="true" level="WARNING" implementationClass="com.intellij.codeInspection.xml.DeprecatedClassUsageInspection"/>
@@ -173,41 +173,41 @@
enabledByDefault="true" level="WARNING"
implementationClass="com.intellij.codeInspection.deprecation.DeprecationInspection"/>
<registryKey key="kotlin.deprecation.inspection.enabled" defaultValue="false"/>
<localInspection groupPath="Java" language="JAVA" shortName="LocalCanBeFinal" bundle="messages.InspectionsBundle" key="inspection.local.can.be.final.display.name"
groupKey="group.names.code.style.issues" enabledByDefault="false" level="WARNING"
<localInspection groupPath="Java" language="JAVA" shortName="LocalCanBeFinal" bundle="messages.JavaAnalysisBundle" key="inspection.local.can.be.final.display.name"
groupBundle="messages.InspectionsBundle" groupKey="group.names.code.style.issues" enabledByDefault="false" level="WARNING"
cleanupTool="true"
implementationClass="com.intellij.codeInspection.localCanBeFinal.LocalCanBeFinal"/>
<localInspection groupPath="Java" language="JAVA" shortName="SuspiciousArrayMethodCall" bundle="messages.InspectionsBundle"
key="inspection.suspicious.array.method.call.display.name" groupKey="group.names.probable.bugs" enabledByDefault="true"
<localInspection groupPath="Java" language="JAVA" shortName="SuspiciousArrayMethodCall" bundle="messages.JavaAnalysisBundle"
key="inspection.suspicious.array.method.call.display.name" groupBundle="messages.InspectionsBundle" groupKey="group.names.probable.bugs" enabledByDefault="true"
level="WARNING"
implementationClass="com.intellij.codeInspection.SuspiciousArrayMethodCallInspection"/>
<localInspection groupPath="Java" language="JAVA" shortName="SuspiciousMethodCalls" bundle="messages.InspectionsBundle"
key="inspection.suspicious.collections.method.calls.display.name" groupKey="group.names.probable.bugs" enabledByDefault="true"
<localInspection groupPath="Java" language="JAVA" shortName="SuspiciousMethodCalls" bundle="messages.JavaAnalysisBundle"
key="inspection.suspicious.collections.method.calls.display.name" groupBundle="messages.InspectionsBundle" groupKey="group.names.probable.bugs" enabledByDefault="true"
level="WARNING"
implementationClass="com.intellij.codeInspection.miscGenerics.SuspiciousCollectionsMethodCallsInspection"/>
<localInspection groupPath="Java" language="JAVA" shortName="RedundantTypeArguments" bundle="messages.InspectionsBundle" key="inspection.redundant.type.display.name"
groupKey="group.names.verbose.or.redundant.code.constructs" enabledByDefault="true" level="WARNING" cleanupTool="true"
<localInspection groupPath="Java" language="JAVA" shortName="RedundantTypeArguments" bundle="messages.JavaAnalysisBundle" key="inspection.redundant.type.display.name"
groupBundle="messages.InspectionsBundle" groupKey="group.names.verbose.or.redundant.code.constructs" enabledByDefault="true" level="WARNING" cleanupTool="true"
implementationClass="com.intellij.codeInspection.miscGenerics.RedundantTypeArgsInspection"/>
<localInspection groupPath="Java" language="JAVA" shortName="RedundantCast" displayName="Redundant type cast" groupKey="group.names.verbose.or.redundant.code.constructs" groupBundle="messages.InspectionsBundle"
enabledByDefault="true" level="WARNING" cleanupTool="true"
implementationClass="com.intellij.codeInspection.redundantCast.RedundantCastInspection"/>
<localInspection groupPath="Java" language="JAVA" shortName="NumericOverflow" displayName="Numeric overflow" groupKey="group.names.numeric.issues" groupBundle="messages.InspectionsBundle" enabledByDefault="true"
level="WARNING" implementationClass="com.intellij.codeInspection.NumericOverflowInspection"/>
<localInspection groupPath="Java" language="JAVA" shortName="Contract" bundle="messages.InspectionsBundle" key="inspection.contract.display.name"
groupKey="group.names.probable.bugs" enabledByDefault="true" level="WARNING"
<localInspection groupPath="Java" language="JAVA" shortName="Contract" bundle="messages.JavaAnalysisBundle" key="inspection.contract.display.name"
groupBundle="messages.InspectionsBundle" groupKey="group.names.probable.bugs" enabledByDefault="true" level="WARNING"
implementationClass="com.intellij.codeInspection.dataFlow.ContractInspection"/>
<globalInspection groupPath="Java" language="JAVA" shortName="Java9RedundantRequiresStatement"
groupBundle="messages.InspectionsBundle" groupKey="group.names.declaration.redundancy"
enabledByDefault="true" level="WARNING" displayName="Redundant 'requires' statement in module-info"
implementationClass="com.intellij.codeInspection.java19modules.Java9RedundantRequiresStatementInspection"/>
<globalInspection groupPath="Java" language="JAVA" shortName="UNUSED_IMPORT" bundle="messages.InspectionsBundle" key="unused.import.display.name"
<globalInspection groupPath="Java" language="JAVA" shortName="UNUSED_IMPORT" bundle="messages.JavaAnalysisBundle" key="unused.import.display.name"
groupBundle="messages.InspectionsBundle" groupKey="group.names.imports" enabledByDefault="true" level="WARNING"
implementationClass="com.intellij.codeInspection.unusedImport.UnusedImportInspection"/>
<globalInspection groupPath="Java" language="JAVA" shortName="RedundantThrows" displayName="Redundant 'throws' clause" groupKey="group.names.declaration.redundancy" groupBundle="messages.InspectionsBundle"
enabledByDefault="true" level="WARNING"
implementationClass="com.intellij.codeInspection.unneededThrows.RedundantThrowsDeclarationInspection"/>
<globalInspection groupPath="Java" language="JAVA" shortName="SameReturnValue" bundle="messages.InspectionsBundle" key="inspection.same.return.value.display.name"
groupKey="group.names.declaration.redundancy" enabledByDefault="true" level="WARNING"
<globalInspection groupPath="Java" language="JAVA" shortName="SameReturnValue" bundle="messages.JavaAnalysisBundle" key="inspection.same.return.value.display.name"
groupBundle="messages.InspectionsBundle" groupKey="group.names.declaration.redundancy" enabledByDefault="true" level="WARNING"
implementationClass="com.intellij.codeInspection.sameReturnValue.SameReturnValueInspection"/>
<globalInspection groupPath="Java" language="JAVA" shortName="CanBeFinal" displayName="Declaration can have final modifier" groupKey="group.names.declaration.redundancy" groupBundle="messages.InspectionsBundle"
enabledByDefault="true" level="WARNING"
@@ -218,8 +218,8 @@
<globalInspection groupPath="Java" shortName="InconsistentLanguageLevel" displayName="Inconsistent language level settings"
groupKey="group.names.modularization.issues" groupBundle="messages.InspectionsBundle" enabledByDefault="false" level="WARNING"
implementationClass="com.intellij.codeInspection.inconsistentLanguageLevel.InconsistentLanguageLevelInspection"/>
<globalInspection groupPath="Java" shortName="UnusedLibrary" bundle="messages.InspectionsBundle" key="unused.library.display.name"
groupKey="group.names.declaration.redundancy" enabledByDefault="false" level="WARNING"
<globalInspection groupPath="Java" shortName="UnusedLibrary" bundle="messages.JavaAnalysisBundle" key="unused.library.display.name"
groupBundle="messages.InspectionsBundle" groupKey="group.names.declaration.redundancy" enabledByDefault="false" level="WARNING"
implementationClass="com.intellij.codeInspection.unusedLibraries.UnusedLibrariesInspection"/>
<inspectionElementsMerger implementation="com.intellij.codeInspection.unneededThrows.RedundantThrowsInspectionMerger"/>
<lang.foldingBuilder language="JAVA" implementationClass="com.intellij.codeInsight.daemon.impl.actions.SuppressWarningsFoldingBuilder" />
@@ -239,12 +239,12 @@
<localInspection groupPath="Java" language="JAVA" shortName="ClassGetClass"
groupBundle="messages.InspectionsBundle" groupKey="group.names.probable.bugs"
enabledByDefault="true" level="WARNING"
key="inspection.class.getclass.display.name" bundle="messages.InspectionsBundle"
key="inspection.class.getclass.display.name" bundle="messages.JavaAnalysisBundle"
implementationClass="com.intellij.codeInspection.ClassGetClassInspection"/>
<localInspection groupPath="Java" language="JAVA" shortName="ObjectsEqualsCanBeSimplified"
groupBundle="messages.InspectionsBundle" groupKey="group.names.code.style.issues"
enabledByDefault="true" level="INFORMATION"
key="inspection.objects.equals.can.be.simplified.display.name" bundle="messages.InspectionsBundle"
key="inspection.objects.equals.can.be.simplified.display.name" bundle="messages.JavaAnalysisBundle"
implementationClass="com.siyeh.ig.style.ObjectsEqualsCanBeSimplifiedInspection"/>
</extensions>
</idea-plugin>
@@ -15,10 +15,10 @@
*/
package com.intellij.codeInsight.daemon.impl.actions;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.JavaSuppressionUtil;
import com.intellij.codeInspection.SuppressionUtil;
import com.intellij.codeInspection.SuppressionUtilCore;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
@@ -63,7 +63,7 @@ public class SuppressAllForClassFix extends SuppressFix {
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("suppress.all.for.class");
return JavaAnalysisBundle.message("suppress.all.for.class");
}
@Override
@@ -17,9 +17,9 @@ package com.intellij.codeInsight.daemon.impl.actions;
import com.intellij.codeInsight.daemon.HighlightDisplayKey;
import com.intellij.codeInsight.intention.impl.BaseIntentionAction;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.JavaSuppressionUtil;
import com.intellij.codeInspection.SuppressionUtilCore;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.lang.java.JavaLanguage;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.command.undo.UndoUtil;
@@ -56,7 +56,7 @@ public class SuppressFix extends AbstractBatchSuppressByNoInspectionCommentFix {
@NotNull
public String getText() {
String myText = super.getText();
return StringUtil.isEmpty(myText) ? InspectionsBundle.message("suppress.inspection.member") : myText;
return StringUtil.isEmpty(myText) ? JavaAnalysisBundle.message("suppress.inspection.member") : myText;
}
@Override
@@ -89,16 +89,16 @@ public class SuppressFix extends AbstractBatchSuppressByNoInspectionCommentFix {
return false;
}
if (container instanceof PsiJavaModule) {
setText(InspectionsBundle.message("suppress.inspection.module"));
setText(JavaAnalysisBundle.message("suppress.inspection.module"));
}
else if (container instanceof PsiClass) {
setText(InspectionsBundle.message("suppress.inspection.class"));
setText(JavaAnalysisBundle.message("suppress.inspection.class"));
}
else if (container instanceof PsiMethod) {
setText(InspectionsBundle.message("suppress.inspection.method"));
setText(JavaAnalysisBundle.message("suppress.inspection.method"));
}
else {
setText(InspectionsBundle.message("suppress.inspection.field"));
setText(JavaAnalysisBundle.message("suppress.inspection.field"));
}
return true;
}
@@ -119,7 +119,7 @@ public class SuppressFix extends AbstractBatchSuppressByNoInspectionCommentFix {
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("suppress.inspection.member");
return JavaAnalysisBundle.message("suppress.inspection.member");
}
private boolean doSuppress(@NotNull Project project, PsiJavaDocumentedElement container) {
@@ -16,8 +16,11 @@
package com.intellij.codeInsight.daemon.impl.actions;
import com.intellij.codeInsight.daemon.HighlightDisplayKey;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.psi.*;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.psi.PsiClass;
import com.intellij.psi.PsiDeclarationStatement;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiJavaDocumentedElement;
import com.intellij.psi.util.PsiTreeUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -57,6 +60,6 @@ public class SuppressForClassFix extends SuppressFix {
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("suppress.inspection.class");
return JavaAnalysisBundle.message("suppress.inspection.class");
}
}
@@ -10,12 +10,12 @@ import com.intellij.codeInsight.daemon.impl.quickfix.QuickFixAction;
import com.intellij.codeInsight.intention.IntentionAction;
import com.intellij.codeInsight.intention.QuickFixFactory;
import com.intellij.codeInspection.InspectionProfile;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.SuppressionUtil;
import com.intellij.codeInspection.deadCode.UnusedDeclarationInspectionBase;
import com.intellij.codeInspection.unusedImport.UnusedImportInspection;
import com.intellij.codeInspection.unusedSymbol.UnusedSymbolLocalInspectionBase;
import com.intellij.codeInspection.util.SpecialAnnotationsUtilBase;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.lang.Language;
import com.intellij.lang.annotation.HighlightSeverity;
import com.intellij.openapi.Disposable;
@@ -537,7 +537,7 @@ class PostHighlightingVisitor {
VirtualFile file = PsiUtilCore.getVirtualFile(myFile);
Set<String> imports = file != null ? file.getCopyableUserData(ImportsHighlightUtil.IMPORTS_FROM_TEMPLATE) : null;
boolean predefinedImport = imports != null && imports.contains(importStatement.getText());
String description = !predefinedImport ? InspectionsBundle.message("unused.import.statement") : "Unused import (specified in template)";
String description = !predefinedImport ? JavaAnalysisBundle.message("unused.import.statement") : "Unused import (specified in template)";
HighlightInfo info = HighlightInfo.newHighlightInfo(JavaHighlightInfoTypes.UNUSED_IMPORT)
.range(importStatement)
.descriptionAndTooltip(description)
@@ -5,6 +5,7 @@ import com.intellij.codeInsight.AnnotationUtil;
import com.intellij.codeInsight.FileModificationService;
import com.intellij.codeInsight.intention.AddAnnotationPsiFix;
import com.intellij.codeInspection.nullable.NullableStuffInspectionBase;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.application.ReadAction;
import com.intellij.openapi.command.undo.UndoUtil;
import com.intellij.openapi.diagnostic.Logger;
@@ -57,11 +58,11 @@ public class AnnotateMethodFix implements LocalQuickFix {
public String getFamilyName() {
if (annotateSelf()) {
if (annotateOverriddenMethods()) {
return InspectionsBundle.message("inspection.annotate.overridden.method.and.self.quickfix.family.name");
return JavaAnalysisBundle.message("inspection.annotate.overridden.method.and.self.quickfix.family.name");
}
return InspectionsBundle.message("inspection.annotate.method.quickfix.family.name");
return JavaAnalysisBundle.message("inspection.annotate.method.quickfix.family.name");
}
return InspectionsBundle.message("inspection.annotate.overridden.method.quickfix.family.name");
return JavaAnalysisBundle.message("inspection.annotate.overridden.method.quickfix.family.name");
}
@Override
@@ -118,6 +119,6 @@ public class AnnotateMethodFix implements LocalQuickFix {
}
});
}
}, InspectionsBundle.message("searching.for.overriding.methods"), true, method.getProject());
}, JavaAnalysisBundle.message("searching.for.overriding.methods"), true, method.getProject());
}
}
@@ -6,6 +6,7 @@ import com.intellij.codeInsight.ChangeContextUtil;
import com.intellij.codeInsight.daemon.impl.analysis.HighlightControlFlowUtil;
import com.intellij.codeInsight.intention.HighPriorityAction;
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Comparing;
@@ -59,7 +60,7 @@ public class AnonymousCanBeLambdaInspection extends AbstractBaseJavaLocalInspect
@Nullable
@Override
public JComponent createOptionsPanel() {
return new SingleCheckboxOptionsPanel(InspectionsBundle.message("report.when.interface.is.not.annotated.with.functional.interface"), this, "reportNotAnnotatedInterfaces");
return new SingleCheckboxOptionsPanel(JavaAnalysisBundle.message("report.when.interface.is.not.annotated.with.functional.interface"), this, "reportNotAnnotatedInterfaces");
}
@NotNull
@@ -82,7 +83,7 @@ public class AnonymousCanBeLambdaInspection extends AbstractBaseJavaLocalInspect
type = ProblemHighlightType.INFORMATION;
}
}
holder.registerProblem(parent, InspectionsBundle.message("anonymous.ref.loc.can.be.replaced.with.lambda"),
holder.registerProblem(parent, JavaAnalysisBundle.message("anonymous.ref.loc.can.be.replaced.with.lambda"),
type, rangeInElement, new ReplaceWithLambdaFix());
}
}
@@ -380,7 +381,7 @@ public class AnonymousCanBeLambdaInspection extends AbstractBaseJavaLocalInspect
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("replace.with.lambda");
return JavaAnalysisBundle.message("replace.with.lambda");
}
@Override
@@ -1,6 +1,7 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.codeInspection;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.TextRange;
@@ -59,7 +60,7 @@ public class AnonymousHasLambdaAlternativeInspection extends AbstractBaseJavaLoc
LOG.assertTrue(lBrace != null);
final TextRange rangeInElement = new TextRange(0, lBrace.getStartOffsetInParent() + aClass.getStartOffsetInParent() - 1);
holder.registerProblem(aClass.getParent(),
InspectionsBundle.message("anonymous.ref.loc.can.be.replaced.with.0", alternative.myReplacementMessage),
JavaAnalysisBundle.message("anonymous.ref.loc.can.be.replaced.with.0", alternative.myReplacementMessage),
ProblemHighlightType.LIKE_UNUSED_SYMBOL, rangeInElement, new ReplaceWithLambdaAlternativeFix(alternative));
}
}
@@ -89,14 +90,14 @@ public class AnonymousHasLambdaAlternativeInspection extends AbstractBaseJavaLoc
@NotNull
@Override
public String getName() {
return InspectionsBundle.message("replace.with.0", myAlternative.myReplacementMessage);
return JavaAnalysisBundle.message("replace.with.0", myAlternative.myReplacementMessage);
}
@Nls
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("replace.anonymous.class.with.lambda.alternative");
return JavaAnalysisBundle.message("replace.anonymous.class.with.lambda.alternative");
}
@Override
@@ -1,6 +1,7 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.codeInspection;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.lang.Commenter;
import com.intellij.lang.LanguageCommenters;
import com.intellij.openapi.project.Project;
@@ -11,7 +12,6 @@ import com.intellij.patterns.PsiJavaElementPattern;
import com.intellij.psi.*;
import com.intellij.psi.tree.IElementType;
import com.intellij.util.ProcessingContext;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
import static com.intellij.patterns.PsiJavaPatterns.or;
@@ -77,11 +77,11 @@ public class BlockMarkerCommentsInspection extends AbstractBaseJavaLocalInspecti
return;
}
if (MARKER_PATTERN.accepts(element)) {
holder.registerProblem(element, InspectionsBundle.message("redundant.block.marker"), new LocalQuickFix() {
holder.registerProblem(element, JavaAnalysisBundle.message("redundant.block.marker"), new LocalQuickFix() {
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("remove.block.marker.comments");
return JavaAnalysisBundle.message("remove.block.marker.comments");
}
@Override
@@ -1,6 +1,7 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.codeInspection;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.util.PsiTreeUtil;
@@ -32,7 +33,7 @@ public class ClassGetClassInspection extends AbstractBaseJavaLocalInspectionTool
if (!(type instanceof PsiClassType)) return;
if (!((PsiClassType)type).rawType().equalsToText(CommonClassNames.JAVA_LANG_CLASS)) return;
holder.registerProblem(Objects.requireNonNull(call.getMethodExpression().getReferenceNameElement()),
InspectionsBundle.message("inspection.class.getclass.message"),
JavaAnalysisBundle.message("inspection.class.getclass.message"),
new RemoveGetClassCallFix(), new ReplaceWithClassClassFix());
}
};
@@ -43,7 +44,7 @@ public class ClassGetClassInspection extends AbstractBaseJavaLocalInspectionTool
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("inspection.class.getclass.fix.remove.name");
return JavaAnalysisBundle.message("inspection.class.getclass.fix.remove.name");
}
@Override
@@ -61,7 +62,7 @@ public class ClassGetClassInspection extends AbstractBaseJavaLocalInspectionTool
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("inspection.class.getclass.fix.replace.name");
return JavaAnalysisBundle.message("inspection.class.getclass.fix.replace.name");
}
@Override
@@ -2,6 +2,7 @@
package com.intellij.codeInspection;
import com.intellij.codeInspection.deprecation.DeprecationInspectionBase;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.psi.*;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.psi.search.PsiSearchHelper;
@@ -38,7 +39,7 @@ public class DeprecatedIsStillUsedInspection extends LocalInspectionTool {
PsiSearchHelper searchHelper = PsiSearchHelper.getInstance(member.getProject());
String name = member.getName();
if (name != null && hasUsages(member, name, searchHelper, member.getResolveScope())) {
holder.registerProblem(identifier, InspectionsBundle.message("deprecated.member.0.is.still.used", name));
holder.registerProblem(identifier, JavaAnalysisBundle.message("deprecated.member.0.is.still.used", name));
}
}
@@ -2,6 +2,7 @@
package com.intellij.codeInspection;
import com.intellij.codeInsight.intention.HighPriorityAction;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.TextRange;
@@ -53,7 +54,7 @@ public class ExplicitTypeCanBeDiamondInspection extends AbstractBaseJavaLocalIns
final PsiElement lastChild = parameterList.getLastChild();
final TextRange range = new TextRange(firstChild != null && firstChild.getNode().getElementType() == JavaTokenType.LT ? 1 : 0,
parameterList.getTextLength() - (lastChild != null && lastChild.getNode().getElementType() == JavaTokenType.GT ? 1 : 0));
holder.registerProblem(parameterList, InspectionsBundle.message("explicit.type.argument.ref.loc.can.be.replaced.with"), ProblemHighlightType.LIKE_UNUSED_SYMBOL, range, new ReplaceWithDiamondFix());
holder.registerProblem(parameterList, JavaAnalysisBundle.message("explicit.type.argument.ref.loc.can.be.replaced.with"), ProblemHighlightType.LIKE_UNUSED_SYMBOL, range, new ReplaceWithDiamondFix());
}
}
};
@@ -1,6 +1,7 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.codeInspection;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.codeStyle.JavaCodeStyleManager;
@@ -29,7 +30,7 @@ public class InvalidComparatorMethodReferenceInspection extends AbstractBaseJava
holder
.registerProblem(expression,
InspectionsBundle
JavaAnalysisBundle
.message("method.reference.mapped.to.comparator"),
new ReplaceWithComparatorQuickFix(name.equals("min")));
}
@@ -70,7 +71,7 @@ public class InvalidComparatorMethodReferenceInspection extends AbstractBaseJava
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("replace.with.comparator");
return JavaAnalysisBundle.message("replace.with.comparator");
}
@Override
@@ -3,6 +3,7 @@ package com.intellij.codeInspection;
import com.intellij.codeInsight.daemon.JavaErrorBundle;
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Key;
import com.intellij.psi.*;
@@ -27,7 +28,7 @@ public class NumericOverflowInspection extends AbstractBaseJavaLocalInspectionTo
@Nullable
@Override
public JComponent createOptionsPanel() {
return new SingleCheckboxOptionsPanel(InspectionsBundle.message("ignore.operation.which.results.in.negative.value"), this,
return new SingleCheckboxOptionsPanel(JavaAnalysisBundle.message("ignore.operation.which.results.in.negative.value"), this,
"ignoreLeftShiftWithNegativeResult");
}
@@ -5,6 +5,7 @@ import com.intellij.codeInsight.AnnotationUtil;
import com.intellij.codeInsight.daemon.impl.analysis.GenericsHighlightUtil;
import com.intellij.codeInsight.daemon.impl.analysis.JavaGenericsUtil;
import com.intellij.codeInsight.intention.AddAnnotationPsiFix;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.application.WriteAction;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.diagnostic.Logger;
@@ -58,7 +59,7 @@ public class PossibleHeapPollutionVarargsInspection extends AbstractBaseJavaLoca
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("annotate.as.safevarargs");
return JavaAnalysisBundle.message("annotate.as.safevarargs");
}
@Override
@@ -90,7 +91,7 @@ public class PossibleHeapPollutionVarargsInspection extends AbstractBaseJavaLoca
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("make.final.and.annotate.as.safevarargs");
return JavaAnalysisBundle.message("make.final.and.annotate.as.safevarargs");
}
@Nullable
@@ -157,7 +158,7 @@ public class PossibleHeapPollutionVarargsInspection extends AbstractBaseJavaLoca
final PsiElement nameIdentifier = ((PsiNameIdentifierOwner)aClass).getNameIdentifier();
if (nameIdentifier != null) {
final LocalQuickFix quickFix = new AnnotateAsSafeVarargsQuickFix();
myHolder.registerProblem(nameIdentifier, InspectionsBundle.message("possible.heap.pollution.from.parameterized.vararg.type.loc"), quickFix);
myHolder.registerProblem(nameIdentifier, JavaAnalysisBundle.message("possible.heap.pollution.from.parameterized.vararg.type.loc"), quickFix);
}
}
@@ -197,7 +198,7 @@ public class PossibleHeapPollutionVarargsInspection extends AbstractBaseJavaLoca
OverridingMethodsSearch.search(method).findFirst() == null;
quickFix = canBeFinal ? new MakeFinalAndAnnotateQuickFix() : null;
}
myHolder.registerProblem(nameIdentifier, InspectionsBundle.message("possible.heap.pollution.from.parameterized.vararg.type.loc"), quickFix);
myHolder.registerProblem(nameIdentifier, JavaAnalysisBundle.message("possible.heap.pollution.from.parameterized.vararg.type.loc"), quickFix);
}
}
}
@@ -2,6 +2,7 @@
package com.intellij.codeInspection;
import com.intellij.codeInsight.intention.HighPriorityAction;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
@@ -53,7 +54,7 @@ public class RedundantLambdaCodeBlockInspection extends AbstractBaseJavaLocalIns
} else {
errorElement = body.getFirstChild();
}
holder.registerProblem(errorElement, InspectionsBundle.message("statement.lambda.can.be.replaced.with.expression.lambda"),
holder.registerProblem(errorElement, JavaAnalysisBundle.message("statement.lambda.can.be.replaced.with.expression.lambda"),
ProblemHighlightType.LIKE_UNUSED_SYMBOL, new ReplaceWithExprFix());
}
}
@@ -99,7 +100,7 @@ public class RedundantLambdaCodeBlockInspection extends AbstractBaseJavaLocalIns
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("replace.with.expression.lambda");
return JavaAnalysisBundle.message("replace.with.expression.lambda");
}
@Override
@@ -1,6 +1,7 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.codeInspection;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.psi.*;
@@ -55,7 +56,7 @@ public class StringTokenizerDelimiterInspection extends AbstractBaseJavaLocalIns
final Set<Character> chars = new THashSet<>();
for (char c : delimiters.toCharArray()) {
if (!chars.add(c)) {
holder.registerProblem(delimiterArgument, InspectionsBundle.message("delimiters.argument.contains.duplicated.characters"),
holder.registerProblem(delimiterArgument, JavaAnalysisBundle.message("delimiters.argument.contains.duplicated.characters"),
new ReplaceDelimitersWithUnique(delimiterArgument));
return;
}
@@ -78,7 +79,7 @@ public class StringTokenizerDelimiterInspection extends AbstractBaseJavaLocalIns
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("replace.stringtokenizer.delimiters.parameter.with.unique.symbols");
return JavaAnalysisBundle.message("replace.stringtokenizer.delimiters.parameter.with.unique.symbols");
}
@Override
@@ -1,6 +1,7 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.codeInspection;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.psi.*;
import com.intellij.psi.util.TypeConversionUtil;
import com.intellij.util.containers.ContainerUtil;
@@ -58,7 +59,7 @@ public class SuspiciousArrayMethodCallInspection extends AbstractBaseJavaLocalIn
elementType = TypeConversionUtil.erasure(elementType);
arrayElementType = TypeConversionUtil.erasure(arrayElementType);
if (!TypeConversionUtil.areTypesConvertible(elementType, arrayElementType)) {
holder.registerProblem(element, InspectionsBundle.message("inspection.suspicious.array.method.call.problem.element"));
holder.registerProblem(element, JavaAnalysisBundle.message("inspection.suspicious.array.method.call.problem.element"));
}
}
@@ -74,7 +75,7 @@ public class SuspiciousArrayMethodCallInspection extends AbstractBaseJavaLocalIn
array2ElementType = TypeConversionUtil.erasure(array2ElementType);
if (!TypeConversionUtil.areTypesConvertible(array1ElementType, array2ElementType) ||
!TypeConversionUtil.areTypesConvertible(array2ElementType, array1ElementType)) {
holder.registerProblem(context, InspectionsBundle.message("inspection.suspicious.array.method.call.problem.arrays"));
holder.registerProblem(context, JavaAnalysisBundle.message("inspection.suspicious.array.method.call.problem.arrays"));
}
}
};
@@ -2,6 +2,7 @@
package com.intellij.codeInspection;
import com.intellij.codeInsight.PsiEquivalenceUtil;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Pair;
import com.intellij.pom.java.LanguageLevel;
@@ -62,7 +63,7 @@ public class UseCompareMethodInspection extends AbstractBaseJavaLocalInspectionT
}
private void register(CompareInfo info, PsiElement nameElement) {
holder.registerProblem(nameElement, InspectionsBundle.message("inspection.can.be.replaced.with.message", info.myClass.getClassName() + ".compare"),
holder.registerProblem(nameElement, JavaAnalysisBundle.message("inspection.can.be.replaced.with.message", info.myClass.getClassName() + ".compare"),
new ReplaceWithPrimitiveCompareFix(info.getReplacementText()));
}
};
@@ -339,7 +340,7 @@ public class UseCompareMethodInspection extends AbstractBaseJavaLocalInspectionT
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("inspection.use.compare.method.fix.family.name");
return JavaAnalysisBundle.message("inspection.use.compare.method.fix.family.name");
}
@Override
@@ -1,6 +1,7 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.codeInspection;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.util.PsiTypesUtil;
@@ -47,7 +48,7 @@ public class VariableTypeCanBeExplicitInspection extends AbstractBaseJavaLocalIn
private void registerTypeElementProblem(PsiTypeElement typeElement) {
holder.registerProblem(typeElement,
InspectionsBundle.message("var.can.be.replaced.with.explicit.type"),
JavaAnalysisBundle.message("var.can.be.replaced.with.explicit.type"),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
new ReplaceVarWithExplicitTypeFix());
}
@@ -70,7 +71,7 @@ public class VariableTypeCanBeExplicitInspection extends AbstractBaseJavaLocalIn
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("replace.var.with.explicit.type");
return JavaAnalysisBundle.message("replace.var.with.explicit.type");
}
@Override
@@ -19,6 +19,7 @@ package com.intellij.codeInspection.canBeFinal;
import com.intellij.analysis.AnalysisScope;
import com.intellij.codeInspection.*;
import com.intellij.codeInspection.reference.*;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
@@ -56,19 +57,19 @@ public class CanBeFinalInspection extends GlobalJavaBatchInspectionTool {
gc.anchor = GridBagConstraints.NORTHWEST;
myReportClassesCheckbox = new JCheckBox(InspectionsBundle.message("inspection.can.be.final.option"));
myReportClassesCheckbox = new JCheckBox(JavaAnalysisBundle.message("inspection.can.be.final.option"));
myReportClassesCheckbox.setSelected(REPORT_CLASSES);
myReportClassesCheckbox.getModel().addItemListener(e -> REPORT_CLASSES = myReportClassesCheckbox.isSelected());
gc.gridy = 0;
add(myReportClassesCheckbox, gc);
myReportMethodsCheckbox = new JCheckBox(InspectionsBundle.message("inspection.can.be.final.option1"));
myReportMethodsCheckbox = new JCheckBox(JavaAnalysisBundle.message("inspection.can.be.final.option1"));
myReportMethodsCheckbox.setSelected(REPORT_METHODS);
myReportMethodsCheckbox.getModel().addItemListener(e -> REPORT_METHODS = myReportMethodsCheckbox.isSelected());
gc.gridy++;
add(myReportMethodsCheckbox, gc);
myReportFieldsCheckbox = new JCheckBox(InspectionsBundle.message("inspection.can.be.final.option2"));
myReportFieldsCheckbox = new JCheckBox(JavaAnalysisBundle.message("inspection.can.be.final.option2"));
myReportFieldsCheckbox.setSelected(REPORT_FIELDS);
myReportFieldsCheckbox.getModel().addItemListener(e -> REPORT_FIELDS = myReportFieldsCheckbox.isSelected());
@@ -142,7 +143,7 @@ public class CanBeFinalInspection extends GlobalJavaBatchInspectionTool {
if (psiIdentifier != null) {
return new ProblemDescriptor[]{manager.createProblemDescriptor(psiIdentifier, InspectionsBundle.message(
return new ProblemDescriptor[]{manager.createProblemDescriptor(psiIdentifier, JavaAnalysisBundle.message(
"inspection.export.results.can.be.final.description"), new AcceptSuggested(globalContext.getRefManager()),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING, false)};
}
@@ -264,6 +265,6 @@ public class CanBeFinalInspection extends GlobalJavaBatchInspectionTool {
}
private static String getQuickFixName() {
return InspectionsBundle.message("inspection.can.be.final.accept.quickfix");
return JavaAnalysisBundle.message("inspection.can.be.final.accept.quickfix");
}
}
@@ -7,8 +7,12 @@ import com.intellij.codeInsight.daemon.impl.actions.SuppressByJavaCommentFix;
import com.intellij.codeInsight.daemon.impl.analysis.JavaHighlightUtil;
import com.intellij.codeInsight.daemon.impl.quickfix.AddTypeArgumentsFix;
import com.intellij.codeInsight.intention.QuickFixFactory;
import com.intellij.codeInspection.*;
import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.codeInspection.ProblemHighlightType;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.codeInspection.miscGenerics.RedundantTypeArgsInspection;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.application.WriteAction;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.projectRoots.JavaSdkVersion;
@@ -48,8 +52,8 @@ public class JavacQuirksInspectionVisitor extends JavaElementVisitor {
if (PsiUtil.isLanguageLevel7OrHigher(initializer)) return;
final PsiElement lastElement = PsiTreeUtil.skipWhitespacesAndCommentsBackward(initializer.getLastChild());
if (lastElement != null && PsiUtil.isJavaToken(lastElement, JavaTokenType.COMMA)) {
final String message = InspectionsBundle.message("inspection.compiler.javac.quirks.anno.array.comma.problem");
final String fixName = InspectionsBundle.message("inspection.compiler.javac.quirks.anno.array.comma.fix");
final String message = JavaAnalysisBundle.message("inspection.compiler.javac.quirks.anno.array.comma.problem");
final String fixName = JavaAnalysisBundle.message("inspection.compiler.javac.quirks.anno.array.comma.fix");
myHolder.registerProblem(lastElement, message, QuickFixFactory.getInstance().createDeleteFix(lastElement, fixName));
}
}
@@ -64,8 +68,8 @@ public class JavacQuirksInspectionVisitor extends JavaElementVisitor {
public void visitReferenceParameterList(final PsiReferenceParameterList list) {
super.visitReferenceParameterList(list);
if (list.getFirstChild() != null && QUALIFIER_REFERENCE.accepts(list)) {
final String message = InspectionsBundle.message("inspection.compiler.javac.quirks.qualifier.type.args.problem");
final String fixName = InspectionsBundle.message("inspection.compiler.javac.quirks.qualifier.type.args.fix");
final String message = JavaAnalysisBundle.message("inspection.compiler.javac.quirks.qualifier.type.args.problem");
final String fixName = JavaAnalysisBundle.message("inspection.compiler.javac.quirks.qualifier.type.args.fix");
myHolder.registerProblem(list, message, QuickFixFactory.getInstance().createDeleteFix(list, fixName));
}
}
@@ -147,7 +151,7 @@ public class JavacQuirksInspectionVisitor extends JavaElementVisitor {
for (int i = method.getParameterList().getParametersCount(); i < args.length; i++) {
if (PsiPolyExpressionUtil.isPolyExpression(args[i]) && ++ count > 50) {
myHolder.registerProblem(expression.getMethodExpression(),
InspectionsBundle
JavaAnalysisBundle
.message("vararg.method.call.with.50.poly.arguments"),
new MyAddExplicitTypeArgumentsFix());
break;
@@ -171,7 +175,7 @@ public class JavacQuirksInspectionVisitor extends JavaElementVisitor {
(TypeConversionUtil.isPrimitiveAndNotNull(ltype) ^ TypeConversionUtil.isPrimitiveAndNotNull(rtype)) &&
TypeConversionUtil.isBinaryOperatorApplicable(expression.getOperationTokenType(), ltype, rtype, false) &&
TypeConversionUtil.areTypesConvertible(rtype, ltype)) {
myHolder.registerProblem(expression.getOperationSign(), InspectionsBundle
myHolder.registerProblem(expression.getOperationSign(), JavaAnalysisBundle
.message("comparision.between.object.and.primitive"), ProblemHighlightType.GENERIC_ERROR_OR_WARNING);
}
}
@@ -189,14 +193,14 @@ public class JavacQuirksInspectionVisitor extends JavaElementVisitor {
@NotNull
@Override
public String getName() {
return InspectionsBundle.message("replace.0.with", myOperationSign);
return JavaAnalysisBundle.message("replace.0.with", myOperationSign);
}
@Nls
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("replace.operator.assignment.with.assignment");
return JavaAnalysisBundle.message("replace.operator.assignment.with.assignment");
}
@Override
@@ -5,6 +5,7 @@ import com.intellij.codeInsight.PsiEquivalenceUtil;
import com.intellij.codeInspection.AbstractBaseJavaLocalInspectionTool;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.psi.*;
import com.intellij.psi.util.InheritanceUtil;
import com.intellij.psi.util.PsiTreeUtil;
@@ -181,7 +182,7 @@ public class FieldAccessNotGuardedInspection extends AbstractBaseJavaLocalInspec
}
check = syncStatement;
}
myHolder.registerProblem(expression, InspectionsBundle.message("access.to.field.code.ref.code.outside.of.declared.guards.loc"));
myHolder.registerProblem(expression, JavaAnalysisBundle.message("access.to.field.code.ref.code.outside.of.declared.guards.loc"));
}
private static PsiClass getClassFromThisExpression(PsiThisExpression thisExpression, PsiElement context) {
@@ -4,6 +4,7 @@ package com.intellij.codeInspection.concurrencyAnnotations;
import com.intellij.codeInspection.AbstractBaseJavaLocalInspectionTool;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.psi.*;
import com.intellij.psi.javadoc.PsiDocTag;
import com.intellij.psi.util.PsiTreeUtil;
@@ -63,7 +64,7 @@ public class InstanceGuardedByStaticInspection extends AbstractBaseJavaLocalInsp
if (!guardField.hasModifierProperty(PsiModifier.STATIC)) {
return;
}
myHolder.registerProblem(psiDocTag, InspectionsBundle.message("instance.member.guarded.by.static.0.loc", guardValue));
myHolder.registerProblem(psiDocTag, JavaAnalysisBundle.message("instance.member.guarded.by.static.0.loc", guardValue));
}
@Override
@@ -99,7 +100,7 @@ public class InstanceGuardedByStaticInspection extends AbstractBaseJavaLocalInsp
if (!guardField.hasModifierProperty(PsiModifier.STATIC)) {
return;
}
myHolder.registerProblem(guardRef, InspectionsBundle.message("instance.member.guarded.by.static.ref.loc"));
myHolder.registerProblem(guardRef, JavaAnalysisBundle.message("instance.member.guarded.by.static.ref.loc"));
}
}
}
@@ -4,6 +4,7 @@ package com.intellij.codeInspection.concurrencyAnnotations;
import com.intellij.codeInspection.AbstractBaseJavaLocalInspectionTool;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.psi.*;
import org.jetbrains.annotations.NotNull;
@@ -38,7 +39,7 @@ public class NonFinalFieldInImmutableInspection extends AbstractBaseJavaLocalIns
return;
}
holder.registerProblem(field.getNameIdentifier(),
InspectionsBundle.message("non.final.field.code.ref.code.in.immutable.class.loc"));
JavaAnalysisBundle.message("non.final.field.code.ref.code.in.immutable.class.loc"));
}
}
};
@@ -4,6 +4,7 @@ package com.intellij.codeInspection.concurrencyAnnotations;
import com.intellij.codeInspection.AbstractBaseJavaLocalInspectionTool;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.psi.*;
import com.intellij.psi.javadoc.PsiDocTag;
import com.intellij.psi.util.PsiTreeUtil;
@@ -63,7 +64,7 @@ public class NonFinalGuardInspection extends AbstractBaseJavaLocalInspectionTool
if (member == null) {
return;
}
myHolder.registerProblem(member, InspectionsBundle.message("non.final.guarded.by.field.ref.loc"));
myHolder.registerProblem(member, JavaAnalysisBundle.message("non.final.guarded.by.field.ref.loc"));
}
@Override
@@ -87,7 +88,7 @@ public class NonFinalGuardInspection extends AbstractBaseJavaLocalInspectionTool
if (guardField.hasModifierProperty(PsiModifier.FINAL)) {
return;
}
myHolder.registerProblem(psiDocTag, InspectionsBundle.message("non.final.guarded.by.field.0.loc", guardValue));
myHolder.registerProblem(psiDocTag, JavaAnalysisBundle.message("non.final.guarded.by.field.0.loc", guardValue));
}
}
}
@@ -4,6 +4,7 @@ package com.intellij.codeInspection.concurrencyAnnotations;
import com.intellij.codeInspection.AbstractBaseJavaLocalInspectionTool;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.psi.*;
import com.intellij.psi.javadoc.PsiDocTag;
import com.intellij.psi.util.PsiTreeUtil;
@@ -104,11 +105,11 @@ public class StaticGuardedByInstanceInspection extends AbstractBaseJavaLocalInsp
if (guardField.hasModifierProperty(PsiModifier.STATIC)) {
return;
}
myHolder.registerProblem(psiDocTag, InspectionsBundle.message("static.member.guarded.by.instance.0.loc", guardValue));
myHolder.registerProblem(psiDocTag, JavaAnalysisBundle.message("static.member.guarded.by.instance.0.loc", guardValue));
}
private void registerError(PsiElement element) {
myHolder.registerProblem(element, InspectionsBundle.message("static.member.guarded.by.instance.ref.loc"));
myHolder.registerProblem(element, JavaAnalysisBundle.message("static.member.guarded.by.instance.ref.loc"));
}
}
}
@@ -4,6 +4,7 @@ package com.intellij.codeInspection.concurrencyAnnotations;
import com.intellij.codeInspection.AbstractBaseJavaLocalInspectionTool;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.psi.*;
import com.intellij.psi.impl.source.DummyHolder;
import com.intellij.psi.javadoc.PsiDocTag;
@@ -56,7 +57,7 @@ public class UnknownGuardInspection extends AbstractBaseJavaLocalInspectionTool
if (member == null) {
return;
}
myHolder.registerProblem(member, InspectionsBundle.message("unknown.guardedby.reference.ref.loc"));
myHolder.registerProblem(member, JavaAnalysisBundle.message("unknown.guardedby.reference.ref.loc"));
}
private static boolean isValidGuardText(@Nullable String guardText, @NotNull PsiElement context) {
@@ -160,7 +161,7 @@ public class UnknownGuardInspection extends AbstractBaseJavaLocalInspectionTool
if (isValidGuardText(guardValue, psiDocTag)) {
return;
}
myHolder.registerProblem(psiDocTag, InspectionsBundle.message("unknown.guardedby.reference.0.loc", guardValue));
myHolder.registerProblem(psiDocTag, JavaAnalysisBundle.message("unknown.guardedby.reference.0.loc", guardValue));
}
}
}
@@ -425,12 +425,12 @@ public abstract class DataFlowInspectionBase extends AbstractBaseJavaLocalInspec
if (reporter.isOnTheFly()) {
if (ref instanceof PsiReferenceExpression) {
fixes.add(new SetInspectionOptionFix(this, "REPORT_CONSTANT_REFERENCE_VALUES",
InspectionsBundle.message("inspection.data.flow.turn.off.constant.references.quickfix"),
JavaAnalysisBundle.message("inspection.data.flow.turn.off.constant.references.quickfix"),
false));
}
if (isAssertion) {
fixes.add(new SetInspectionOptionFix(this, "DONT_REPORT_TRUE_ASSERT_STATEMENTS",
InspectionsBundle.message("inspection.data.flow.turn.off.true.asserts.quickfix"), true));
JavaAnalysisBundle.message("inspection.data.flow.turn.off.true.asserts.quickfix"), true));
}
}
if (reporter.isOnTheFly()) {
@@ -615,7 +615,7 @@ public abstract class DataFlowInspectionBase extends AbstractBaseJavaLocalInspec
LocalQuickFix[] fixes = {AddAnnotationPsiFix.createAddNotNullFix(method)};
if (holder.isOnTheFly()) {
fixes = ArrayUtil.append(fixes, new SetInspectionOptionFix(this, "REPORT_NULLABLE_METHODS_RETURNING_NOT_NULL",
InspectionsBundle
JavaAnalysisBundle
.message(
"inspection.data.flow.turn.off.nullable.returning.notnull.quickfix"),
false));
@@ -762,7 +762,7 @@ public abstract class DataFlowInspectionBase extends AbstractBaseJavaLocalInspec
ContainerUtil.addIfNotNull(fixes, createSimplifyBooleanExpressionFix(psiAnchor, evaluatesToTrue));
if (isAssertion && reporter.isOnTheFly()) {
fixes.add(new SetInspectionOptionFix(this, "DONT_REPORT_TRUE_ASSERT_STATEMENTS",
InspectionsBundle.message("inspection.data.flow.turn.off.true.asserts.quickfix"), true));
JavaAnalysisBundle.message("inspection.data.flow.turn.off.true.asserts.quickfix"), true));
}
ContainerUtil.addIfNotNull(fixes, createReplaceWithNullCheckFix(psiAnchor, evaluatesToTrue));
}
@@ -1099,7 +1099,7 @@ public abstract class DataFlowInspectionBase extends AbstractBaseJavaLocalInspec
@Override
public @NotNull String getFamilyName() {
return InspectionsBundle.message("inspection.data.flow.simplify.boolean.expression.quickfix");
return JavaAnalysisBundle.message("inspection.data.flow.simplify.boolean.expression.quickfix");
}
};
}
@@ -1,9 +1,9 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.codeInspection.dataFlow.fix;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.impl.PsiImplUtil;
@@ -49,15 +49,15 @@ public class DeleteSwitchLabelFix implements LocalQuickFix {
@Override
public String getName() {
return myBranch ?
InspectionsBundle.message("remove.switch.branch.0", myName) :
InspectionsBundle.message("remove.switch.label.0", myName);
JavaAnalysisBundle.message("remove.switch.branch.0", myName) :
JavaAnalysisBundle.message("remove.switch.label.0", myName);
}
@Nls(capitalization = Nls.Capitalization.Sentence)
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("remove.switch.label");
return JavaAnalysisBundle.message("remove.switch.label");
}
@Override
@@ -15,9 +15,9 @@
*/
package com.intellij.codeInspection.dataFlow.fix;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.codeStyle.JavaCodeStyleManager;
@@ -34,7 +34,7 @@ public class RedundantInstanceofFix implements LocalQuickFix {
@Override
@NotNull
public String getFamilyName() {
return InspectionsBundle.message("inspection.data.flow.redundant.instanceof.quickfix");
return JavaAnalysisBundle.message("inspection.data.flow.redundant.instanceof.quickfix");
}
@Override
@@ -16,9 +16,9 @@
package com.intellij.codeInspection.dataFlow.fix;
import com.intellij.codeInspection.CommonQuickFixBundle;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.refactoring.extractMethod.ExtractMethodUtil;
@@ -45,7 +45,7 @@ public class ReplaceWithConstantValueFix implements LocalQuickFix {
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("replace.with.constant.value");
return JavaAnalysisBundle.message("replace.with.constant.value");
}
@Override
@@ -15,9 +15,9 @@
*/
package com.intellij.codeInspection.dataFlow.fix;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.util.PsiTreeUtil;
@@ -30,7 +30,7 @@ public class SimplifyToAssignmentFix implements LocalQuickFix {
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("inspection.data.flow.simplify.to.assignment.quickfix.name");
return JavaAnalysisBundle.message("inspection.data.flow.simplify.to.assignment.quickfix.name");
}
@Override
@@ -15,9 +15,9 @@
*/
package com.intellij.codeInspection.dataFlow.fix;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.psi.JavaPsiFacade;
import com.intellij.psi.PsiExpression;
@@ -41,14 +41,14 @@ public class SurroundWithRequireNonNullFix implements LocalQuickFix {
@NotNull
@Override
public String getName() {
return InspectionsBundle.message("inspection.surround.requirenonnull.quickfix", myText);
return JavaAnalysisBundle.message("inspection.surround.requirenonnull.quickfix", myText);
}
@Nls
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("inspection.surround.requirenonnull.quickfix", "");
return JavaAnalysisBundle.message("inspection.surround.requirenonnull.quickfix", "");
}
@Override
@@ -2,10 +2,10 @@
package com.intellij.codeInspection.deprecation;
import com.intellij.codeInspection.DeprecationUtil;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.codeInspection.apiUsage.ApiUsageUastVisitor;
import com.intellij.codeInspection.ui.MultipleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.psi.PsiElementVisitor;
import org.jetbrains.annotations.NotNull;
@@ -57,10 +57,10 @@ public class DeprecationInspection extends DeprecationInspectionBase {
@Override
public JComponent createOptionsPanel() {
final MultipleCheckboxOptionsPanel panel = new MultipleCheckboxOptionsPanel(this);
panel.addCheckbox(InspectionsBundle.message("ignore.inside.deprecated.members"), "IGNORE_INSIDE_DEPRECATED");
panel.addCheckbox(InspectionsBundle.message("ignore.inside.non.static.imports"), "IGNORE_IMPORT_STATEMENTS");
panel.addCheckbox(InspectionsBundle.message("html.ignore.overrides.of.deprecated.abstract.methods"), "IGNORE_ABSTRACT_DEPRECATED_OVERRIDES");
panel.addCheckbox(InspectionsBundle.message("ignore.members.of.deprecated.classes"), IGNORE_METHODS_OF_DEPRECATED_NAME);
panel.addCheckbox(JavaAnalysisBundle.message("ignore.inside.deprecated.members"), "IGNORE_INSIDE_DEPRECATED");
panel.addCheckbox(JavaAnalysisBundle.message("ignore.inside.non.static.imports"), "IGNORE_IMPORT_STATEMENTS");
panel.addCheckbox(JavaAnalysisBundle.message("html.ignore.overrides.of.deprecated.abstract.methods"), "IGNORE_ABSTRACT_DEPRECATED_OVERRIDES");
panel.addCheckbox(JavaAnalysisBundle.message("ignore.members.of.deprecated.classes"), IGNORE_METHODS_OF_DEPRECATED_NAME);
addSameOutermostClassCheckBox(panel);
return panel;
}
@@ -4,8 +4,12 @@ package com.intellij.codeInspection.deprecation;
import com.intellij.codeInsight.AnnotationUtil;
import com.intellij.codeInsight.daemon.JavaErrorBundle;
import com.intellij.codeInsight.daemon.impl.analysis.HighlightMessageUtil;
import com.intellij.codeInspection.*;
import com.intellij.codeInspection.LocalInspectionTool;
import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ProblemHighlightType;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.codeInspection.ui.MultipleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.util.TextRange;
import com.intellij.psi.*;
@@ -147,7 +151,7 @@ public abstract class DeprecationInspectionBase extends LocalInspectionTool {
}
static void addSameOutermostClassCheckBox(MultipleCheckboxOptionsPanel panel) {
panel.addCheckbox(InspectionsBundle.message("ignore.in.the.same.outermost.class"), "IGNORE_IN_SAME_OUTERMOST_CLASS");
panel.addCheckbox(JavaAnalysisBundle.message("ignore.in.the.same.outermost.class"), "IGNORE_IN_SAME_OUTERMOST_CLASS");
}
protected static String getDescription(@NotNull String description, boolean forRemoval, ProblemHighlightType highlightType) {
@@ -4,6 +4,7 @@ package com.intellij.codeInspection.duplicateThrows;
import com.intellij.codeInsight.daemon.impl.quickfix.MethodThrowsFix;
import com.intellij.codeInspection.*;
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.psi.*;
import com.intellij.psi.javadoc.PsiDocComment;
import com.intellij.psi.javadoc.PsiDocTag;
@@ -34,7 +35,7 @@ public class DuplicateThrowsInspection extends AbstractBaseJavaLocalInspectionTo
@Override
public JComponent createOptionsPanel() {
return new SingleCheckboxOptionsPanel(
InspectionsBundle.message("inspection.duplicate.throws.ignore.subclassing.option"), this, "ignoreSubclassing");
JavaAnalysisBundle.message("inspection.duplicate.throws.ignore.subclassing.option"), this, "ignoreSubclassing");
}
@Override
@@ -53,14 +54,14 @@ public class DuplicateThrowsInspection extends AbstractBaseJavaLocalInspectionTo
String problem = null;
PsiJavaCodeReferenceElement ref = refs[i];
if (type.equals(otherType)) {
problem = InspectionsBundle.message("inspection.duplicate.throws.problem");
problem = JavaAnalysisBundle.message("inspection.duplicate.throws.problem");
}
else if (!ignoreSubclassing) {
if (otherType.isAssignableFrom(type)) {
problem = InspectionsBundle.message("inspection.duplicate.throws.more.general.problem", otherType.getCanonicalText());
problem = JavaAnalysisBundle.message("inspection.duplicate.throws.more.general.problem", otherType.getCanonicalText());
}
else if (type.isAssignableFrom(otherType)) {
problem = InspectionsBundle.message("inspection.duplicate.throws.more.general.problem", type.getCanonicalText());
problem = JavaAnalysisBundle.message("inspection.duplicate.throws.more.general.problem", type.getCanonicalText());
ref = refs[j];
type = otherType;
}
@@ -2,9 +2,9 @@
package com.intellij.codeInspection.equalsAndHashcode;
import com.intellij.codeInspection.AbstractBaseJavaLocalInspectionTool;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.application.ReadAction;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.ProjectRootManager;
@@ -61,8 +61,8 @@ public class EqualsAndHashcodeBase extends AbstractBaseJavaLocalInspectionTool {
PsiIdentifier identifier = aClass.getNameIdentifier();
holder.registerProblem(identifier != null ? identifier : aClass,
hasEquals[0]
? InspectionsBundle.message("inspection.equals.hashcode.only.one.defined.problem.descriptor", "<code>equals()</code>", "<code>hashCode()</code>")
: InspectionsBundle.message("inspection.equals.hashcode.only.one.defined.problem.descriptor","<code>hashCode()</code>", "<code>equals()</code>"),
? JavaAnalysisBundle.message("inspection.equals.hashcode.only.one.defined.problem.descriptor", "<code>equals()</code>", "<code>hashCode()</code>")
: JavaAnalysisBundle.message("inspection.equals.hashcode.only.one.defined.problem.descriptor","<code>hashCode()</code>", "<code>equals()</code>"),
buildFixes(isOnTheFly, hasEquals[0]));
}
}
@@ -22,6 +22,7 @@ import com.intellij.codeInspection.*;
import com.intellij.codeInspection.reference.RefEntity;
import com.intellij.codeInspection.reference.RefModule;
import com.intellij.codeInspection.unnecessaryModuleDependency.UnnecessaryModuleDependencyInspection;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.module.EffectiveLanguageLevelUtil;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.roots.ModuleOrderEntry;
@@ -61,7 +62,7 @@ public class InconsistentLanguageLevelInspection extends GlobalInspectionTool {
LanguageLevel dependantLanguageLevel = EffectiveLanguageLevelUtil.getEffectiveLanguageLevel(dependantModule);
if (languageLevel.compareTo(dependantLanguageLevel) < 0) {
final CommonProblemDescriptor problemDescriptor = manager.createProblemDescriptor(
InspectionsBundle
JavaAnalysisBundle
.message("module.0.with.language.level.1.depends.on.module.2.with.language.level.3", module.getName(), languageLevel,
dependantModule.getName(), dependantLanguageLevel),
module,
@@ -19,6 +19,7 @@ import com.intellij.CommonBundle
import com.intellij.codeInsight.daemon.QuickFixBundle
import com.intellij.codeInsight.intention.IntentionAction
import com.intellij.codeInspection.*
import com.intellij.java.analysis.JavaAnalysisBundle
import com.intellij.lang.jvm.JvmClass
import com.intellij.lang.jvm.JvmModifier
import com.intellij.lang.jvm.JvmModifiersOwner
@@ -83,7 +84,7 @@ class ImplicitSubclassInspection : LocalInspectionTool() {
if ((methodsToOverride.isNotEmpty() || classReasonToBeSubclassed != null)) {
problemTargets(aClass, classHighlightableModifiersSet).forEach {
problems.add(manager.createProblemDescriptor(
it, classReasonToBeSubclassed ?: InspectionsBundle.message("inspection.implicit.subclass.display.forClass", psiClass.name),
it, classReasonToBeSubclassed ?: JavaAnalysisBundle.message("inspection.implicit.subclass.display.forClass", psiClass.name),
isOnTheFly,
createFixesIfApplicable(aClass, psiClass.name ?: "class", methodsToAttachToClassFix ?: emptyList()),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING)
@@ -192,7 +193,7 @@ class ImplicitSubclassInspection : LocalInspectionTool() {
is UClass ->
if (actionsToPerform.size <= MAX_MESSAGES_TO_COMBINE)
actionsToPerform.joinToString { it.text }
else InspectionsBundle.message("inspection.implicit.subclass.make.class.extendable",
else JavaAnalysisBundle.message("inspection.implicit.subclass.make.class.extendable",
hintTargetName,
siblings.size,
siblingsDescription())
@@ -200,7 +201,7 @@ class ImplicitSubclassInspection : LocalInspectionTool() {
if (actionsToPerform.size <= MAX_MESSAGES_TO_COMBINE)
actionsToPerform.joinToString { it.text }
else
InspectionsBundle.message("inspection.implicit.subclass.extendable", hintTargetName)
JavaAnalysisBundle.message("inspection.implicit.subclass.extendable", hintTargetName)
}
private fun siblingsDescription() =
@@ -2,9 +2,9 @@
package com.intellij.codeInspection.java19modules;
import com.intellij.codeInsight.daemon.impl.analysis.JavaModuleGraphUtil;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.reference.*;
import com.intellij.codeInspection.visibility.EntryPointWithVisibilityLevel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.util.InvalidDataException;
import com.intellij.openapi.util.WriteExternalException;
import com.intellij.psi.*;
@@ -39,7 +39,7 @@ public class Java9ModuleEntryPoint extends EntryPointWithVisibilityLevel {
@NotNull
@Override
public String getDisplayName() {
return InspectionsBundle.message("html.classes.exposed.with.code.module.info.code.html");
return JavaAnalysisBundle.message("html.classes.exposed.with.code.module.info.code.html");
}
@Override
@@ -3,8 +3,8 @@ package com.intellij.codeInspection.java19modules;
import com.intellij.codeInsight.intention.QuickFixFactory;
import com.intellij.codeInspection.AbstractBaseJavaLocalInspectionTool;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.psi.*;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.psi.util.PsiUtil;
@@ -39,13 +39,13 @@ public class Java9ModuleExportsPackageToItselfInspection extends AbstractBaseJav
List<PsiJavaModuleReferenceElement> references = ContainerUtil.newArrayList(statement.getModuleReferences());
for (PsiJavaModuleReferenceElement referenceElement : references) {
if (moduleName.equals(referenceElement.getReferenceText())) {
String message = InspectionsBundle.message("inspection.module.exports.package.to.itself");
String message = JavaAnalysisBundle.message("inspection.module.exports.package.to.itself");
if (references.size() == 1) {
String fixText = InspectionsBundle.message("exports.to.itself.delete.statement.fix");
String fixText = JavaAnalysisBundle.message("exports.to.itself.delete.statement.fix");
myHolder.registerProblem(referenceElement, message, QuickFixFactory.getInstance().createDeleteFix(statement, fixText));
}
else {
String fixText = InspectionsBundle.message("exports.to.itself.delete.module.ref.fix", moduleName);
String fixText = JavaAnalysisBundle.message("exports.to.itself.delete.module.ref.fix", moduleName);
myHolder.registerProblem(referenceElement, message, QuickFixFactory.getInstance().createDeleteFix(referenceElement, fixText));
}
}
@@ -6,6 +6,7 @@ import com.intellij.codeInsight.FileModificationService;
import com.intellij.codeInsight.daemon.impl.analysis.JavaModuleGraphUtil;
import com.intellij.codeInspection.*;
import com.intellij.codeInspection.reference.*;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Key;
@@ -56,7 +57,7 @@ public class Java9RedundantRequiresStatementInspection extends GlobalJavaBatchIn
if (requiresStatement != null && !isSuppressedFor(requiresStatement)) {
CommonProblemDescriptor descriptor = manager.createProblemDescriptor(
requiresStatement,
InspectionsBundle.message("inspection.redundant.requires.statement.description", requiredModuleName),
JavaAnalysisBundle.message("inspection.redundant.requires.statement.description", requiredModuleName),
new DeleteRedundantRequiresStatementFix(requiredModuleName, moduleImportedPackages),
ProblemHighlightType.LIKE_UNUSED_SYMBOL, false);
descriptors.add(descriptor);
@@ -108,14 +109,14 @@ public class Java9RedundantRequiresStatementInspection extends GlobalJavaBatchIn
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("inspection.redundant.requires.statement.fix.family");
return JavaAnalysisBundle.message("inspection.redundant.requires.statement.fix.family");
}
@Nls
@NotNull
@Override
public String getName() {
return InspectionsBundle.message("inspection.redundant.requires.statement.fix.name", myRequiredModuleName);
return JavaAnalysisBundle.message("inspection.redundant.requires.statement.fix.name", myRequiredModuleName);
}
@Override
@@ -3,8 +3,8 @@ package com.intellij.codeInspection.java19modules;
import com.intellij.codeInsight.intention.QuickFixFactory;
import com.intellij.codeInspection.AbstractBaseJavaLocalInspectionTool;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.util.Ref;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.psi.*;
@@ -27,7 +27,7 @@ public class JavaModuleNamingInspection extends AbstractBaseJavaLocalInspectionT
psiTraverser().children(name).filter(PsiIdentifier.class).forEach(id -> {
String text = id.getText();
if (text.length() > 0 && Character.isDigit(text.charAt(text.length() - 1))) {
String message = InspectionsBundle.message("inspection.java.module.naming.terminal.digits", text);
String message = JavaAnalysisBundle.message("inspection.java.module.naming.terminal.digits", text);
if (newName.isNull()) {
newName.set(StringUtil.join(psiTraverser().children(name).filter(PsiIdentifier.class).map(i -> trimDigits(i.getText())), "."));
}
@@ -2,9 +2,9 @@
package com.intellij.codeInspection.java19modules;
import com.intellij.codeInspection.AbstractBaseJavaLocalInspectionTool;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.psi.*;
import com.intellij.psi.impl.light.LightJavaModule;
import com.intellij.psi.util.PsiUtil;
@@ -19,7 +19,7 @@ public class JavaRequiresAutoModuleInspection extends AbstractBaseJavaLocalInspe
@Nullable
@Override
public JComponent createOptionsPanel() {
return new SingleCheckboxOptionsPanel(InspectionsBundle.message("inspection.requires.auto.module.option"), this, "TRANSITIVE_ONLY");
return new SingleCheckboxOptionsPanel(JavaAnalysisBundle.message("inspection.requires.auto.module.option"), this, "TRANSITIVE_ONLY");
}
@NotNull
@@ -34,10 +34,10 @@ public class JavaRequiresAutoModuleInspection extends AbstractBaseJavaLocalInspe
PsiJavaModule target = statement.resolve();
if (target instanceof LightJavaModule) {
if (!TRANSITIVE_ONLY) {
holder.registerProblem(refElement, InspectionsBundle.message("inspection.requires.auto.module.message"));
holder.registerProblem(refElement, JavaAnalysisBundle.message("inspection.requires.auto.module.message"));
}
else if (statement.hasModifierProperty(PsiModifier.TRANSITIVE)) {
holder.registerProblem(refElement, InspectionsBundle.message("inspection.requires.auto.module.transitive"));
holder.registerProblem(refElement, JavaAnalysisBundle.message("inspection.requires.auto.module.transitive"));
}
}
}
@@ -3,6 +3,7 @@ package com.intellij.codeInspection.localCanBeFinal;
import com.intellij.codeInspection.*;
import com.intellij.codeInspection.ui.MultipleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.WriteExternalException;
import com.intellij.psi.*;
@@ -262,12 +263,12 @@ public class LocalCanBeFinal extends AbstractBaseJavaLocalInspectionTool impleme
PsiElement problemElement = nameIdentifier != null ? nameIdentifier : variable;
if (variable instanceof PsiParameter && !(((PsiParameter)variable).getDeclarationScope() instanceof PsiForeachStatement)) {
problems.add(manager.createProblemDescriptor(problemElement,
InspectionsBundle.message("inspection.can.be.local.parameter.problem.descriptor"),
JavaAnalysisBundle.message("inspection.can.be.local.parameter.problem.descriptor"),
myQuickFix, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, onTheFly));
}
else {
problems.add(manager.createProblemDescriptor(problemElement,
InspectionsBundle.message("inspection.can.be.local.variable.problem.descriptor"),
JavaAnalysisBundle.message("inspection.can.be.local.variable.problem.descriptor"),
myQuickFix, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, onTheFly));
}
}
@@ -313,7 +314,7 @@ public class LocalCanBeFinal extends AbstractBaseJavaLocalInspectionTool impleme
@Override
@NotNull
public String getFamilyName() {
return InspectionsBundle.message("inspection.can.be.final.accept.quickfix");
return JavaAnalysisBundle.message("inspection.can.be.final.accept.quickfix");
}
@Override
@@ -330,11 +331,11 @@ public class LocalCanBeFinal extends AbstractBaseJavaLocalInspectionTool impleme
@Override
public JComponent createOptionsPanel() {
final MultipleCheckboxOptionsPanel panel = new MultipleCheckboxOptionsPanel(this);
panel.addCheckbox(InspectionsBundle.message("inspection.local.can.be.final.option"), "REPORT_VARIABLES");
panel.addCheckbox(InspectionsBundle.message("inspection.local.can.be.final.option1"), "REPORT_PARAMETERS");
panel.addCheckbox(InspectionsBundle.message("inspection.local.can.be.final.option2"), "REPORT_CATCH_PARAMETERS");
panel.addCheckbox(InspectionsBundle.message("inspection.local.can.be.final.option3"), "REPORT_FOREACH_PARAMETERS");
panel.addCheckbox(InspectionsBundle.message("inspection.local.can.be.final.option4"), "REPORT_IMPLICIT_FINALS");
panel.addCheckbox(JavaAnalysisBundle.message("inspection.local.can.be.final.option"), "REPORT_VARIABLES");
panel.addCheckbox(JavaAnalysisBundle.message("inspection.local.can.be.final.option1"), "REPORT_PARAMETERS");
panel.addCheckbox(JavaAnalysisBundle.message("inspection.local.can.be.final.option2"), "REPORT_CATCH_PARAMETERS");
panel.addCheckbox(JavaAnalysisBundle.message("inspection.local.can.be.final.option3"), "REPORT_FOREACH_PARAMETERS");
panel.addCheckbox(JavaAnalysisBundle.message("inspection.local.can.be.final.option4"), "REPORT_IMPLICIT_FINALS");
return panel;
}
}
@@ -16,6 +16,7 @@
package com.intellij.codeInspection.miscGenerics;
import com.intellij.codeInspection.*;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
@@ -115,7 +116,7 @@ public class RedundantTypeArgsInspection extends GenericsInspectionToolBase {
: "inspection.redundant.type.problem.descriptor";
final ProblemDescriptor descriptor =
inspectionManager.createProblemDescriptor(expression.getTypeArgumentList(),
InspectionsBundle.message(key),
JavaAnalysisBundle.message(key),
ourQuickFixAction,
ProblemHighlightType.LIKE_UNUSED_SYMBOL, isOnTheFly);
problems.add(descriptor);
@@ -142,7 +143,7 @@ public class RedundantTypeArgsInspection extends GenericsInspectionToolBase {
LOG.assertTrue(referenceElement != null, qualifierTypeElement);
final PsiReferenceParameterList parameterList = referenceElement.getParameterList();
LOG.assertTrue(parameterList != null);
final ProblemDescriptor descriptor = inspectionManager.createProblemDescriptor(parameterList, InspectionsBundle
final ProblemDescriptor descriptor = inspectionManager.createProblemDescriptor(parameterList, JavaAnalysisBundle
.message("inspection.redundant.type.problem.descriptor"), ourQuickFixAction, ProblemHighlightType.LIKE_UNUSED_SYMBOL, isOnTheFly);
problems.add(descriptor);
}
@@ -163,7 +164,7 @@ public class RedundantTypeArgsInspection extends GenericsInspectionToolBase {
: "inspection.redundant.type.problem.descriptor";
final ProblemDescriptor descriptor =
inspectionManager.createProblemDescriptor(parameterList,
InspectionsBundle.message(key),
JavaAnalysisBundle.message(key),
new MyQuickFixAction(), ProblemHighlightType.LIKE_UNUSED_SYMBOL, isOnTheFly);
problems.add(descriptor);
}
@@ -175,7 +176,7 @@ public class RedundantTypeArgsInspection extends GenericsInspectionToolBase {
@Override
@NotNull
public String getFamilyName() {
return InspectionsBundle.message("inspection.redundant.type.remove.quickfix");
return JavaAnalysisBundle.message("inspection.redundant.type.remove.quickfix");
}
@Override
@@ -7,6 +7,7 @@ import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.codeInspection.dataFlow.CommonDataflow;
import com.intellij.codeInspection.dataFlow.TypeConstraint;
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.psi.*;
import com.intellij.psi.util.MethodSignature;
import com.intellij.psi.util.PsiUtil;
@@ -32,7 +33,7 @@ public class SuspiciousCollectionsMethodCallsInspection extends AbstractBaseJava
@Override
@Nullable
public JComponent createOptionsPanel() {
return new SingleCheckboxOptionsPanel(InspectionsBundle.message("report.suspicious.but.possibly.correct.method.calls"), this, "REPORT_CONVERTIBLE_METHOD_CALLS");
return new SingleCheckboxOptionsPanel(JavaAnalysisBundle.message("report.suspicious.but.possibly.correct.method.calls"), this, "REPORT_CONVERTIBLE_METHOD_CALLS");
}
@Override
@@ -2,7 +2,7 @@
package com.intellij.codeInspection.miscGenerics;
import com.intellij.codeInsight.daemon.impl.analysis.JavaGenericsUtil;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.util.NullableLazyValue;
import com.intellij.psi.*;
import com.intellij.psi.impl.source.resolve.graphInference.PsiPolyExpressionUtil;
@@ -288,7 +288,7 @@ public class SuspiciousMethodCallUtil {
if (qualifierItemType.isConvertibleFrom(itemType) && !reportConvertibleMethodCalls) {
return null;
}
return InspectionsBundle.message("inspection.suspicious.collections.method.calls.problem.descriptor",
return JavaAnalysisBundle.message("inspection.suspicious.collections.method.calls.problem.descriptor",
PsiFormatUtil.formatType(qualifierType, 0, PsiSubstitutor.EMPTY),
PsiFormatUtil.formatType(itemType, 0, PsiSubstitutor.EMPTY),
"objects");
@@ -305,7 +305,7 @@ public class SuspiciousMethodCallUtil {
if (!typeParamMapping.isAssignableFrom(argType)) {
if (typeParamMapping.isConvertibleFrom(argType)) {
if (reportConvertibleMethodCalls) {
message = InspectionsBundle.message("inspection.suspicious.collections.method.calls.problem.descriptor1",
message = JavaAnalysisBundle.message("inspection.suspicious.collections.method.calls.problem.descriptor1",
PsiFormatUtil.formatMethod(calleeMethod, substitutor,
PsiFormatUtilBase.SHOW_NAME |
PsiFormatUtilBase.SHOW_CONTAINING_CLASS,
@@ -315,7 +315,7 @@ public class SuspiciousMethodCallUtil {
else {
PsiType qualifierType = qualifier.getType();
if (qualifierType != null) {
message = InspectionsBundle.message("inspection.suspicious.collections.method.calls.problem.descriptor",
message = JavaAnalysisBundle.message("inspection.suspicious.collections.method.calls.problem.descriptor",
PsiFormatUtil.formatType(qualifierType, 0, PsiSubstitutor.EMPTY),
PsiFormatUtil.formatType(argType, 0, PsiSubstitutor.EMPTY),
getPreciseObjectTitle(patternClass, patternMethod.typeParameterIdx));
@@ -19,9 +19,9 @@ import com.intellij.codeInsight.AnnotationUtil;
import com.intellij.codeInsight.FileModificationService;
import com.intellij.codeInsight.intention.AddAnnotationPsiFix;
import com.intellij.codeInspection.AnnotateMethodFix;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.util.ClassUtil;
@@ -49,7 +49,7 @@ public class AnnotateOverriddenMethodParameterFix implements LocalQuickFix {
@Override
@NotNull
public String getName() {
return InspectionsBundle.message("annotate.overridden.methods.parameters", ClassUtil.extractClassName(myAnnotation));
return JavaAnalysisBundle.message("annotate.overridden.methods.parameters", ClassUtil.extractClassName(myAnnotation));
}
@Override
@@ -109,6 +109,6 @@ public class AnnotateOverriddenMethodParameterFix implements LocalQuickFix {
@Override
@NotNull
public String getFamilyName() {
return InspectionsBundle.message("annotate.overridden.methods.parameters.family.name");
return JavaAnalysisBundle.message("annotate.overridden.methods.parameters.family.name");
}
}
@@ -16,9 +16,9 @@
package com.intellij.codeInspection.nullable;
import com.intellij.codeInsight.NullableNotNullManager;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.psi.PsiAnnotation;
import org.jetbrains.annotations.NotNull;
@@ -44,7 +44,7 @@ class ChangeNullableDefaultsFix implements LocalQuickFix {
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("make.0.default.annotation", myNotNullName != null ? myNotNullName : myNullableName);
return JavaAnalysisBundle.message("make.0.default.annotation", myNotNullName != null ? myNotNullName : myNullableName);
}
@Override
@@ -7,6 +7,7 @@ import com.intellij.codeInsight.intention.AddAnnotationPsiFix;
import com.intellij.codeInspection.*;
import com.intellij.codeInspection.dataFlow.DfaPsiUtil;
import com.intellij.codeInspection.dataFlow.instructions.MethodCallInstruction;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.GeneratedSourcesFilter;
@@ -157,7 +158,7 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
PsiClass psiClass = PsiUtil.resolveClassInClassTypeOnly(((PsiClassObjectAccessExpression)value).getOperand().getType());
if (psiClass != null && !hasStringConstructor(psiClass)) {
holder.registerProblem(value,
InspectionsBundle.message(
JavaAnalysisBundle.message(
"custom.exception.class.should.have.a.constructor"),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING);
@@ -204,7 +205,7 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
if (DfaPsiUtil.getTypeNullability(JavaPsiFacade.getElementFactory(element.getProject()).createType(typeParameters[i])) ==
Nullability.NOT_NULL && DfaPsiUtil.getTypeNullability(typeArguments[i].getType()) != Nullability.NOT_NULL) {
holder.registerProblem(typeArguments[i],
InspectionsBundle.message("non.null.type.argument.is.expected"),
JavaAnalysisBundle.message("non.null.type.argument.is.expected"),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING);
}
}
@@ -279,7 +280,7 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
@Nullable PsiType assignedType) {
if (isNullableNotNullCollectionConflict(expectedType, assignedType, new HashSet<>())) {
holder.registerProblem(errorElement,
InspectionsBundle
JavaAnalysisBundle
.message("assigning.a.collection.of.nullable.elements"),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING);
@@ -386,13 +387,13 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
assert refName != null;
if (isNullableOverridingNotNull(check(targetMethod, holder, expression.getType()), superMethod)) {
holder.registerProblem(refName,
InspectionsBundle.message("inspection.nullable.problems.Nullable.method.overrides.NotNull",
JavaAnalysisBundle.message("inspection.nullable.problems.Nullable.method.overrides.NotNull",
getPresentableAnnoName(targetMethod), getPresentableAnnoName(superMethod)),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING);
}
else if (isNonAnnotatedOverridingNotNull(targetMethod, superMethod)) {
holder.registerProblem(refName,
InspectionsBundle.message("not.annotated.method.is.used.as.an.override.for.a.method.annotated.with.0",
JavaAnalysisBundle.message("not.annotated.method.is.used.as.an.override.for.a.method.annotated.with.0",
getPresentableAnnoName(superMethod)),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
createFixForNonAnnotatedOverridesNotNull(targetMethod, superMethod));
@@ -441,14 +442,14 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
AnnotateMethodFix getterAnnoFix = new AnnotateMethodFix(anno, ArrayUtilRt.toStringArray(annoToRemove));
if (REPORT_NOT_ANNOTATED_GETTER) {
if (!manager.hasNullability(getter) && !TypeConversionUtil.isPrimitiveAndNotNull(getter.getReturnType())) {
holder.registerProblem(nameIdentifier, InspectionsBundle
holder.registerProblem(nameIdentifier, JavaAnalysisBundle
.message("inspection.nullable.problems.annotated.field.getter.not.annotated", getPresentableAnnoName(field)),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING, getterAnnoFix);
}
}
if (annotated.isDeclaredNotNull && isNullableNotInferred(getter, false) ||
annotated.isDeclaredNullable && isNotNullNotInferred(getter, false, false)) {
holder.registerProblem(nameIdentifier, InspectionsBundle.message(
holder.registerProblem(nameIdentifier, JavaAnalysisBundle.message(
"inspection.nullable.problems.annotated.field.getter.conflict", getPresentableAnnoName(field), getPresentableAnnoName(getter)),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING, getterAnnoFix);
}
@@ -467,7 +468,7 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
final PsiIdentifier parameterName = parameter.getNameIdentifier();
assertValidElement(setter, parameter, parameterName);
holder.registerProblem(parameterName,
InspectionsBundle.message("inspection.nullable.problems.annotated.field.setter.parameter.not.annotated",
JavaAnalysisBundle.message("inspection.nullable.problems.annotated.field.setter.parameter.not.annotated",
getPresentableAnnoName(field)),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
addAnnoFix);
@@ -476,7 +477,7 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
if (annotated.isDeclaredNotNull && isNullableNotInferred(parameter, false)) {
final PsiIdentifier parameterName = parameter.getNameIdentifier();
assertValidElement(setter, parameter, parameterName);
holder.registerProblem(parameterName, InspectionsBundle.message(
holder.registerProblem(parameterName, JavaAnalysisBundle.message(
"inspection.nullable.problems.annotated.field.setter.parameter.conflict",
getPresentableAnnoName(field), getPresentableAnnoName(parameter)),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
@@ -518,7 +519,7 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
if (nameIdentifier != null && nameIdentifier.isPhysical()) {
holder.registerProblem(
nameIdentifier,
InspectionsBundle.message("inspection.nullable.problems.annotated.field.constructor.parameter.not.annotated", getPresentableAnnoName(field)),
JavaAnalysisBundle.message("inspection.nullable.problems.annotated.field.constructor.parameter.not.annotated", getPresentableAnnoName(field)),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING, createAddAnnotationFix(anno, annoToRemove, parameter));
continue;
}
@@ -542,7 +543,7 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
PsiIdentifier nameIdentifier = field.getNameIdentifier();
if (nameIdentifier.isPhysical()) {
holder.registerProblem(nameIdentifier,
InspectionsBundle.message("0.field.is.always.initialized.not.null", getPresentableAnnoName(field)),
JavaAnalysisBundle.message("0.field.is.always.initialized.not.null", getPresentableAnnoName(field)),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING, AddAnnotationPsiFix.createAddNotNullFix(field));
}
}
@@ -612,11 +613,11 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
private static void checkLoopParameterNullability(ProblemsHolder holder, @Nullable PsiAnnotation notNull, @Nullable PsiAnnotation nullable, Nullability expectedNullability) {
if (notNull != null && expectedNullability == Nullability.NULLABLE) {
holder.registerProblem(notNull, InspectionsBundle.message("parameter.can.be.null"),
holder.registerProblem(notNull, JavaAnalysisBundle.message("parameter.can.be.null"),
new RemoveAnnotationQuickFix(notNull, null));
}
else if (nullable != null && expectedNullability == Nullability.NOT_NULL) {
holder.registerProblem(nullable, InspectionsBundle.message("parameter.is.always.not.null"),
holder.registerProblem(nullable, JavaAnalysisBundle.message("parameter.is.always.not.null"),
new RemoveAnnotationQuickFix(nullable, null));
}
}
@@ -624,7 +625,7 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
private static void reportPrimitiveType(ProblemsHolder holder, PsiAnnotation annotation,
@Nullable PsiModifierListOwner listOwner) {
holder.registerProblem(!annotation.isPhysical() && listOwner != null ? listOwner.getNavigationElement() : annotation,
InspectionsBundle.message("inspection.nullable.problems.primitive.type.annotation"),
JavaAnalysisBundle.message("inspection.nullable.problems.primitive.type.annotation"),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING, new RemoveAnnotationQuickFix(annotation, listOwner) {
@Override
protected boolean shouldRemoveInheritors() {
@@ -666,7 +667,7 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
if (isNullableOverridingNotNull(annotated, superMethod)) {
PsiAnnotation annotation = AnnotationUtil.findAnnotation(method, getNullityManager(method).getNullables(), true);
holder.registerProblem(annotation != null ? annotation : method.getNameIdentifier(),
InspectionsBundle.message("inspection.nullable.problems.Nullable.method.overrides.NotNull",
JavaAnalysisBundle.message("inspection.nullable.problems.Nullable.method.overrides.NotNull",
getPresentableAnnoName(method), getPresentableAnnoName(superMethod)),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING);
break;
@@ -674,7 +675,7 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
if (isNonAnnotatedOverridingNotNull(method, superMethod)) {
holder.registerProblem(method.getNameIdentifier(),
InspectionsBundle
JavaAnalysisBundle
.message("inspection.nullable.problems.method.overrides.NotNull", getPresentableAnnoName(superMethod)),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
createFixForNonAnnotatedOverridesNotNull(method, superMethod));
@@ -735,7 +736,7 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
if (nullableSuper != null) {
PsiAnnotation annotation = AnnotationUtil.findAnnotation(parameter, nullableManager.getNotNulls(), true);
holder.registerProblem(annotation != null ? annotation : parameter.getNameIdentifier(),
InspectionsBundle.message("inspection.nullable.problems.NotNull.parameter.overrides.Nullable",
JavaAnalysisBundle.message("inspection.nullable.problems.NotNull.parameter.overrides.Nullable",
getPresentableAnnoName(parameter),
getPresentableAnnoName(nullableSuper)),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING);
@@ -746,7 +747,7 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
? AddAnnotationPsiFix.createAddNotNullFix(parameter)
: createChangeDefaultNotNullFix(nullableManager, notNullSuper);
holder.registerProblem(parameter.getNameIdentifier(),
InspectionsBundle.message("inspection.nullable.problems.parameter.overrides.NotNull", getPresentableAnnoName(notNullSuper)),
JavaAnalysisBundle.message("inspection.nullable.problems.parameter.overrides.NotNull", getPresentableAnnoName(notNullSuper)),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
fix);
}
@@ -757,7 +758,7 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
boolean physical = PsiTreeUtil.isAncestor(parameter, notNullAnnotation, true);
final LocalQuickFix fix = physical ? new RemoveAnnotationQuickFix(notNullAnnotation, parameter) : null;
holder.registerProblem(physical ? notNullAnnotation : parameter.getNameIdentifier(),
InspectionsBundle.message("inspection.nullable.problems.NotNull.parameter.overrides.not.annotated", getPresentableAnnoName(parameter)),
JavaAnalysisBundle.message("inspection.nullable.problems.NotNull.parameter.overrides.not.annotated", getPresentableAnnoName(parameter)),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
fix);
}
@@ -814,7 +815,7 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
if (elementToHighlight == null || !JavaNullMethodArgumentUtil.hasNullArgument(method, parameterIdx)) return;
holder.registerProblem(elementToHighlight,
InspectionsBundle.message("inspection.nullable.problems.NotNull.parameter.receives.null.literal",
JavaAnalysisBundle.message("inspection.nullable.problems.NotNull.parameter.receives.null.literal",
getPresentableAnnoName(parameter)),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
createNavigateToNullParameterUsagesFix(parameter));
@@ -866,7 +867,7 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
psiElement = identifier;
if (psiElement == null) continue;
}
holder.registerProblem(psiElement, InspectionsBundle.message("nullable.stuff.problems.overridden.methods.are.not.annotated"),
holder.registerProblem(psiElement, JavaAnalysisBundle.message("nullable.stuff.problems.overridden.methods.are.not.annotated"),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
fix);
methodQuickFixSuggested = true;
@@ -891,7 +892,7 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
? new AnnotateOverriddenMethodParameterFix(defaultNotNull, nullableManager.getDefaultNullable())
: createChangeDefaultNotNullFix(nullableManager, parameters[i]);
holder.registerProblem(psiElement,
InspectionsBundle.message("nullable.stuff.problems.overridden.method.parameters.are.not.annotated"),
JavaAnalysisBundle.message("nullable.stuff.problems.overridden.method.parameters.are.not.annotated"),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
fix);
parameterQuickFixSuggested[i] = true;
@@ -954,7 +955,7 @@ public class NullableStuffInspectionBase extends AbstractBaseJavaLocalInspection
private static void reportNullableNotNullConflict(final ProblemsHolder holder, final PsiModifierListOwner listOwner, final PsiAnnotation declaredNullable,
final PsiAnnotation declaredNotNull) {
final String bothNullableNotNullMessage = InspectionsBundle.message("inspection.nullable.problems.Nullable.NotNull.conflict",
final String bothNullableNotNullMessage = JavaAnalysisBundle.message("inspection.nullable.problems.Nullable.NotNull.conflict",
getPresentableAnnoName(declaredNullable),
getPresentableAnnoName(declaredNotNull));
holder.registerProblem(declaredNotNull.isPhysical() ? declaredNotNull : listOwner.getNavigationElement(),
@@ -5,6 +5,7 @@ import com.intellij.codeInspection.*;
import com.intellij.codeInspection.miscGenerics.GenericsInspectionToolBase;
import com.intellij.codeInspection.miscGenerics.SuspiciousMethodCallUtil;
import com.intellij.codeInspection.ui.MultipleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.WriteExternalException;
import com.intellij.psi.*;
@@ -61,7 +62,7 @@ public class RedundantCastInspection extends GenericsInspectionToolBase {
@Override
public JComponent createOptionsPanel() {
final MultipleCheckboxOptionsPanel optionsPanel = new MultipleCheckboxOptionsPanel(this);
optionsPanel.addCheckbox(InspectionsBundle.message("ignore.casts.in.suspicious.collections.method.calls"), "IGNORE_SUSPICIOUS_METHOD_CALLS");
optionsPanel.addCheckbox(JavaAnalysisBundle.message("ignore.casts.in.suspicious.collections.method.calls"), "IGNORE_SUSPICIOUS_METHOD_CALLS");
return optionsPanel;
}
@@ -82,7 +83,7 @@ public class RedundantCastInspection extends GenericsInspectionToolBase {
}
}
String message = InspectionsBundle.message("inspection.redundant.cast.problem.descriptor",
String message = JavaAnalysisBundle.message("inspection.redundant.cast.problem.descriptor",
"<code>" + PsiExpressionTrimRenderer.render(operand) + "</code>", "<code>#ref</code> #loc");
return manager.createProblemDescriptor(castType, message, myQuickFixAction, ProblemHighlightType.LIKE_UNUSED_SYMBOL, onTheFly);
}
@@ -92,7 +93,7 @@ public class RedundantCastInspection extends GenericsInspectionToolBase {
@Override
@NotNull
public String getFamilyName() {
return InspectionsBundle.message("inspection.redundant.cast.remove.quickfix");
return JavaAnalysisBundle.message("inspection.redundant.cast.remove.quickfix");
}
@Override
@@ -16,7 +16,7 @@
package com.intellij.codeInspection.reference;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.application.ReadAction;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
@@ -29,7 +29,7 @@ import java.util.Objects;
public class RefImplicitConstructorImpl extends RefMethodImpl implements RefImplicitConstructor {
RefImplicitConstructorImpl(@NotNull RefClass ownerClass) {
super(InspectionsBundle.message("inspection.reference.implicit.constructor.name", ownerClass.getName()), ownerClass);
super(JavaAnalysisBundle.message("inspection.reference.implicit.constructor.name", ownerClass.getName()), ownerClass);
}
@Override
@@ -45,7 +45,7 @@ public class RefImplicitConstructorImpl extends RefMethodImpl implements RefImpl
@NotNull
@Override
public String getName() {
return InspectionsBundle.message("inspection.reference.implicit.constructor.name", getOwnerClass().getName());
return JavaAnalysisBundle.message("inspection.reference.implicit.constructor.name", getOwnerClass().getName());
}
@Override
@@ -2,7 +2,8 @@
package com.intellij.codeInspection.reference;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.analysis.AnalysisBundle;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.util.Iconable;
import com.intellij.psi.*;
import com.intellij.util.IconUtil;
@@ -79,7 +80,7 @@ public abstract class RefJavaElementImpl extends RefElementImpl implements RefJa
if (psiBaseClass == null) {
return "anonymous class";
} else {
return InspectionsBundle.message("inspection.reference.anonymous.name", psiBaseClass.getName());
return JavaAnalysisBundle.message("inspection.reference.anonymous.name", psiBaseClass.getName());
}
}
@@ -90,14 +91,14 @@ public abstract class RefJavaElementImpl extends RefElementImpl implements RefJa
}
if (element instanceof PsiMethod && element instanceof SyntheticElement ) {
return InspectionsBundle.message("inspection.reference.jsp.holder.method.anonymous.name");
return JavaAnalysisBundle.message("inspection.reference.jsp.holder.method.anonymous.name");
}
String name = null;
if (element instanceof PsiNamedElement) {
name = ((PsiNamedElement)element).getName();
}
return name == null ? InspectionsBundle.message("inspection.reference.anonymous") : name;
return name == null ? AnalysisBundle.message("inspection.reference.anonymous") : name;
}
@Override
@@ -4,6 +4,7 @@ package com.intellij.codeInspection.sameReturnValue;
import com.intellij.analysis.AnalysisScope;
import com.intellij.codeInspection.*;
import com.intellij.codeInspection.reference.*;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.psi.PsiElement;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -24,11 +25,11 @@ public class SameReturnValueInspection extends GlobalJavaBatchInspectionTool {
if (returnValue != null) {
final String message;
if (refMethod.getDerivedMethods().isEmpty()) {
message = InspectionsBundle.message("inspection.same.return.value.problem.descriptor", "<code>" + returnValue + "</code>");
message = JavaAnalysisBundle.message("inspection.same.return.value.problem.descriptor", "<code>" + returnValue + "</code>");
} else if (refMethod.hasBody()) {
message = InspectionsBundle.message("inspection.same.return.value.problem.descriptor1", "<code>" + returnValue + "</code>");
message = JavaAnalysisBundle.message("inspection.same.return.value.problem.descriptor1", "<code>" + returnValue + "</code>");
} else {
message = InspectionsBundle.message("inspection.same.return.value.problem.descriptor2", "<code>" + returnValue + "</code>");
message = JavaAnalysisBundle.message("inspection.same.return.value.problem.descriptor2", "<code>" + returnValue + "</code>");
}
final UDeclaration decl = refMethod.getUastElement();
@@ -3,7 +3,11 @@ package com.intellij.codeInspection.testOnly;
import com.intellij.codeInsight.AnnotationUtil;
import com.intellij.codeInsight.TestFrameworks;
import com.intellij.codeInspection.*;
import com.intellij.codeInspection.AbstractBaseJavaLocalInspectionTool;
import com.intellij.codeInspection.ProblemHighlightType;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.codeInspection.RemoveAnnotationQuickFix;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.lang.java.JavaLanguage;
import com.intellij.openapi.roots.ProjectRootManager;
import com.intellij.openapi.vfs.VirtualFile;
@@ -91,7 +95,7 @@ public class TestOnlyInspection extends AbstractBaseJavaLocalInspectionTool {
if (toHighlight == null) {
toHighlight = element;
}
h.registerProblem(toHighlight, InspectionsBundle.message("visible.for.testing.makes.little.sense.on.test.only.code"), new RemoveAnnotationQuickFix(vft, (PsiModifierListOwner)element));
h.registerProblem(toHighlight, JavaAnalysisBundle.message("visible.for.testing.makes.little.sense.on.test.only.code"), new RemoveAnnotationQuickFix(vft, (PsiModifierListOwner)element));
}
}
super.visitElement(element);
@@ -202,7 +206,7 @@ public class TestOnlyInspection extends AbstractBaseJavaLocalInspectionTool {
}
private static void reportProblem(PsiElement e, PsiMember target, ProblemsHolder h) {
String message = InspectionsBundle.message(target instanceof PsiClass
String message = JavaAnalysisBundle.message(target instanceof PsiClass
? "inspection.test.only.problems.test.only.class.reference"
: target instanceof PsiField ? "inspection.test.only.problems.test.only.field.reference"
: "inspection.test.only.problems.test.only.method.call");
@@ -6,6 +6,7 @@ import com.intellij.codeInspection.reference.RefEntity;
import com.intellij.codeInspection.reference.RefGraphAnnotator;
import com.intellij.codeInspection.reference.RefManager;
import com.intellij.codeInspection.reference.RefModule;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.*;
@@ -114,11 +115,11 @@ public class UnnecessaryModuleDependencyInspection extends GlobalInspectionTool
String dependencyName = dependency.getName();
String moduleName = module.getName();
if (scope.containsModule(dependency)) { //external references are rejected -> annotator doesn't provide any information on them -> false positives
final String allContainsMessage = InspectionsBundle.message("unnecessary.module.dependency.problem.descriptor", moduleName, dependencyName);
final String allContainsMessage = JavaAnalysisBundle.message("unnecessary.module.dependency.problem.descriptor", moduleName, dependencyName);
return manager.createProblemDescriptor(allContainsMessage, module, new RemoveModuleDependencyFix(dependencyName));
}
else {
String message = InspectionsBundle.message("suspected.module.dependency.problem.descriptor", moduleName, dependencyName, scope.getDisplayName());
String message = JavaAnalysisBundle.message("suspected.module.dependency.problem.descriptor", moduleName, dependencyName, scope.getDisplayName());
return manager.createProblemDescriptor(message, module);
}
}
@@ -134,7 +135,7 @@ public class UnnecessaryModuleDependencyInspection extends GlobalInspectionTool
@Override
@NotNull
public String getFamilyName() {
return InspectionsBundle.message("remove.dependency");
return JavaAnalysisBundle.message("remove.dependency");
}
@Override
@@ -8,6 +8,7 @@ import com.intellij.codeInsight.daemon.impl.quickfix.MethodThrowsFix;
import com.intellij.codeInspection.*;
import com.intellij.codeInspection.reference.*;
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.lang.jvm.JvmModifier;
import com.intellij.openapi.application.WriteAction;
import com.intellij.openapi.diagnostic.Logger;
@@ -21,7 +22,6 @@ import com.intellij.util.IncorrectOperationException;
import com.intellij.util.ObjectUtils;
import com.intellij.util.Query;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -39,7 +39,7 @@ public class RedundantThrowsDeclarationInspection extends GlobalJavaBatchInspect
@Nullable
@Override
public JComponent createOptionsPanel() {
return new SingleCheckboxOptionsPanel(InspectionsBundle.message("ignore.exceptions.thrown.by.entry.points.methods"), this, "IGNORE_ENTRY_POINTS");
return new SingleCheckboxOptionsPanel(JavaAnalysisBundle.message("ignore.exceptions.thrown.by.entry.points.methods"), this, "IGNORE_ENTRY_POINTS");
}
@Override
@@ -84,17 +84,17 @@ public class RedundantThrowsDeclarationInspection extends GlobalJavaBatchInspect
RefClass ownerClass = refMethod.getOwnerClass();
if (refMethod.isAbstract() || ownerClass != null && ownerClass.isInterface()) {
problems.add(manager.createProblemDescriptor(throwsRef, InspectionsBundle.message(
problems.add(manager.createProblemDescriptor(throwsRef, JavaAnalysisBundle.message(
"inspection.redundant.throws.problem.descriptor", "<code>#ref</code>"), new MyQuickFix(processor, throwsClassName), ProblemHighlightType.LIKE_UNUSED_SYMBOL,
false));
}
else if (!refMethod.getDerivedMethods().isEmpty()) {
problems.add(manager.createProblemDescriptor(throwsRef, InspectionsBundle.message(
problems.add(manager.createProblemDescriptor(throwsRef, JavaAnalysisBundle.message(
"inspection.redundant.throws.problem.descriptor1", "<code>#ref</code>"), new MyQuickFix(processor, throwsClassName), ProblemHighlightType.LIKE_UNUSED_SYMBOL,
false));
}
else {
problems.add(manager.createProblemDescriptor(throwsRef, InspectionsBundle.message(
problems.add(manager.createProblemDescriptor(throwsRef, JavaAnalysisBundle.message(
"inspection.redundant.throws.problem.descriptor2", "<code>#ref</code>"), new MyQuickFix(processor, throwsClassName), ProblemHighlightType.LIKE_UNUSED_SYMBOL,
false));
}
@@ -171,7 +171,7 @@ public class RedundantThrowsDeclarationInspection extends GlobalJavaBatchInspect
@Override
@NotNull
public String getFamilyName() {
return InspectionsBundle.message("inspection.redundant.throws.remove.quickfix");
return JavaAnalysisBundle.message("inspection.redundant.throws.remove.quickfix");
}
@Override
@@ -16,6 +16,7 @@
package com.intellij.codeInspection.unusedImport;
import com.intellij.codeInspection.*;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.psi.*;
import com.intellij.psi.util.FileTypeUtils;
import com.intellij.psi.util.PsiTreeUtil;
@@ -62,6 +63,6 @@ public class UnusedImportInspection extends GlobalSimpleInspectionTool {
}
public static String getDisplayNameText() {
return InspectionsBundle.message("unused.import.display.name");
return JavaAnalysisBundle.message("unused.import.display.name");
}
}
@@ -22,6 +22,7 @@ import com.intellij.codeInspection.reference.RefGraphAnnotator;
import com.intellij.codeInspection.reference.RefManager;
import com.intellij.codeInspection.reference.RefModule;
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.application.ReadAction;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.module.Module;
@@ -62,7 +63,7 @@ public class UnusedLibrariesInspection extends GlobalInspectionTool {
@Nullable
@Override
public JComponent createOptionsPanel() {
return new SingleCheckboxOptionsPanel(InspectionsBundle.message("don.t.report.unused.jars.inside.used.library"), this, "IGNORE_LIBRARY_PARTS");
return new SingleCheckboxOptionsPanel(JavaAnalysisBundle.message("don.t.report.unused.jars.inside.used.library"), this, "IGNORE_LIBRARY_PARTS");
}
@Nullable
@@ -123,13 +124,13 @@ public class UnusedLibrariesInspection extends GlobalInspectionTool {
final Set<VirtualFile> files = ContainerUtil.set(((LibraryOrderEntry)entry).getRootFiles(OrderRootType.CLASSES));
boolean allRootsUnused = usedRoots == null || !files.removeAll(usedRoots);
if (allRootsUnused) {
String message = InspectionsBundle.message("unused.library.problem.descriptor", entry.getPresentableName());
String message = JavaAnalysisBundle.message("unused.library.problem.descriptor", entry.getPresentableName());
result.add(manager.createProblemDescriptor(message, module, new RemoveUnusedLibrary(entry.getPresentableName(), null)));
}
else if (!files.isEmpty() && !IGNORE_LIBRARY_PARTS) {
final String unusedLibraryRoots = StringUtil.join(files, file -> file.getPresentableName(), ",");
String message =
InspectionsBundle.message("unused.library.roots.problem.descriptor", unusedLibraryRoots, entry.getPresentableName());
JavaAnalysisBundle.message("unused.library.roots.problem.descriptor", unusedLibraryRoots, entry.getPresentableName());
CommonProblemDescriptor descriptor =
((LibraryOrderEntry)entry).isModuleLevel()
? manager.createProblemDescriptor(message, module, new RemoveUnusedLibrary(entry.getPresentableName(), files))
@@ -258,7 +259,7 @@ public class UnusedLibrariesInspection extends GlobalInspectionTool {
@Override
@NotNull
public String getFamilyName() {
return myFiles == null ? InspectionsBundle.message("detach.library.quickfix.name") : InspectionsBundle.message("detach.library.roots.quickfix.name");
return myFiles == null ? JavaAnalysisBundle.message("detach.library.quickfix.name") : JavaAnalysisBundle.message("detach.library.roots.quickfix.name");
}
@Override
@@ -7,6 +7,7 @@ import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.codeInspection.deadCode.UnusedDeclarationInspectionBase;
import com.intellij.codeInspection.inheritance.ImplicitSubclassProvider;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.progress.EmptyProgressIndicator;
import com.intellij.openapi.project.Project;
@@ -125,7 +126,7 @@ class AccessCanBeTightenedInspection extends AbstractBaseJavaLocalInspectionTool
if (toHighlight != null) {
String suggestedModifier = PsiUtil.getAccessModifier(suggestedLevel);
myHolder.registerProblem(toHighlight,
InspectionsBundle.message("access.can.be.0", VisibilityUtil.toPresentableText(suggestedModifier)), new ChangeModifierFix(suggestedModifier));
JavaAnalysisBundle.message("access.can.be.0", VisibilityUtil.toPresentableText(suggestedModifier)), new ChangeModifierFix(suggestedModifier));
}
}
}
@@ -8,6 +8,7 @@ import com.intellij.codeInspection.*;
import com.intellij.codeInspection.ex.EntryPointsManager;
import com.intellij.codeInspection.ex.EntryPointsManagerBase;
import com.intellij.codeInspection.reference.*;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.ReadAction;
import com.intellij.openapi.diagnostic.Logger;
@@ -61,7 +62,7 @@ public final class VisibilityInspection extends GlobalJavaBatchInspectionTool {
gc.weighty = 0;
gc.anchor = GridBagConstraints.NORTHWEST;
myPackageLocalForMembersCheckbox = new JCheckBox(InspectionsBundle.message("inspection.visibility.option.package.private.members"));
myPackageLocalForMembersCheckbox = new JCheckBox(JavaAnalysisBundle.message("inspection.visibility.option.package.private.members"));
myPackageLocalForMembersCheckbox.setSelected(SUGGEST_PACKAGE_LOCAL_FOR_MEMBERS);
myPackageLocalForMembersCheckbox.getModel().addItemListener(
e -> SUGGEST_PACKAGE_LOCAL_FOR_MEMBERS = myPackageLocalForMembersCheckbox.isSelected());
@@ -69,7 +70,7 @@ public final class VisibilityInspection extends GlobalJavaBatchInspectionTool {
gc.gridy = 0;
add(myPackageLocalForMembersCheckbox, gc);
myPackageLocalForTopClassesCheckbox = new JCheckBox(InspectionsBundle.message(
myPackageLocalForTopClassesCheckbox = new JCheckBox(JavaAnalysisBundle.message(
"inspection.visibility.package.private.top.level.classes"));
myPackageLocalForTopClassesCheckbox.setSelected(SUGGEST_PACKAGE_LOCAL_FOR_TOP_CLASSES);
myPackageLocalForTopClassesCheckbox.getModel().addItemListener(
@@ -78,14 +79,14 @@ public final class VisibilityInspection extends GlobalJavaBatchInspectionTool {
gc.gridy++;
add(myPackageLocalForTopClassesCheckbox, gc);
myPrivateForInnersCheckbox = new JCheckBox(InspectionsBundle.message("inspection.visibility.private.inner.members"));
myPrivateForInnersCheckbox = new JCheckBox(JavaAnalysisBundle.message("inspection.visibility.private.inner.members"));
myPrivateForInnersCheckbox.setSelected(SUGGEST_PRIVATE_FOR_INNERS);
myPrivateForInnersCheckbox.getModel().addItemListener(e -> SUGGEST_PRIVATE_FOR_INNERS = myPrivateForInnersCheckbox.isSelected());
gc.gridy++;
add(myPrivateForInnersCheckbox, gc);
mySuggestForConstantsCheckbox = new JCheckBox(InspectionsBundle.message("inspection.visibility.option.constants"));
mySuggestForConstantsCheckbox = new JCheckBox(JavaAnalysisBundle.message("inspection.visibility.option.constants"));
mySuggestForConstantsCheckbox.setSelected(SUGGEST_FOR_CONSTANTS);
mySuggestForConstantsCheckbox.getModel().addItemListener(
e -> SUGGEST_FOR_CONSTANTS = mySuggestForConstantsCheckbox.isSelected());
@@ -651,7 +652,7 @@ public final class VisibilityInspection extends GlobalJavaBatchInspectionTool {
@Override
@NotNull
public String getFamilyName() {
return InspectionsBundle.message("inspection.visibility.accept.quickfix");
return JavaAnalysisBundle.message("inspection.visibility.accept.quickfix");
}
@Override
@@ -689,14 +690,14 @@ public final class VisibilityInspection extends GlobalJavaBatchInspectionTool {
}
private static String getCanBePrivate() {
return InspectionsBundle.message("inspection.visibility.compose.suggestion", VisibilityUtil.toPresentableText(PsiModifier.PRIVATE));
return JavaAnalysisBundle.message("inspection.visibility.compose.suggestion", VisibilityUtil.toPresentableText(PsiModifier.PRIVATE));
}
private static String getCanBePackageLocal() {
return InspectionsBundle.message("inspection.visibility.compose.suggestion", VisibilityUtil.toPresentableText(PsiModifier.PACKAGE_LOCAL));
return JavaAnalysisBundle.message("inspection.visibility.compose.suggestion", VisibilityUtil.toPresentableText(PsiModifier.PACKAGE_LOCAL));
}
private static String getCanBeProtected() {
return InspectionsBundle.message("inspection.visibility.compose.suggestion", VisibilityUtil.toPresentableText(PsiModifier.PROTECTED));
return JavaAnalysisBundle.message("inspection.visibility.compose.suggestion", VisibilityUtil.toPresentableText(PsiModifier.PROTECTED));
}
}
@@ -1,8 +1,12 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.codeInspection.xml;
import com.intellij.codeInspection.*;
import com.intellij.codeInspection.LocalInspectionToolSession;
import com.intellij.codeInspection.ProblemHighlightType;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.codeInspection.XmlSuppressableInspectionTool;
import com.intellij.codeInspection.deprecation.DeprecationInspectionBase;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.psi.*;
import com.intellij.psi.xml.XmlAttributeValue;
import com.intellij.psi.xml.XmlTag;
@@ -56,7 +60,7 @@ public class DeprecatedClassUsageInspection extends XmlSuppressableInspectionToo
@NotNull
@Override
public String getGroupDisplayName() {
return InspectionsBundle.message("deprecated.class.usage.group.xml");
return JavaAnalysisBundle.message("deprecated.class.usage.group.xml");
}
@NotNull
@@ -16,11 +16,11 @@
package org.jetbrains.java.generate.inspection;
import com.intellij.codeInsight.TestFrameworks;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ProblemHighlightType;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.codeInspection.ui.RegExFormatter;
import com.intellij.codeInspection.ui.RegExInputVerifier;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.psi.*;
import com.intellij.psi.util.InheritanceUtil;
import com.intellij.ui.DocumentAdapter;
@@ -153,7 +153,7 @@ public class ClassHasNoToStringMethodInspection extends AbstractToStringInspecti
}
}
holder.registerProblem(nameIdentifier,
InspectionsBundle.message("inspection.class.has.no.to.string.method.description", clazz.getName()),
JavaAnalysisBundle.message("inspection.class.has.no.to.string.method.description", clazz.getName()),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING, createFixes(holder));
}
};
@@ -174,7 +174,7 @@ public class ClassHasNoToStringMethodInspection extends AbstractToStringInspecti
constraints.weightx = 0.0;
constraints.anchor = GridBagConstraints.WEST;
constraints.fill = GridBagConstraints.NONE;
panel.add(new JLabel(InspectionsBundle.message("inspection.class.has.no.to.string.method.exclude.classes.reg.exp.option")), constraints);
panel.add(new JLabel(JavaAnalysisBundle.message("inspection.class.has.no.to.string.method.exclude.classes.reg.exp.option")), constraints);
final JFormattedTextField excludeClassNamesField = new JFormattedTextField(new RegExFormatter());
excludeClassNamesField.setValue(excludeClassNamesPattern);
@@ -203,7 +203,7 @@ public class ClassHasNoToStringMethodInspection extends AbstractToStringInspecti
panel.add(excludeClassNamesField, constraints);
final CheckBox excludeExceptionCheckBox = new CheckBox(
InspectionsBundle.message("inspection.class.has.no.to.string.method.ignore.exception.classes.option"), this, "excludeException");
JavaAnalysisBundle.message("inspection.class.has.no.to.string.method.ignore.exception.classes.option"), this, "excludeException");
constraints.gridx = 0;
constraints.gridy = 1;
constraints.gridwidth = 2;
@@ -211,27 +211,27 @@ public class ClassHasNoToStringMethodInspection extends AbstractToStringInspecti
panel.add(excludeExceptionCheckBox, constraints);
final CheckBox excludeDeprecatedCheckBox = new CheckBox(
InspectionsBundle.message("inspection.class.has.no.to.string.method.ignore.deprecated.classes.option"), this, "excludeDeprecated");
JavaAnalysisBundle.message("inspection.class.has.no.to.string.method.ignore.deprecated.classes.option"), this, "excludeDeprecated");
constraints.gridy = 2;
panel.add(excludeDeprecatedCheckBox, constraints);
final CheckBox excludeEnumCheckBox = new CheckBox(
InspectionsBundle.message("inspection.class.has.no.to.string.method.ignore.enum.classes.option"), this, "excludeEnum");
JavaAnalysisBundle.message("inspection.class.has.no.to.string.method.ignore.enum.classes.option"), this, "excludeEnum");
constraints.gridy = 3;
panel.add(excludeEnumCheckBox, constraints);
final CheckBox excludeAbstractCheckBox = new CheckBox(
InspectionsBundle.message("inspection.class.has.no.to.string.method.ignore.abstract.classes.option"), this, "excludeAbstract");
JavaAnalysisBundle.message("inspection.class.has.no.to.string.method.ignore.abstract.classes.option"), this, "excludeAbstract");
constraints.gridy = 4;
panel.add(excludeAbstractCheckBox, constraints);
final CheckBox excludeInTestCodeCheckBox = new CheckBox(
InspectionsBundle.message("inspection.class.has.no.to.string.method.ignore.test.classes.option"), this, "excludeTestCode");
JavaAnalysisBundle.message("inspection.class.has.no.to.string.method.ignore.test.classes.option"), this, "excludeTestCode");
constraints.gridy = 5;
panel.add(excludeInTestCodeCheckBox, constraints);
final CheckBox excludeInnerClasses = new CheckBox(
InspectionsBundle.message("inspection.class.has.no.to.string.method.ignore.inner.classes.option"), this, "excludeInnerClasses");
JavaAnalysisBundle.message("inspection.class.has.no.to.string.method.ignore.inner.classes.option"), this, "excludeInnerClasses");
constraints.gridy = 6;
constraints.weighty = 1.0;
panel.add(excludeInnerClasses, constraints);
@@ -15,9 +15,9 @@
*/
package org.jetbrains.java.generate.inspection;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ProblemHighlightType;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.psi.*;
import com.intellij.psi.util.PropertyUtilBase;
import gnu.trove.THashSet;
@@ -95,14 +95,14 @@ public class FieldNotUsedInToStringInspection extends AbstractToStringInspection
for (PsiField field : visitor.getUnusedFields()) {
final String fieldName = field.getName();
myHolder.registerProblem(field.getNameIdentifier(),
InspectionsBundle.message("inspection.field.not.used.in.to.string.description2", fieldName),
JavaAnalysisBundle.message("inspection.field.not.used.in.to.string.description2", fieldName),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING, createFixes(myHolder));
}
for (PsiMethod unusedMethod : visitor.getUnusedMethods()) {
final PsiIdentifier identifier = unusedMethod.getNameIdentifier();
final PsiElement target = identifier == null ? unusedMethod : identifier;
myHolder.registerProblem(target,
InspectionsBundle.message("inspection.field.not.used.in.to.string.description", unusedMethod.getName()),
JavaAnalysisBundle.message("inspection.field.not.used.in.to.string.description", unusedMethod.getName()),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING, createFixes(myHolder));
}
}
@@ -16,8 +16,8 @@
package com.intellij.codeInsight.daemon.impl.quickfix;
import com.intellij.codeInsight.intention.HighPriorityAction;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.LocalQuickFixAndIntentionActionOnPsiElement;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.project.Project;
@@ -35,7 +35,7 @@ public class RemoveTypeArgumentsFix extends LocalQuickFixAndIntentionActionOnPsi
@NotNull
@Override
public String getText() {
return InspectionsBundle.message("inspection.redundant.type.remove.quickfix");
return JavaAnalysisBundle.message("inspection.redundant.type.remove.quickfix");
}
@NotNull
@@ -3,6 +3,7 @@ package com.intellij.codeInspection;
import com.intellij.codeInspection.LambdaCanBeMethodReferenceInspection.MethodReferenceCandidate;
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.TextRange;
@@ -45,7 +46,7 @@ public class AnonymousCanBeMethodReferenceInspection extends AbstractBaseJavaLoc
@Nullable
@Override
public JComponent createOptionsPanel() {
return new SingleCheckboxOptionsPanel(InspectionsBundle.message("report.when.interface.is.not.annotated.with.functional.interface"), this, "reportNotAnnotatedInterfaces");
return new SingleCheckboxOptionsPanel(JavaAnalysisBundle.message("report.when.interface.is.not.annotated.with.functional.interface"), this, "reportNotAnnotatedInterfaces");
}
@NotNull
@@ -296,7 +296,7 @@ public class HTMLJavaHTMLComposerImpl extends HTMLJavaHTMLComposer {
buf.append(">");
if (refElement instanceof RefClass && ((RefClass)refElement).isAnonymous()) {
buf.append(InspectionsBundle.message("inspection.reference.anonymous"));
buf.append(AnalysisBundle.message("inspection.reference.anonymous"));
}
else if (refElement instanceof RefJavaElement && ((RefJavaElement)refElement).isSyntheticJSP()) {
buf.append(XmlStringUtil.escapeString(refElement.getName()));
@@ -4,6 +4,7 @@ package com.intellij.codeInspection.java18api;
import com.intellij.codeInspection.*;
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
import com.intellij.codeInspection.util.LambdaGenerationUtil;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.TextRange;
import com.intellij.pom.java.JavaFeature;
@@ -63,7 +64,7 @@ public class Java8MapForEachInspection extends AbstractBaseJavaLocalInspectionTo
PsiParameter entry = lambdaParameters[0];
if (!allUsagesAllowed(entry)) return;
PsiElement nameElement = Objects.requireNonNull(call.getMethodExpression().getReferenceNameElement());
holder.registerProblem(nameElement, InspectionsBundle.message("inspection.can.be.replaced.with.message", "Map.forEach()"),
holder.registerProblem(nameElement, JavaAnalysisBundle.message("inspection.can.be.replaced.with.message", "Map.forEach()"),
new ReplaceWithMapForEachFix());
}
@@ -99,7 +100,7 @@ public class Java8MapForEachInspection extends AbstractBaseJavaLocalInspectionTo
toHighlight = firstChild;
range = new TextRange(0, firstChild.getTextLength());
}
holder.registerProblem(toHighlight, InspectionsBundle.message("inspection.can.be.replaced.with.message", "Map.forEach()"),
holder.registerProblem(toHighlight, JavaAnalysisBundle.message("inspection.can.be.replaced.with.message", "Map.forEach()"),
type, range, new ReplaceWithMapForEachFix());
}
}
@@ -17,6 +17,7 @@ package com.intellij.codeInspection.streamMigration;
import com.intellij.codeInspection.*;
import com.intellij.codeInspection.streamMigration.StreamApiMigrationInspection.StreamSource;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.codeStyle.JavaCodeStyleManager;
@@ -41,7 +42,7 @@ class MigrateToStreamFix implements LocalQuickFix {
@NotNull
@Override
public String getName() {
return InspectionsBundle.message("replace.with.0", myMigration.getReplacement());
return JavaAnalysisBundle.message("replace.with.0", myMigration.getReplacement());
}
@NotNull
@@ -17,6 +17,7 @@ package com.intellij.java.codeInspection
import com.intellij.codeInspection.InspectionsBundle
import com.intellij.codeInspection.java19modules.Java9ModuleExportsPackageToItselfInspection
import com.intellij.java.analysis.JavaAnalysisBundle
import com.intellij.java.testFramework.fixtures.LightJava9ModulesCodeInsightFixtureTestCase
import com.intellij.java.testFramework.fixtures.MultiModuleJava9ProjectDescriptor
import org.intellij.lang.annotations.Language
@@ -25,9 +26,9 @@ import org.intellij.lang.annotations.Language
* @author Pavel.Dolgov
*/
class Java9ModuleExportsPackageToItselfTest : LightJava9ModulesCodeInsightFixtureTestCase() {
private val message = InspectionsBundle.message("inspection.module.exports.package.to.itself")
private val fix1 = InspectionsBundle.message("exports.to.itself.delete.statement.fix")
private val fix2 = InspectionsBundle.message("exports.to.itself.delete.module.ref.fix", "M")
private val message = JavaAnalysisBundle.message("inspection.module.exports.package.to.itself")
private val fix1 = JavaAnalysisBundle.message("exports.to.itself.delete.statement.fix")
private val fix2 = JavaAnalysisBundle.message("exports.to.itself.delete.module.ref.fix", "M")
override fun setUp() {
super.setUp()
@@ -3,7 +3,7 @@ package com.intellij.java.propertyBased;
import com.intellij.codeInsight.daemon.impl.HighlightInfo;
import com.intellij.codeInsight.intention.IntentionAction;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.editor.Editor;
import com.intellij.psi.*;
import com.intellij.psi.util.PsiTreeUtil;
@@ -104,7 +104,7 @@ class JavaCommentingStrategy extends JavaIntentionPolicy {
intentionText.matches("Simplify '.*' to .*") ||
intentionText.matches("Move '.*' to Javadoc ''@throws'' tag") ||
intentionText.matches("Remove '.*' from '.*' throws list") ||
intentionText.matches(InspectionsBundle.message("inspection.redundant.type.remove.quickfix")) ||
intentionText.matches(JavaAnalysisBundle.message("inspection.redundant.type.remove.quickfix")) ||
intentionText.matches("Remove .+ suppression");
return !isCommentChangingAction;
}
@@ -36,6 +36,7 @@ inspection.processing.job.descriptor1=Processing external usages of
inspection.processing.job.descriptor2=Analyzing code in
inspection.progress.title=Inspecting Code...
inspection.redirect.template=<html><body>Injected element has problem: {0} (in <a href=\"#navigation/{1}:{2}\">{3}</a>). </body></html>
inspection.reference.anonymous=anonymous
inspection.reference.invalid=element no longer exists
jar.modification.not.supported.error=Cannot modify archive file {0}
local.scopes.node.text=Local Scopes
@@ -19,30 +19,16 @@ inspection.disabled.title=Inspection disabled
inspection.problem.synopsis=Problem synopsis
#export results view
inspection.export.results.can.be.final.description=Declaration can have final modifier
inspection.export.results.package=package
inspection.export.results.constructor=constructor
inspection.export.results.method=method
inspection.export.results.field=field
#can be final
inspection.can.be.final.display.name=Declaration can have final modifier
inspection.can.be.final.accept.quickfix=Make final
inspection.can.be.final.option=Report classes
inspection.can.be.final.option1=Report methods
inspection.can.be.final.option2=Report fields
#dataflow
inspection.data.flow.display.name=Constant conditions \\& exceptions
inspection.contract.display.name=Contract issues
inspection.data.flow.nullable.quickfix.option=Suggest @Nullable annotation for methods/fields/parameters where nullable values are used
inspection.data.flow.true.asserts.option=Don't report assertions with condition statically proven to be always <code>true</code>
inspection.data.flow.turn.off.true.asserts.quickfix=Don't report always true assertions
inspection.data.flow.turn.off.constant.references.quickfix=Don't report values which are guaranteed to be constant
inspection.data.flow.turn.off.nullable.returning.notnull.quickfix=Don't report nullable methods which always return not-null value
inspection.data.flow.redundant.instanceof.quickfix=Replace with a null check
inspection.data.flow.simplify.boolean.expression.quickfix=Simplify boolean expression
inspection.data.flow.simplify.to.assignment.quickfix.name=Simplify to normal assignment
inspection.data.flow.filter.notnull.quickfix=Insert 'filter(Objects::nonNull)' step
inspection.data.flow.use.computeifpresent.quickfix=Replace 'compute' with 'computeIfPresent'
configure.annotations.option=Configure Annotations
@@ -62,16 +48,8 @@ inspection.empty.method.problem.descriptor4=All implementations of this method a
#redundant cast
inspection.redundant.cast.display.name=Redundant type cast
inspection.redundant.cast.remove.quickfix=Remove redundant cast(s)
inspection.redundant.cast.problem.descriptor=Casting {0} to {1} is redundant
#redundant throws
inspection.redundant.throws.display.name=Redundant 'throws' clause
inspection.redundant.throws.remove.quickfix=Remove unnecessary 'throws' declarations
inspection.redundant.throws.problem.descriptor=The declared exception {0} is never thrown in method implementations
inspection.redundant.throws.problem.descriptor1=The declared exception {0} is never thrown in this method, nor in its derivables
inspection.redundant.throws.problem.descriptor2=The declared exception {0} is never thrown
inspection.equals.hashcode.display.name='equals()' and 'hashCode()' not paired
inspection.equals.hashcode.only.one.defined.problem.descriptor=Class has {0} defined but does not define {1}
inspection.equals.hashcode.generate.equals.quickfix=Generate 'equals()'
@@ -83,15 +61,6 @@ inspection.1.7.problem.descriptor=Usage of generified after 1.6 API which would
inspection.1.8.problem.descriptor=Default {0, choice, 0#|1#method is|2# methods are} not overridden. It would cause compilation problems with JDK {1}
inspection.1.8.problem.single.descriptor=Default method ''{0}'' is not overridden. It would cause compilation problems with JDK {1}
inspection.local.can.be.final.display.name=Local variable or parameter can be final
inspection.local.can.be.final.option=Report local variables
inspection.local.can.be.final.option1=Report method parameters
inspection.local.can.be.final.option2=Report catch parameters
inspection.local.can.be.final.option3=Report foreach parameters
inspection.local.can.be.final.option4=Report variables which are implicit final
inspection.can.be.local.parameter.problem.descriptor=Parameter <code>#ref</code> can have <code>final</code> modifier
inspection.can.be.local.variable.problem.descriptor=Variable <code>#ref</code> can have <code>final</code> modifier
inspection.return.separated.from.computation.name='return' separated from the result computation
inspection.return.separated.from.computation.descriptor=Return separated from computation of value of ''{0}''
inspection.return.separated.from.computation.quickfix=Move ''return'' closer to computation of the value of ''{0}''
@@ -111,35 +80,8 @@ inspection.nullable.problems.notnull.overrides.option=Report @NotNull &parameter
inspection.nullable.problems.notnull.parameters.with.null.literal.option=Report @NotNull parameters with null-literal argument usages
#problem descriptor messages
inspection.nullable.problems.Nullable.NotNull.conflict=Cannot annotate with both @{0} and @{1}
inspection.nullable.problems.Nullable.method.overrides.NotNull=Method annotated with @{0} must not override @{1} method
inspection.nullable.problems.method.overrides.NotNull=Not annotated method overrides method annotated with @{0}
inspection.nullable.problems.annotated.field.getter.not.annotated=Getter for @{0} field might be annotated @{0} itself
inspection.nullable.problems.annotated.field.getter.conflict=Getter for @{0} field is annotated @{1}
inspection.nullable.problems.annotated.field.setter.parameter.not.annotated=Setter parameter for @{0} field might be annotated @{0} itself
inspection.nullable.problems.annotated.field.setter.parameter.conflict=Setter parameter for @{0} field is annotated @{1}
inspection.nullable.problems.annotated.field.constructor.parameter.not.annotated=Constructor parameter for @{0} field might be annotated @{0} itself
inspection.nullable.problems.NotNull.parameter.overrides.Nullable=Parameter annotated @{0} must not override @{1} parameter
inspection.nullable.problems.NotNull.parameter.overrides.not.annotated=Parameter annotated @{0} should not override non-annotated parameter
inspection.nullable.problems.parameter.overrides.NotNull=Not annotated parameter overrides @{0} parameter
inspection.nullable.problems.primitive.type.annotation=Primitive type members cannot be annotated
inspection.nullable.problems.NotNull.parameter.receives.null.literal=Parameter annotated @{0} should not receive ''null'' as an argument
inspection.test.only.problems.display.name=Test-only class or method call in production code
inspection.test.only.problems.test.only.method.call=Test-only method is called in production code
inspection.test.only.problems.test.only.class.reference=Test-only class is referenced in production code
inspection.test.only.problems.test.only.field.reference=Test-only field is referenced in production code
inspection.visibility.display.name=Declaration access can be weaker
inspection.visibility.option.constants=Suggest weaker visibility for constants
inspection.visibility.option.package.private.members=Suggest package-private visibility level for class members
inspection.visibility.package.private.top.level.classes=Suggest package-private visibility level for top-level classes
inspection.visibility.private.inner.members=<html>Suggest private for inner class members when referenced from outer class only</html>
#can be private|package-private|protected|public
inspection.visibility.compose.suggestion=Can be {0}
inspection.visibility.accept.quickfix=Accept suggested access level
inspection.field.can.be.local.display.name=Field can be local
inspection.field.can.be.local.problem.descriptor=Field can be converted to a local variable
inspection.parameter.can.be.local.display.name=Parameter can be local
@@ -153,11 +95,6 @@ inspection.unused.return.value.display.name=Method can be void
inspection.unused.return.value.problem.descriptor=Return value of the method is never used
inspection.unused.return.value.make.void.quickfix=Make method 'void'
inspection.same.return.value.display.name=Method returns the same value
inspection.same.return.value.problem.descriptor=Method always returns {0}
inspection.same.return.value.problem.descriptor1=Method and all its derivables always return {0}
inspection.same.return.value.problem.descriptor2=All implementations of this method always return {0}
inspection.dependency.violator.problem.descriptor=Dependency rule ''{0}.'' is violated
inspection.same.parameter.display.name=Actual method parameter is the same constant
@@ -178,33 +115,15 @@ inspection.unused.parameter.composer=Parameter <code>#ref</code> is not used in
inspection.unused.parameter.composer1=Parameter <code>#ref</code> is not used in either this method or any of its derived methods
inspection.unused.parameter.display.name=Unused method parameters
inspection.unused.parameter.delete.quickfix=Delete unused parameter(s)
inspection.redundant.type.display.name=Redundant type arguments
inspection.redundant.type.remove.quickfix=Remove type arguments
inspection.redundant.type.problem.descriptor=Explicit type arguments can be inferred
inspection.redundant.type.no.generics.problem.descriptor=Type arguments are redundant for the non-generic method call
inspection.redundant.type.no.generics.method.reference.problem.descriptor=Type arguments are redundant for the non-generic method reference
inspection.redundant.array.creation.display.name=Redundant array creation
inspection.redundant.array.creation.quickfix=Remove explicit array creation
inspection.redundant.array.creation.for.varargs.call.descriptor=Redundant array creation for calling varargs method
inspection.suspicious.collections.method.calls.display.name=Suspicious collections method calls
inspection.suspicious.collections.method.calls.problem.descriptor=''{0}'' may not contain {2} of type ''{1}''
inspection.suspicious.collections.method.calls.problem.descriptor1=Suspicious call to ''{0}''
inspection.suspicious.array.method.call.display.name=Suspicious Arrays method calls
inspection.suspicious.array.method.call.problem.element=Element type is not compatible with array type
inspection.suspicious.array.method.call.problem.arrays=Array types are incompatible: arrays are always different
inspection.raw.variable.type.can.be.generic.name=Raw type can be generic
inspection.raw.variable.type.can.be.generic.quickfix=Change type of {0} to {1}
inspection.raw.variable.type.can.be.generic.family.quickfix=Add generic parameters to the type
inspection.reference.default.package=<default>
inspection.reference.implicit.constructor.name=implicit constructor of {0}
inspection.reference.anonymous.name=anonymous ({0})
inspection.reference.jsp.holder.method.anonymous.name=<% page content %>
inspection.reference.anonymous=anonymous
inspection.export.save.button=Save
inspection.export.dialog.title=Export
inspection.export.options.panel.title=Options
@@ -213,18 +132,12 @@ inspection.export.title=Code Inspection results
inspection.export.generating.html.for=Generating HTML:{0}
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.family.else.if.description='else if' can be merged
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.disable.highlight.tail.call=Do not highlight common parts, if tail statement is call
inspection.common.if.parts.settings.highlight.when.tail.call=Highlight when last common statement is call
inspection.common.if.parts.description.variables.only=Variables can be extracted from ''if''{0}
inspection.common.if.parts.description.with.variables.extract=Common parts with variables can be extracted from ''if''{0}
inspection.common.if.parts.description.without.variables.extract=Common part can be extracted from ''if''{0}
@@ -311,8 +224,6 @@ inspection.replace.ternary.quickfix=Replace with ''{0} != null ?:''
inspection.replace.methodref.ternary.quickfix=Replace with null-checking lambda
inspection.surround.if.family=Surround with if
inspection.dependency.configure.button.text=Configure dependency rules
inspection.surround.requirenonnull.quickfix=Replace with ''Objects.requireNonNull({0})''
inspection.javadoc.label.text=Additional Javadoc Tags:
inspection.javadoc.dialog.title=Edit Additional Javadoc Tags
inspection.javadoc.html.not.required.label.text=Additional Not Required Html Attributes:
@@ -449,17 +360,7 @@ inspection.duplicates.message.in.this.file=(in this file)
inspection.duplicates.message.more=... ({0} more)
inspection.duplicates.message=<html><body>Duplicate string literal found in<br>{0}</body></html>
inspection.compiler.javac.quirks.name=Javac quirks
inspection.compiler.javac.quirks.anno.array.comma.problem=Trailing comma in annotation array initializer may cause compilation error in some Javac versions (e.g. JDK 5 and JDK 6).
inspection.compiler.javac.quirks.anno.array.comma.fix=Remove trailing comma
inspection.compiler.javac.quirks.qualifier.type.args.problem=Generics in qualifier reference may cause compilation error in some Javac versions (e.g. JDK 5 and JDK 6).
inspection.compiler.javac.quirks.qualifier.type.args.fix=Remove generic parameter
inspection.redundant.requires.statement.name=Redundant 'requires' directive in module-info
inspection.redundant.requires.statement.description=Redundant directive ''requires {0}''
inspection.redundant.requires.statement.fix.family=Delete redundant 'requires' directive
inspection.redundant.requires.statement.fix.name=Delete directive ''requires {0}''
inspection.forward.compatibility.name=Forward compatibility
inspection.root.node.title=Inspections
@@ -470,7 +371,6 @@ inspection.tools.action.show.global.inspections.description=Hide Global Inspecti
# hardcoded inspection tools
deprecated.symbol=Deprecated symbol
unused.import=Unused import (editor light)
unused.import.statement=Unused import statement
unused.symbol=Unused symbol
redundant.throws.declaration=Redundant throws declaration
access.static.via.instance=Access static member via instance reference
@@ -479,13 +379,9 @@ illegal.package.dependencies=Illegal package dependencies
unchecked.warning=Unchecked warning
# suppression stuff
suppress.all.for.class=Suppress all inspections for class
suppress.inspection.family=Suppress inspection
suppress.inspection.statement=Suppress for statement
suppress.inspection.module=Suppress for module declaration
suppress.inspection.class=Suppress for class
suppress.inspection.field=Suppress for field
suppress.inspection.method=Suppress for method
suppress.inspection.member=Suppress for member
edit.dependency.rules.family=Edit dependency rules
edit.dependency.rules.text=Edit dependency rule \"{0} \"
@@ -583,10 +479,7 @@ profile.mapping.scope.column.title=scope
boolean.method.is.always.inverted.display.name=Boolean method is always inverted
boolean.method.is.always.inverted.problem.descriptor=Boolean method <code>#ref</code> is always inverted
inspection.results.title=Results By Editor Settings
unnecessary.module.dependency.display.name=Unnecessary module dependency
unnecessary.module.dependency.problem.descriptor=Module ''{0}'' sources do not depend on module ''{1}'' sources
unnecessary.module.dependency.exported.problem.descriptor1=Module ''{0}'' does not depend on ''{1}''. Though ''{0}'' depends on ''{2}'' through exported dependencies of ''{1}''
suspected.module.dependency.problem.descriptor=Module ''{0}'' does not depend on module ''{1}''. Though ''{1}'' was not inspected for exported dependencies needed for scope ''{2}''
run.with.editor.settings.dialog.option=Run with &editor settings
inspection.new.profile.text=New Profile Name
profile.save.as.project.checkbox.title=Save as project profile
@@ -627,10 +520,6 @@ special.annotations.annotations.list=Additional Special Annotations
inspection.filter.resolved.action.text=Filter resolved items
inspection.filter.show.diff.action.text=Show diff
inspection.duplicate.throws.display.name=Duplicate throws
inspection.duplicate.throws.problem=Duplicate throws
inspection.duplicate.throws.more.general.problem=There is a more general exception, ''{0}'', in the throws list already.
inspection.duplicate.throws.ignore.subclassing.option=Ignore exceptions subclassing others
inspection.filter.show.diff.only.action.text=Show diff only
inspection.new.profile.ide.to.project.warning.message=Do you want to save selected IDE profile as project profile?
inspection.new.profile.ide.to.project.warning.title=Unable to set up IDE profile for scope
@@ -677,17 +566,9 @@ inspections.view.options.title=Inspection {0} options
xml.suppressable.for.tag.title=Suppress for tag
xml.suppressable.for.file.title=Suppress for file
xml.suppressable.all.for.file.title=Suppress all for file
nullable.stuff.problems.overridden.methods.are.not.annotated=Overridden methods are not annotated
nullable.stuff.problems.overridden.method.parameters.are.not.annotated=Overridden method parameters are not annotated
annotate.overridden.methods.parameters=Annotate overridden method parameters as ''@{0}''
annotate.overridden.methods.parameters.family.name=Annotate overridden method parameters
offline.inspections.library.was.not.resolved=Please configure library ''{0}'' which is used in module ''{1}''
offline.inspections.library.urls.were.not.resolved=Roots {0} of the library ''{1}'' from module ''{2}'' were not resolved
offline.inspections.no.source.roots=No source roots detected for module ''{0}''
report.suspicious.but.possibly.correct.method.calls=&Report suspicious but possibly correct method calls
unused.library.display.name=Unused library
unused.library.problem.descriptor=Unused library ''{0}''
unused.library.roots.problem.descriptor=Unused roots {0} from library ''{1}''
unused.library.backward.analysis.job.description=Perform backward analysis
inspection.duplicates.option.report.propertykey.expressions=&Ignore @PropertyKey expressions
inspection.same.parameter.fix.name=Inline value ''{1}'' for parameter ''{0}''
@@ -702,8 +583,6 @@ inconsistent.line.separators=Inconsistent line separators
inspection.unused.symbol.public.method.parameters=Check parameters in &Non-private methods
introduce.constant.across.the.project=Introduce constant across the project
inspection.application.chosen.profile.log.message=Inspecting with profile ''{0}''
detach.library.quickfix.name=Detach library
detach.library.roots.quickfix.name=Detach unused library roots
inspection.javadoc.problem.pointing.to.itself=Javadoc pointing to itself
inspection.illegal.character=Illegal character
@@ -727,10 +606,6 @@ long.line.display.name=Line is longer than allowed by code style
inspection.default.annotation.param=Default annotation parameter value
preparing.for.apply.fix=Preparing to Apply Fix...
inspection.annotate.method.quickfix.family.name=Annotate method
inspection.annotate.overridden.method.quickfix.family.name=Annotate overridden methods
inspection.annotate.overridden.method.and.self.quickfix.family.name=Annotate overridden methods and self
inspection.tool.window.dialog.title=Inspection Tool Window
inspection.tool.window.dialog.no.options=Inspection ''{0}'' has no configurable options
inspection.tool.window.inspection.dialog.title=Inspection ''{0}'' options
@@ -748,22 +623,10 @@ inspection.explicit.argument.can.be.lambda.fix.name=Use ''{0}'' method with func
inspection.lambda.to.method.call.fix.family.name=Replace lambda expression with method call
inspection.lambda.to.method.call.fix.name=Replace lambda expression with ''{0}''
inspection.module.exports.package.to.itself=Module exports/opens package to itself
exports.to.itself.delete.statement.fix=Delete directive
exports.to.itself.delete.module.ref.fix=Delete reference to module ''{0}''
inspection.requires.auto.module=Dependencies on automatic modules
inspection.requires.auto.module.message='requires' directive for an automatic module
inspection.requires.auto.module.transitive='requires transitive' directive for an automatic module
inspection.requires.auto.module.option=Highlight only transitive dependencies
naming.convention.problem.descriptor.short={0} name <code>#ref</code> is too short ({1} \\&lt; {2}) #loc
naming.convention.problem.descriptor.long={0} name <code>#ref</code> is too long ({1} \\&gt; {2}) #loc
naming.convention.problem.descriptor.regex.mismatch={0} name <code>#ref</code> doesn''t match regex ''{1}'' #loc
inspection.java.module.naming=Java module naming conventions
inspection.java.module.naming.terminal.digits=Module name component ''{0}'' should avoid terminal digits
inspection.replace.with.bulk.message=Iteration can be replaced with bulk ''{0}'' call
inspection.replace.with.bulk.fix.name=Replace iteration with bulk ''{0}'' call
inspection.replace.with.bulk.fix.family.name=Replace with bulk method call
@@ -855,12 +718,7 @@ inspection.reflect.handle.invocation.primitive.argument.null=Argument of type ''
inspection.reflect.handle.invocation.result.void=Return type is 'void'
inspection.reflect.handle.invocation.result.null=Returned value is always 'null'
inspection.implicit.subclass.display.forClass=Class ''{0}'' could be implicitly subclassed and must not be final
inspection.implicit.subclass.display.forMethod=Method ''{0}'' should be overridable
inspection.implicit.subclass.make.class.extendable=Make class ''{0}'' {1,choice,0#|1#and method {2} |1<and {1} required methods }extendable
inspection.implicit.subclass.extendable=Make ''{0}'' overridable
inspection.implicit.subclass.display.name=Final declaration can't be overridden at runtime
inspection.reflection.visibility.name=Reflective access across modules issues
inspection.reflection.member.access.name=Reflective access to nonexistent/not visible class member
@@ -894,8 +752,6 @@ module.not.in.requirements=The module ''{0}'' does not have the module ''{1}'' i
module.package.not.exported=The module ''{0}'' does not export the package ''{1}'' to the module ''{2}''
module.package.not.open=The module ''{0}'' does not open the package ''{1}'' to the module ''{2}''
psi.search.overriding.progress=Searching for Overriding Methods...
unused.import.display.name=Unused import
inspection.fuse.stream.operations.fix.family.name=Fuse more statements to the Stream API chain
inspection.fuse.stream.operations.fix.name=Fuse {0} into the Stream API chain
inspection.fuse.stream.operations.message=Stream may be extended replacing {0}
@@ -961,13 +817,7 @@ inspection.cast.can.be.removed.narrowing.variable.type.fix.name=Change type of '
inspection.wrapper.type.may.be.primitive.name=Type may be primitive
inspection.wrapper.type.may.be.primitive.fix.name=Convert wrapper type to primitive
inspection.class.getclass.display.name=Class.getClass() call
inspection.class.getclass.message='getClass()' is called on Class instance
inspection.class.getclass.fix.remove.name=Remove 'getClass()' call
inspection.class.getclass.fix.replace.name=Replace with 'Class.class'
redundant.backticks.around.raw.string.literal.display.name=Redundant backticks around raw string literal
inspection.objects.equals.can.be.simplified.display.name=Objects.equals() can be replaced with equals()
inspection.duplicate.expressions.display.name=Multiple occurrences of the same expression
inspection.duplicate.expressions.message=Multiple occurrences of <code>#ref</code> #loc
inspection.duplicate.expressions.complexity.threshold=Expression complexity threshold
@@ -1030,9 +880,6 @@ inspection.collection.used.as.vararg.message=Iterable is passed as vararg: proba
inspection.manual.min.max.calculation.description=Can be replaced with ''Math.{0}'' call
inspection.manual.min.max.calculation.disable.for.non.integral=Disable for float and double
inspection.use.compare.method.fix.family.name=Replace with single comparison method
inspection.can.be.replaced.with.message=Can be replaced with ''{0}''
inspection.null.value.for.optional.option.comparisons=Report comparison of Optional with null
action.DumbAware.SingleInspectionProfilePanel.text.reset.to.empty=Reset to Empty
@@ -1045,70 +892,8 @@ inspection.redundant.record.constructor.canonical.message=Redundant canonical co
inspection.redundant.record.constructor.can.be.compact.message=Canonical constructor can be converted to compact form
inspection.redundant.record.constructor.fix.family.name=Convert canonical constructor to compact form
action.presentation.ScopesChooser.text=In All Scopes
non.final.guarded.by.field.0.loc=Non-final @GuardedBy field "{0}" #loc
non.final.guarded.by.field.ref.loc=Non-final @GuardedBy field #ref #loc
access.can.be.0=Access can be {0}
don.t.report.unused.jars.inside.used.library=Don't report unused jars inside used library
non.final.field.code.ref.code.in.immutable.class.loc=Non-final field <code>#ref</code> in @Immutable class #loc
deprecated.class.usage.group.xml=XML
replace.with.comparator=Replace with comparator
method.reference.mapped.to.comparator=Method reference mapped to Comparator interface does not fulfill the Comparator contract
static.member.guarded.by.instance.ref.loc=Static member guarded by instance #ref #loc
static.member.guarded.by.instance.0.loc=Static member guarded by instance "{0}" #loc
deprecated.member.0.is.still.used=Deprecated member ''{0}'' is still used
access.to.field.code.ref.code.outside.of.declared.guards.loc=Access to field <code>#ref</code> outside of declared guards #loc
replace.stringtokenizer.delimiters.parameter.with.unique.symbols=Replace StringTokenizer delimiters parameter with unique symbols
delimiters.argument.contains.duplicated.characters=Delimiters argument contains duplicated characters
make.0.default.annotation=Make "{0}" default annotation
remove.block.marker.comments=Remove block marker comments
redundant.block.marker=Redundant block marker
parameter.is.always.not.null=Parameter is always not-null
parameter.can.be.null=Parameter can be null
0.field.is.always.initialized.not.null=@{0} field is always initialized not-null
not.annotated.method.is.used.as.an.override.for.a.method.annotated.with.0=Not annotated method is used as an override for a method annotated with {0}
assigning.a.collection.of.nullable.elements=Assigning a collection of nullable elements into a collection of non-null elements
non.null.type.argument.is.expected=Non-null type argument is expected
custom.exception.class.should.have.a.constructor=Custom exception class should have a constructor with a single message parameter of String type
html.classes.exposed.with.code.module.info.code.html=<html>Classes exposed with <code>module-info</code></html>
ignore.operation.which.results.in.negative.value=Ignore '<<' operation which results in negative value
visible.for.testing.makes.little.sense.on.test.only.code=@VisibleForTesting makes little sense on @TestOnly code
ignore.in.the.same.outermost.class=Ignore in the same outermost class
replace.anonymous.class.with.lambda.alternative=Replace anonymous class with lambda alternative
replace.with.0=Replace with {0}
anonymous.ref.loc.can.be.replaced.with.0=Anonymous #ref #loc can be replaced with {0}
replace.with=Replace with <>
explicit.type.argument.ref.loc.can.be.replaced.with=Explicit type argument #ref #loc can be replaced with <>
replace.with.constant.value=Replace with constant value
possible.heap.pollution.from.parameterized.vararg.type.loc=Possible heap pollution from parameterized vararg type #loc
make.final.and.annotate.as.safevarargs=Make final and annotate as @SafeVarargs
annotate.as.safevarargs=Annotate as @SafeVarargs
ignore.members.of.deprecated.classes=Ignore members of deprecated classes
html.ignore.overrides.of.deprecated.abstract.methods=<html>Ignore overrides of deprecated abstract methods from non-deprecated supers</html>
ignore.inside.non.static.imports=Ignore inside non-static imports
ignore.inside.deprecated.members=Ignore inside deprecated members
module.0.with.language.level.1.depends.on.module.2.with.language.level.3=Module {0} with language level {1} depends on module {2} with language level {3}
ignore.casts.in.suspicious.collections.method.calls=Ignore casts in suspicious collections method calls
replace.with.lambda=Replace with lambda
anonymous.ref.loc.can.be.replaced.with.lambda=Anonymous #ref #loc can be replaced with lambda
report.when.interface.is.not.annotated.with.functional.interface=Report when interface is not annotated with @FunctionalInterface
instance.member.guarded.by.static.ref.loc=Instance member guarded by static #ref #loc
instance.member.guarded.by.static.0.loc=Instance member guarded by static "{0}" #loc
replace.var.with.explicit.type=Replace 'var' with explicit type
var.can.be.replaced.with.explicit.type='var' can be replaced with explicit type
replace.operator.assignment.with.assignment=Replace Operator Assignment with Assignment
replace.0.with=Replace ''''{0}'''' with ''''=''''
comparision.between.object.and.primitive=Comparision between Object and primitive is illegal and is accepted in java 7 only
vararg.method.call.with.50.poly.arguments=Vararg method call with 50+ poly arguments may cause compilation and analysis slowdown
replace.with.expression.lambda=Replace with expression lambda
statement.lambda.can.be.replaced.with.expression.lambda=Statement lambda can be replaced with expression lambda
unknown.guardedby.reference.0.loc=Unknown @GuardedBy reference "{0}" #loc
unknown.guardedby.reference.ref.loc=Unknown @GuardedBy reference #ref #loc
ignore.exceptions.thrown.by.entry.points.methods=Ignore exceptions thrown by entry points methods
remove.dependency=Remove dependency
searching.for.overriding.methods=Searching for Overriding Methods
remove.switch.label=Remove switch label
remove.switch.label.0=Remove switch label ''{0}''
remove.switch.branch.0=Remove switch branch ''{0}''
replace.with.java.stream.api.pipeline=Replace with Java Stream API pipeline
pseudo.functional.style.code=Pseudo functional style code
remove.not.null.annotation=Remove not-null annotation
@@ -1211,28 +996,6 @@ inspection.suspicious.names.ignore.methods.title=Ignore methods
nullable.notnull.configuration.dialog.title=Nullable/NotNull Configuration
nullable.notnull.annotations.panel.title={0} annotations
nullable.notnull.annotations.runtime.instrumentation.tooltip=Add runtime assertions for notnull-annotated methods and parameters
inspection.field.not.used.in.to.string.description=Method ''{0}'' is not used in ''toString()'' method
inspection.field.not.used.in.to.string.description2=Field ''{0}'' is not used in ''toString()'' method
inspection.class.has.no.to.string.method.description=Class ''{0}'' does not override ''toString()'' method
inspection.class.has.no.to.string.method.ignore.inner.classes.option=Ignore inner classes
inspection.class.has.no.to.string.method.ignore.test.classes.option=Ignore test classes
inspection.class.has.no.to.string.method.ignore.abstract.classes.option=Ignore abstract classes
inspection.class.has.no.to.string.method.ignore.enum.classes.option=Ignore enum classes
inspection.class.has.no.to.string.method.ignore.deprecated.classes.option=Ignore deprecated classes
inspection.class.has.no.to.string.method.ignore.exception.classes.option=Ignore exception classes
inspection.class.has.no.to.string.method.exclude.classes.reg.exp.option=Exclude classes (reg exp):
make.default.the.last.case.family.name=Make 'default' the last case
inspection.suspicious.integer.div.assignment.option=Report suspicious but possibly exact divisions
junit.rule.classrule.option=Report @ClassRule problems
junit.rule.rule.option=Report @Rule problems
inspection.constant.on.wrong.side.of.a.comparison.side.option=Constant should be on this side of a comparison:
static.inheritrance.fix.replace.progress=Replacing usages of {0}
inspection.suspicious.getter.setter.field.option=Only warn when field matching getter/setter name is present
inspection.c.style.array.declarations.option=Ignore C-style declarations in variables
inspection.unary.plus.unary.binary.option=Only report in confusing binary or unary expression context
inspection.infinite.loop.option=Ignore when placed in Thread.run
inspection.redundant.field.initialization.option=Only warn on initialization to null
inspection.unnecessary.super.qualifier.option=Ignore clarification 'super' qualifier
new.line.0=New line ({0})
edit.property.value=Edit property value
annotate.capitalization.type=Annotate capitalization type
@@ -1,11 +1,11 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.siyeh.ig.bugs;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.codeInspection.dataFlow.CommonDataflow;
import com.intellij.codeInspection.dataFlow.rangeSet.LongRangeSet;
import com.intellij.codeInspection.ui.MultipleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.tree.IElementType;
@@ -40,7 +40,7 @@ public class SuspiciousIntegerDivAssignmentInspection extends BaseInspection {
@Override
public JComponent createOptionsPanel() {
MultipleCheckboxOptionsPanel panel = new MultipleCheckboxOptionsPanel(this);
panel.addCheckbox(InspectionsBundle.message("inspection.suspicious.integer.div.assignment.option"), "myReportPossiblyExactDivision");
panel.addCheckbox(JavaAnalysisBundle.message("inspection.suspicious.integer.div.assignment.option"), "myReportPossiblyExactDivision");
return panel;
}
@@ -15,8 +15,8 @@
*/
package com.siyeh.ig.controlflow;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.util.PsiTreeUtil;
@@ -76,7 +76,7 @@ public class DefaultNotLastCaseInSwitchInspection extends BaseInspection {
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("make.default.the.last.case.family.name");
return JavaAnalysisBundle.message("make.default.the.last.case.family.name");
}
};
}
@@ -18,6 +18,7 @@ package com.siyeh.ig.controlflow;
import com.intellij.codeInsight.BlockUtils;
import com.intellij.codeInspection.*;
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.codeStyle.JavaCodeStyleManager;
@@ -49,7 +50,7 @@ public class IfStatementWithIdenticalBranchesInspection extends AbstractBaseJava
@Nullable
@Override
public JComponent createOptionsPanel() {
return new SingleCheckboxOptionsPanel(InspectionsBundle.message("inspection.common.if.parts.settings.highlight.when.tail.call"), this, "myHighlightWhenLastStatementIsCall");
return new SingleCheckboxOptionsPanel(JavaAnalysisBundle.message("inspection.common.if.parts.settings.highlight.when.tail.call"), this, "myHighlightWhenLastStatementIsCall");
}
@NotNull
@@ -77,7 +78,7 @@ public class IfStatementWithIdenticalBranchesInspection extends AbstractBaseJava
new SetInspectionOptionFix(
IfStatementWithIdenticalBranchesInspection.this,
"myHighlightWhenLastStatementIsCall",
InspectionsBundle.message("inspection.common.if.parts.disable.highlight.tail.call"),
JavaAnalysisBundle.message("inspection.common.if.parts.disable.highlight.tail.call"),
false
),
result.myFix
@@ -125,14 +126,14 @@ public class IfStatementWithIdenticalBranchesInspection extends AbstractBaseJava
@NotNull
@Override
public String getName() {
return InspectionsBundle.message("inspection.common.if.parts.family.else.if");
return JavaAnalysisBundle.message("inspection.common.if.parts.family.else.if");
}
@Nls
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("inspection.common.if.parts.family.else.if");
return JavaAnalysisBundle.message("inspection.common.if.parts.family.else.if");
}
@Override
@@ -222,7 +223,7 @@ public class IfStatementWithIdenticalBranchesInspection extends AbstractBaseJava
@NotNull
@Override
public String getFamilyName() {
return InspectionsBundle.message("inspection.common.if.parts.family");
return JavaAnalysisBundle.message("inspection.common.if.parts.family");
}
@Nls
@@ -1153,7 +1154,7 @@ public class IfStatementWithIdenticalBranchesInspection extends AbstractBaseJava
boolean highlightWhenLastStatementIsCall) {
ElseIf elseIf = from(ifStatement, thenBranch);
if (elseIf == null) return null;
String message = InspectionsBundle.message("inspection.common.if.parts.family.else.if.description");
String message = JavaAnalysisBundle.message("inspection.common.if.parts.family.else.if.description");
return new IfInspectionResult(ifStatement.getFirstChild(), false, new MergeElseIfsFix(), message);
}
}
@@ -15,8 +15,8 @@
*/
package com.siyeh.ig.controlflow;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.lang.jvm.JvmModifier;
import com.intellij.psi.*;
import com.intellij.psi.util.PsiTreeUtil;
@@ -39,7 +39,7 @@ public class InfiniteLoopStatementInspection extends BaseInspection {
@Nullable
@Override
public JComponent createOptionsPanel() {
return new SingleCheckboxOptionsPanel(InspectionsBundle.message("inspection.infinite.loop.option"), this, "myIgnoreInThreadTopLevel");
return new SingleCheckboxOptionsPanel(JavaAnalysisBundle.message("inspection.infinite.loop.option"), this, "myIgnoreInThreadTopLevel");
}
@Override
@@ -17,8 +17,8 @@ package com.siyeh.ig.inheritance;
import com.intellij.codeInsight.intention.IntentionAction;
import com.intellij.codeInsight.intention.QuickFixFactory;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.application.ReadAction;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.progress.ProgressIndicator;
@@ -75,7 +75,7 @@ class StaticInheritanceFix extends InspectionGadgetsFix {
final PsiFile file = implementingClass.getContainingFile();
ProgressManager.getInstance().run(new Task.Modal(project,
InspectionsBundle.message("static.inheritrance.fix.replace.progress", iface.getName()), false) {
JavaAnalysisBundle.message("static.inheritrance.fix.replace.progress", iface.getName()), false) {
@Override
public void run(@NotNull ProgressIndicator indicator) {
@@ -15,8 +15,8 @@
*/
package com.siyeh.ig.javabeans;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.psi.PsiClass;
import com.intellij.psi.PsiField;
import com.intellij.psi.PsiMethod;
@@ -50,7 +50,7 @@ public class SuspiciousGetterSetterInspection extends BaseInspection {
@Nullable
@Override
public JComponent createOptionsPanel() {
return new SingleCheckboxOptionsPanel(InspectionsBundle.message("inspection.suspicious.getter.setter.field.option"), this, "onlyWarnWhenFieldPresent");
return new SingleCheckboxOptionsPanel(JavaAnalysisBundle.message("inspection.suspicious.getter.setter.field.option"), this, "onlyWarnWhenFieldPresent");
}
@Override
@@ -2,8 +2,8 @@
package com.siyeh.ig.junit;
import com.intellij.codeInsight.AnnotationUtil;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ui.MultipleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.psi.PsiClass;
import com.intellij.psi.PsiField;
import com.intellij.psi.PsiModifier;
@@ -29,8 +29,8 @@ public class JUnitRuleInspection extends BaseInspection {
@Override
public JComponent createOptionsPanel() {
final MultipleCheckboxOptionsPanel panel = new MultipleCheckboxOptionsPanel(this);
panel.addCheckbox(InspectionsBundle.message("junit.rule.rule.option"), "REPORT_RULE_PROBLEMS");
panel.addCheckbox(InspectionsBundle.message("junit.rule.classrule.option"), "REPORT_CLASS_RULE_PROBLEMS");
panel.addCheckbox(JavaAnalysisBundle.message("junit.rule.rule.option"), "REPORT_RULE_PROBLEMS");
panel.addCheckbox(JavaAnalysisBundle.message("junit.rule.classrule.option"), "REPORT_CLASS_RULE_PROBLEMS");
return panel;
}
@@ -15,10 +15,10 @@
*/
package com.siyeh.ig.numeric;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.codeInspection.ProblemHighlightType;
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.WriteExternalException;
import com.intellij.psi.*;
@@ -51,7 +51,7 @@ public class UnaryPlusInspection extends BaseInspection {
@Nullable
@Override
public JComponent createOptionsPanel() {
return new SingleCheckboxOptionsPanel(InspectionsBundle.message("inspection.unary.plus.unary.binary.option"), this,
return new SingleCheckboxOptionsPanel(JavaAnalysisBundle.message("inspection.unary.plus.unary.binary.option"), this,
"onlyReportInsideBinaryExpression");
}
@@ -16,8 +16,8 @@
package com.siyeh.ig.style;
import com.intellij.codeInspection.CleanupLocalInspectionTool;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.profile.codeInspection.InspectionProjectProfileManager;
import com.intellij.psi.*;
import com.intellij.psi.tree.IElementType;
@@ -53,7 +53,7 @@ public class CStyleArrayDeclarationInspection extends BaseInspection implements
@Nullable
@Override
public JComponent createOptionsPanel() {
return new SingleCheckboxOptionsPanel(InspectionsBundle.message("inspection.c.style.array.declarations.option"), this, "ignoreVariables");
return new SingleCheckboxOptionsPanel(JavaAnalysisBundle.message("inspection.c.style.array.declarations.option"), this, "ignoreVariables");
}
@Override
@@ -1,8 +1,8 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.siyeh.ig.style;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.ComboBox;
import com.intellij.psi.PsiBinaryExpression;
@@ -49,7 +49,7 @@ public class ConstantOnWrongSideOfComparisonInspection extends BaseInspection {
myConstantShouldGoLeft = (e.getItem() == left);
}
});
final JLabel label = new JLabel(InspectionsBundle.message("inspection.constant.on.wrong.side.of.a.comparison.side.option"));
final JLabel label = new JLabel(JavaAnalysisBundle.message("inspection.constant.on.wrong.side.of.a.comparison.side.option"));
final JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEADING));
panel.add(label);
panel.add(comboBox);
@@ -4,6 +4,7 @@ package com.siyeh.ig.style;
import com.intellij.codeInsight.Nullability;
import com.intellij.codeInspection.*;
import com.intellij.codeInspection.dataFlow.NullabilityUtil;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.util.PsiTreeUtil;
@@ -52,7 +53,7 @@ public class ObjectsEqualsCanBeSimplifiedInspection extends AbstractBaseJavaLoca
return;
}
}
holder.registerProblem(nameElement, InspectionsBundle.message("inspection.can.be.replaced.with.message", "equals()"),
holder.registerProblem(nameElement, JavaAnalysisBundle.message("inspection.can.be.replaced.with.message", "equals()"),
new ReplaceWithEqualsFix(false));
}
}
@@ -61,7 +62,7 @@ public class ObjectsEqualsCanBeSimplifiedInspection extends AbstractBaseJavaLoca
PsiType type1 = arg1.getType();
PsiType type2 = arg2.getType();
if (type1 instanceof PsiPrimitiveType && type1.equals(type2) && !TypeConversionUtil.isFloatOrDoubleType(type1)) {
holder.registerProblem(nameElement, InspectionsBundle.message("inspection.can.be.replaced.with.message", "=="),
holder.registerProblem(nameElement, JavaAnalysisBundle.message("inspection.can.be.replaced.with.message", "=="),
new ReplaceWithEqualsFix(true));
return true;
}
@@ -16,10 +16,10 @@
package com.siyeh.ig.style;
import com.intellij.codeInspection.CleanupLocalInspectionTool;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.codeInspection.ProblemHighlightType;
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.util.PsiTreeUtil;
@@ -49,7 +49,7 @@ public class RedundantFieldInitializationInspection extends BaseInspection imple
@Nullable
@Override
public JComponent createOptionsPanel() {
return new SingleCheckboxOptionsPanel(InspectionsBundle.message("inspection.redundant.field.initialization.option"), this, "onlyWarnOnNull");
return new SingleCheckboxOptionsPanel(JavaAnalysisBundle.message("inspection.redundant.field.initialization.option"), this, "onlyWarnOnNull");
}
@Override
@@ -16,10 +16,10 @@
package com.siyeh.ig.style;
import com.intellij.codeInspection.CleanupLocalInspectionTool;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.codeInspection.ProblemHighlightType;
import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.util.PsiTreeUtil;
@@ -48,7 +48,7 @@ public class UnnecessarySuperQualifierInspection extends BaseInspection implemen
@Nullable
@Override
public JComponent createOptionsPanel() {
return new SingleCheckboxOptionsPanel(InspectionsBundle.message("inspection.unnecessary.super.qualifier.option"), this, "ignoreClarification");
return new SingleCheckboxOptionsPanel(JavaAnalysisBundle.message("inspection.unnecessary.super.qualifier.option"), this, "ignoreClarification");
}
@Override
@@ -1,6 +1,7 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.codeInspection;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.codeStyle.CodeStyleManager;
@@ -119,7 +120,7 @@ public class LambdaCanBeMethodCallInspection extends AbstractBaseJavaLocalInspec
}
private void registerProblem(PsiLambdaExpression lambda, String displayReplacement, String replacement) {
holder.registerProblem(lambda, InspectionsBundle.message("inspection.can.be.replaced.with.message", displayReplacement),
holder.registerProblem(lambda, JavaAnalysisBundle.message("inspection.can.be.replaced.with.message", displayReplacement),
new ReplaceWithFunctionCallFix(replacement, displayReplacement));
}
};
@@ -5,7 +5,7 @@ package org.jetbrains.plugins.groovy.codeInspection;
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer;
import com.intellij.codeInsight.daemon.impl.actions.AbstractBatchSuppressByNoInspectionCommentFix;
import com.intellij.codeInspection.BatchSuppressManager;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.java.analysis.JavaAnalysisBundle;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.util.PsiTreeUtil;
@@ -28,7 +28,7 @@ import org.jetbrains.plugins.groovy.lang.psi.api.types.GrTypeParameter;
* @author peter
*/
public class SuppressForMemberFix extends AbstractBatchSuppressByNoInspectionCommentFix {
private @PropertyKey(resourceBundle = "messages.InspectionsBundle") String myKey;
private @PropertyKey(resourceBundle = "messages.JavaAnalysisBundle") String myKey = "suppress.inspection.member";
private final boolean myForClass;
public SuppressForMemberFix(String toolId, boolean forClass) {
@@ -72,7 +72,7 @@ public class SuppressForMemberFix extends AbstractBatchSuppressByNoInspectionCom
@Override
@NotNull
public String getText() {
return myKey != null ? InspectionsBundle.message(myKey) : "Suppress for member";
return JavaAnalysisBundle.message(myKey);
}