mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 13:02:30 +07:00
[inspections] Rename OptSet -> OptStringList; stringSet -> stringList
This reflects that we usually preserve ordering and in fact map to the List<String> GitOrigin-RevId: f44eb3efae5db372dfb1747d86b728a23ec5745b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
35c501455e
commit
56013717c5
@@ -270,8 +270,8 @@ public class EmptyMethodInspection extends GlobalJavaBatchInspectionTool {
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
checkbox("commentsAreContent", JavaBundle.message("checkbox.comments.and.javadoc.count.as.content")),
|
||||
stringSet("EXCLUDE_ANNOS", JavaBundle.message("special.annotations.annotations.list"),
|
||||
new JavaClassValidator().annotationsOnly()));
|
||||
stringList("EXCLUDE_ANNOS", JavaBundle.message("special.annotations.annotations.list"),
|
||||
new JavaClassValidator().annotationsOnly()));
|
||||
}
|
||||
|
||||
private static class DeleteMethodIntention implements LocalQuickFix {
|
||||
|
||||
@@ -51,8 +51,8 @@ public class JavaReflectionMemberAccessInspection extends AbstractBaseJavaLocalI
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("ignoredClassNames", JavaBundle.message("inspection.reflection.member.access.check.exists.exclude.label"),
|
||||
new JavaClassValidator().withTitle(JavaBundle.message("inspection.reflection.member.access.check.exists.exclude.chooser"))),
|
||||
stringList("ignoredClassNames", JavaBundle.message("inspection.reflection.member.access.check.exists.exclude.label"),
|
||||
new JavaClassValidator().withTitle(JavaBundle.message("inspection.reflection.member.access.check.exists.exclude.chooser"))),
|
||||
checkbox("checkMemberExistsInNonFinalClasses", JavaBundle.message("inspection.reflection.member.access.check.exists"))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -111,8 +111,8 @@ public class FieldCanBeLocalInspection extends AbstractBaseJavaLocalInspectionTo
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("EXCLUDE_ANNOS", JavaBundle.message("special.annotations.annotations.list"),
|
||||
new JavaClassValidator().annotationsOnly()),
|
||||
stringList("EXCLUDE_ANNOS", JavaBundle.message("special.annotations.annotations.list"),
|
||||
new JavaClassValidator().annotationsOnly()),
|
||||
checkbox("IGNORE_FIELDS_USED_IN_MULTIPLE_METHODS", JavaBundle.message("checkbox.ignore.fields.used.in.multiple.methods"))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ import org.jetbrains.lang.manifest.psi.Header;
|
||||
import java.util.*;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
|
||||
/**
|
||||
* @author Robert F. Beeger (robert@beeger.net)
|
||||
@@ -110,7 +109,7 @@ public final class MisspelledHeaderInspection extends LocalInspectionTool {
|
||||
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(stringSet("CUSTOM_HEADERS", ManifestBundle.message("inspection.header.ui.label")));
|
||||
return pane(OptPane.stringList("CUSTOM_HEADERS", ManifestBundle.message("inspection.header.ui.label")));
|
||||
}
|
||||
|
||||
private static final class HeaderRenameQuickFix extends AbstractManifestQuickFix {
|
||||
|
||||
@@ -34,8 +34,8 @@ abstract class USerializableInspectionBase(vararg hint: Class<out UElement>) : A
|
||||
}
|
||||
|
||||
override fun getOptionsPane(): OptPane = pane(
|
||||
stringSet("superClassList", InspectionGadgetsBundle.message("ignore.classes.in.hierarchy.column.name"),
|
||||
JavaClassValidator().withTitle(InspectionGadgetsBundle.message("choose.class"))),
|
||||
stringList("superClassList", InspectionGadgetsBundle.message("ignore.classes.in.hierarchy.column.name"),
|
||||
JavaClassValidator().withTitle(InspectionGadgetsBundle.message("choose.class"))),
|
||||
checkbox("ignoreAnonymousInnerClasses", InspectionGadgetsBundle.message("ignore.anonymous.inner.classes"))
|
||||
)
|
||||
|
||||
|
||||
@@ -63,8 +63,8 @@ class UnstableApiUsageInspection : LocalInspectionTool() {
|
||||
checkbox("myIgnoreInsideImports", JvmAnalysisBundle.message("jvm.inspections.unstable.api.usage.ignore.inside.imports")),
|
||||
checkbox("myIgnoreApiDeclaredInThisProject", JvmAnalysisBundle.message("jvm.inspections.unstable.api.usage.ignore.declared.inside.this.project")),
|
||||
//TODO in add annotation window "Include non-project items" should be enabled by default
|
||||
stringSet("unstableApiAnnotations", JvmAnalysisBundle.message("jvm.inspections.unstable.api.usage.annotations.list"),
|
||||
JavaClassValidator().annotationsOnly())
|
||||
stringList("unstableApiAnnotations", JvmAnalysisBundle.message("jvm.inspections.unstable.api.usage.annotations.list"),
|
||||
JavaClassValidator().annotationsOnly())
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.intellij.codeInsight.options.JavaClassValidator
|
||||
import com.intellij.codeInspection.AnnotatedApiUsageUtil.findAnnotatedTypeUsedInDeclarationSignature
|
||||
import com.intellij.codeInspection.options.OptPane
|
||||
import com.intellij.codeInspection.options.OptPane.pane
|
||||
import com.intellij.codeInspection.options.OptPane.stringSet
|
||||
import com.intellij.codeInspection.options.OptPane.stringList
|
||||
import com.intellij.psi.JavaPsiFacade
|
||||
import com.intellij.psi.PsiClass
|
||||
import com.intellij.psi.PsiElementVisitor
|
||||
@@ -39,8 +39,8 @@ class UnstableTypeUsedInSignatureInspection : LocalInspectionTool() {
|
||||
}
|
||||
|
||||
override fun getOptionsPane(): OptPane = pane(
|
||||
stringSet("unstableApiAnnotations", JvmAnalysisBundle.message("jvm.inspections.unstable.api.usage.annotations.list"),
|
||||
JavaClassValidator().annotationsOnly())
|
||||
stringList("unstableApiAnnotations", JvmAnalysisBundle.message("jvm.inspections.unstable.api.usage.annotations.list"),
|
||||
JavaClassValidator().annotationsOnly())
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -53,12 +53,12 @@ public final class BlockingMethodInNonBlockingContextInspection extends Abstract
|
||||
return pane(
|
||||
checkbox("myConsiderUnknownContextBlocking",
|
||||
JvmAnalysisBundle.message("jvm.inspections.blocking.method.consider.unknown.context.blocking")),
|
||||
stringSet("myBlockingAnnotations", JvmAnalysisBundle.message("jvm.inspections.blocking.method.annotation.blocking"),
|
||||
new JavaClassValidator().withTitle(
|
||||
stringList("myBlockingAnnotations", JvmAnalysisBundle.message("jvm.inspections.blocking.method.annotation.blocking"),
|
||||
new JavaClassValidator().withTitle(
|
||||
JvmAnalysisBundle.message("jvm.inspections.blocking.method.annotation.configure.add.blocking.title"))
|
||||
.annotationsOnly()),
|
||||
stringSet("myNonBlockingAnnotations", JvmAnalysisBundle.message("jvm.inspections.blocking.method.annotation.non-blocking"),
|
||||
new JavaClassValidator().withTitle(
|
||||
stringList("myNonBlockingAnnotations", JvmAnalysisBundle.message("jvm.inspections.blocking.method.annotation.non-blocking"),
|
||||
new JavaClassValidator().withTitle(
|
||||
JvmAnalysisBundle.message("jvm.inspections.blocking.method.annotation.configure.add.non-blocking.title"))
|
||||
.annotationsOnly())
|
||||
);
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.intellij.codeInspection.*
|
||||
import com.intellij.codeInspection.fix.CompositeIntentionQuickFix
|
||||
import com.intellij.codeInspection.options.OptPane
|
||||
import com.intellij.codeInspection.options.OptPane.pane
|
||||
import com.intellij.codeInspection.options.OptPane.stringSet
|
||||
import com.intellij.codeInspection.options.OptPane.stringList
|
||||
import com.intellij.codeInspection.test.junit.references.MethodSourceReference
|
||||
import com.intellij.codeInspection.util.InspectionMessage
|
||||
import com.intellij.lang.Language
|
||||
@@ -48,9 +48,9 @@ class JUnitMalformedDeclarationInspection : AbstractBaseUastLocalInspectionTool(
|
||||
val ignorableAnnotations = mutableListOf("mockit.Mocked", "org.junit.jupiter.api.io.TempDir")
|
||||
|
||||
override fun getOptionsPane(): OptPane = pane(
|
||||
stringSet("ignorableAnnotations",
|
||||
JvmAnalysisBundle.message("jvm.inspections.junit.malformed.option.ignore.test.parameter.if.annotated.by"),
|
||||
JavaClassValidator().annotationsOnly()))
|
||||
stringList("ignorableAnnotations",
|
||||
JvmAnalysisBundle.message("jvm.inspections.junit.malformed.option.ignore.test.parameter.if.annotated.by"),
|
||||
JavaClassValidator().annotationsOnly()))
|
||||
|
||||
private fun shouldInspect(file: PsiFile) = isJUnit3InScope(file) || isJUnit4InScope(file) || isJUnit5InScope(file)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* Basic interface for all the controls
|
||||
*/
|
||||
public sealed interface OptControl extends OptRegularComponent permits OptCheckbox, OptDropdown, OptNumber, OptSet, OptString {
|
||||
public sealed interface OptControl extends OptRegularComponent permits OptCheckbox, OptDropdown, OptNumber, OptStringList, OptString {
|
||||
/**
|
||||
* @return identifier of control, and at the same time the name of the binding variable used by inspection
|
||||
* acceptable by {@link InspectionProfileEntry#getOptionController()}
|
||||
|
||||
@@ -304,8 +304,8 @@ public record OptPane(@NotNull List<@NotNull OptRegularComponent> components) {
|
||||
* @return editable sorted list of unique strings
|
||||
*/
|
||||
@Contract(pure = true)
|
||||
public static @NotNull OptSet stringSet(@Language("jvm-field-name") @NotNull String bindId, @NotNull @NlsContexts.Label String label) {
|
||||
return new OptSet(bindId, new PlainMessage(label), null);
|
||||
public static @NotNull OptStringList stringList(@Language("jvm-field-name") @NotNull String bindId, @NotNull @NlsContexts.Label String label) {
|
||||
return new OptStringList(bindId, new PlainMessage(label), null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -316,9 +316,9 @@ public record OptPane(@NotNull List<@NotNull OptRegularComponent> components) {
|
||||
* @return editable sorted list of unique strings
|
||||
*/
|
||||
@Contract(pure = true)
|
||||
public static @NotNull OptSet stringSet(@Language("jvm-field-name") @NotNull String bindId, @NotNull @NlsContexts.Label String label,
|
||||
@NotNull StringValidator validator) {
|
||||
return new OptSet(bindId, new PlainMessage(label), validator);
|
||||
public static @NotNull OptStringList stringList(@Language("jvm-field-name") @NotNull String bindId, @NotNull @NlsContexts.Label String label,
|
||||
@NotNull StringValidator validator) {
|
||||
return new OptStringList(bindId, new PlainMessage(label), validator);
|
||||
}
|
||||
|
||||
/* Layout elements */
|
||||
|
||||
@@ -13,10 +13,10 @@ import org.jetbrains.annotations.Nullable;
|
||||
* @param validator optional validator for content; can validate max-length or be something more complicated
|
||||
* (e.g., validate that a string is a class-name which is a subclass of specific class)
|
||||
*/
|
||||
public record OptSet(@Language("jvm-field-name") @NotNull String bindId,
|
||||
@NotNull LocMessage label, @Nullable StringValidator validator) implements OptControl {
|
||||
public record OptStringList(@Language("jvm-field-name") @NotNull String bindId,
|
||||
@NotNull LocMessage label, @Nullable StringValidator validator) implements OptControl {
|
||||
@Override
|
||||
public @NotNull OptSet prefix(@NotNull String bindPrefix) {
|
||||
return new OptSet(bindPrefix + "." + bindId, label, validator);
|
||||
public @NotNull OptStringList prefix(@NotNull String bindPrefix) {
|
||||
return new OptStringList(bindPrefix + "." + bindId, label, validator);
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,7 @@ public interface OptionController {
|
||||
|
||||
/**
|
||||
* @param bindId bindId of the option value to process especially; setting of this option is not supported
|
||||
* (can be used e.g. with {@link OptSet} control where setter is unnecessary)
|
||||
* (can be used e.g. with {@link OptStringList} control where setter is unnecessary)
|
||||
* @param getter getter for an option with a given bindId
|
||||
* @return a new controller that processes the specified bindId with a specified getter,
|
||||
* and delegates to this controller for any other bindId.
|
||||
|
||||
@@ -249,7 +249,7 @@ class UiDslOptPaneRenderer : InspectionOptionPaneRenderer {
|
||||
cell(label)
|
||||
}
|
||||
|
||||
is OptSet -> {
|
||||
is OptStringList -> {
|
||||
@Suppress("UNCHECKED_CAST") val list = tool.getOption(component.bindId) as MutableList<String>
|
||||
val listWithListener = ListWithListener(list) { tool.setOption(component.bindId, list) }
|
||||
val validator = component.validator
|
||||
@@ -316,7 +316,7 @@ class UiDslOptPaneRenderer : InspectionOptionPaneRenderer {
|
||||
get() = this is OptGroup
|
||||
|
||||
private val OptComponent.hasResizableRow: Boolean
|
||||
get() = this is OptSet
|
||||
get() = this is OptStringList
|
||||
|
||||
private fun convertItem(key: String, type: Class<*>): Any {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
|
||||
@@ -46,8 +46,8 @@ public class PublicMethodNotExposedInInterfaceInspection extends BaseInspection
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("ignorableAnnotations", InspectionGadgetsBundle.message("ignore.if.annotated.by"),
|
||||
new JavaClassValidator().annotationsOnly()),
|
||||
stringList("ignorableAnnotations", InspectionGadgetsBundle.message("ignore.if.annotated.by"),
|
||||
new JavaClassValidator().annotationsOnly()),
|
||||
checkbox("onlyWarnIfContainingClassImplementsAnInterface",
|
||||
InspectionGadgetsBundle.message("public.method.not.in.interface.option"))
|
||||
);
|
||||
|
||||
@@ -279,8 +279,8 @@ public class TypeMayBeWeakenedInspection extends BaseInspection {
|
||||
checkbox("doNotWeakenReturnType", InspectionGadgetsBundle.message("inspection.type.may.be.weakened.do.not.weaken.return.type")),
|
||||
checkbox("doNotWeakenInferredVariableType",
|
||||
InspectionGadgetsBundle.message("inspection.type.may.be.weakened.do.not.weaken.inferred.variable.type")),
|
||||
stringSet("myStopClassSet", InspectionGadgetsBundle.message("inspection.type.may.be.weakened.add.stop.class.selection.table.label"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("inspection.type.may.be.weakened.add.stop.class.selection.table"))));
|
||||
stringList("myStopClassSet", InspectionGadgetsBundle.message("inspection.type.may.be.weakened.add.stop.class.selection.table.label"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("inspection.type.may.be.weakened.add.stop.class.selection.table"))));
|
||||
}
|
||||
|
||||
private static class TypeMayBeWeakenedFix extends InspectionGadgetsFix {
|
||||
|
||||
@@ -89,11 +89,11 @@ public class MismatchedCollectionQueryUpdateInspection extends BaseInspection {
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
horizontalStack(
|
||||
stringSet("queryNames", InspectionGadgetsBundle.message("query.label")),
|
||||
stringSet("updateNames", InspectionGadgetsBundle.message("update.label"))
|
||||
stringList("queryNames", InspectionGadgetsBundle.message("query.label")),
|
||||
stringList("updateNames", InspectionGadgetsBundle.message("update.label"))
|
||||
),
|
||||
stringSet("ignoredClasses", InspectionGadgetsBundle.message("ignored.class.label"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("ignored.class.names"))
|
||||
stringList("ignoredClasses", InspectionGadgetsBundle.message("ignored.class.label"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("ignored.class.names"))
|
||||
.withSuperClass(CommonClassNames.JAVA_UTIL_COLLECTION, CommonClassNames.JAVA_UTIL_MAP))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringList;
|
||||
|
||||
/**
|
||||
* @author Bas Leijdekkers
|
||||
@@ -33,8 +33,8 @@ public class ResultOfObjectAllocationIgnoredInspection extends BaseInspection {
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("ignoredClasses", InspectionGadgetsBundle.message("options.label.ignored.classes"),
|
||||
new JavaClassValidator().withTitle(
|
||||
stringList("ignoredClasses", InspectionGadgetsBundle.message("options.label.ignored.classes"),
|
||||
new JavaClassValidator().withTitle(
|
||||
InspectionGadgetsBundle.message("result.of.object.allocation.ignored.options.chooserTitle"))));
|
||||
}
|
||||
|
||||
|
||||
@@ -52,8 +52,8 @@ public class EmptyClassInspection extends BaseInspection {
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("ignorableAnnotations", InspectionGadgetsBundle.message("ignore.if.annotated.by"),
|
||||
new JavaClassValidator().annotationsOnly()),
|
||||
stringList("ignorableAnnotations", InspectionGadgetsBundle.message("ignore.if.annotated.by"),
|
||||
new JavaClassValidator().annotationsOnly()),
|
||||
checkbox("ignoreClassWithParameterization", InspectionGadgetsBundle.message("empty.class.ignore.parameterization.option")),
|
||||
checkbox("ignoreThrowables",
|
||||
InspectionGadgetsBundle.message("inspection.empty.class.ignore.subclasses.option", CommonClassNames.JAVA_LANG_THROWABLE)),
|
||||
|
||||
@@ -30,7 +30,7 @@ import com.siyeh.ig.ui.ExternalizableStringSet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringList;
|
||||
|
||||
public class UtilityClassInspection extends BaseInspection {
|
||||
|
||||
@@ -40,8 +40,8 @@ public class UtilityClassInspection extends BaseInspection {
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("ignorableAnnotations", InspectionGadgetsBundle.message("ignore.if.annotated.by"),
|
||||
new JavaClassValidator().annotationsOnly()));
|
||||
stringList("ignorableAnnotations", InspectionGadgetsBundle.message("ignore.if.annotated.by"),
|
||||
new JavaClassValidator().annotationsOnly()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -56,8 +56,8 @@ public class UtilityClassWithoutPrivateConstructorInspection extends BaseInspect
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("ignorableAnnotations", InspectionGadgetsBundle.message("ignore.if.annotated.by"),
|
||||
new JavaClassValidator().annotationsOnly()),
|
||||
stringList("ignorableAnnotations", InspectionGadgetsBundle.message("ignore.if.annotated.by"),
|
||||
new JavaClassValidator().annotationsOnly()),
|
||||
checkbox("ignoreClassesWithOnlyMain", InspectionGadgetsBundle.message("utility.class.without.private.constructor.option"))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ import org.jetbrains.uast.*;
|
||||
import java.util.*;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
|
||||
public final class SuspiciousPackagePrivateAccessInspection extends AbstractBaseUastLocalInspectionTool {
|
||||
private static final Key<SuspiciousPackagePrivateAccessInspection> INSPECTION_KEY = Key.create("SuspiciousPackagePrivateAccess");
|
||||
@@ -260,7 +259,7 @@ public final class SuspiciousPackagePrivateAccessInspection extends AbstractBase
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("MODULES_SETS_LOADED_TOGETHER", InspectionGadgetsBundle.message("groups.of.modules.loaded.together.label"))
|
||||
OptPane.stringList("MODULES_SETS_LOADED_TOGETHER", InspectionGadgetsBundle.message("groups.of.modules.loaded.together.label"))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -45,8 +45,8 @@ public class PublicFieldInspection extends BaseInspection {
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("ignorableAnnotations", InspectionGadgetsBundle.message("ignore.if.annotated.by"),
|
||||
new JavaClassValidator().annotationsOnly()),
|
||||
stringList("ignorableAnnotations", InspectionGadgetsBundle.message("ignore.if.annotated.by"),
|
||||
new JavaClassValidator().annotationsOnly()),
|
||||
checkbox("ignoreEnums", InspectionGadgetsBundle.message("public.field.ignore.enum.type.fields.option"))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringList;
|
||||
|
||||
public class BadExceptionCaughtInspection extends BaseInspection {
|
||||
|
||||
@@ -65,8 +65,8 @@ public class BadExceptionCaughtInspection extends BaseInspection {
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("exceptions", InspectionGadgetsBundle.message("choose.exception.label"),
|
||||
new JavaClassValidator().withSuperClass(CommonClassNames.JAVA_LANG_THROWABLE)
|
||||
stringList("exceptions", InspectionGadgetsBundle.message("choose.exception.label"),
|
||||
new JavaClassValidator().withSuperClass(CommonClassNames.JAVA_LANG_THROWABLE)
|
||||
.withTitle(InspectionGadgetsBundle.message("choose.exception.class"))));
|
||||
}
|
||||
|
||||
|
||||
@@ -72,8 +72,8 @@ public class BadExceptionDeclaredInspection extends BaseInspection {
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("exceptions", InspectionGadgetsBundle.message("choose.exception.label"),
|
||||
new JavaClassValidator().withSuperClass(CommonClassNames.JAVA_LANG_THROWABLE)
|
||||
stringList("exceptions", InspectionGadgetsBundle.message("choose.exception.label"),
|
||||
new JavaClassValidator().withSuperClass(CommonClassNames.JAVA_LANG_THROWABLE)
|
||||
.withTitle(InspectionGadgetsBundle.message("choose.exception.class"))),
|
||||
checkbox("ignoreLibraryOverrides", InspectionGadgetsBundle.message("ignore.exceptions.declared.on.library.override.option")));
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringList;
|
||||
|
||||
public class BadExceptionThrownInspection extends BaseInspection {
|
||||
@SuppressWarnings("PublicField")
|
||||
@@ -62,8 +62,8 @@ public class BadExceptionThrownInspection extends BaseInspection {
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("exceptions", InspectionGadgetsBundle.message("choose.exception.label"),
|
||||
new JavaClassValidator().withSuperClass(CommonClassNames.JAVA_LANG_THROWABLE)
|
||||
stringList("exceptions", InspectionGadgetsBundle.message("choose.exception.label"),
|
||||
new JavaClassValidator().withSuperClass(CommonClassNames.JAVA_LANG_THROWABLE)
|
||||
.withTitle(InspectionGadgetsBundle.message("choose.exception.class"))));
|
||||
}
|
||||
|
||||
|
||||
@@ -70,8 +70,8 @@ public class StaticImportInspection extends BaseInspection {
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("allowedClasses", InspectionGadgetsBundle.message("static.import.options.border.title"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("static.import.options.chooserTitle"))),
|
||||
stringList("allowedClasses", InspectionGadgetsBundle.message("static.import.options.border.title"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("static.import.options.chooserTitle"))),
|
||||
checkbox("ignoreSingleFieldImports", InspectionGadgetsBundle.message("ignore.single.field.static.imports.option")),
|
||||
checkbox("ignoreSingeMethodImports", InspectionGadgetsBundle.message("ignore.single.method.static.imports.option"))
|
||||
);
|
||||
|
||||
@@ -54,8 +54,8 @@ public class InterfaceNeverImplementedInspection extends BaseInspection {
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("ignorableAnnotations", InspectionGadgetsBundle.message("ignore.if.annotated.by"),
|
||||
new JavaClassValidator().annotationsOnly()),
|
||||
stringList("ignorableAnnotations", InspectionGadgetsBundle.message("ignore.if.annotated.by"),
|
||||
new JavaClassValidator().annotationsOnly()),
|
||||
checkbox("ignoreInterfacesThatOnlyDeclareConstants", InspectionGadgetsBundle.message("interface.never.implemented.option"))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class RefusedBequestInspection extends BaseInspection {
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
checkbox("onlyReportWhenAnnotated", InspectionGadgetsBundle.message("inspection.refused.bequest.super.annotated.option"),
|
||||
stringSet("annotations", "", new JavaClassValidator().annotationsOnly())),
|
||||
stringList("annotations", "", new JavaClassValidator().annotationsOnly())),
|
||||
checkbox("ignoreEmptySuperMethods", InspectionGadgetsBundle.message("refused.bequest.ignore.empty.super.methods.option")),
|
||||
checkbox("ignoreDefaultSuperMethods", InspectionGadgetsBundle.message("refused.bequest.ignore.default.super.methods.option"))
|
||||
);
|
||||
|
||||
@@ -59,8 +59,8 @@ public class InstanceVariableUninitializedUseInspection extends BaseInspection {
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("annotationNames", InspectionGadgetsBundle.message("ignore.if.annotated.by"),
|
||||
new JavaClassValidator().annotationsOnly()),
|
||||
stringList("annotationNames", InspectionGadgetsBundle.message("ignore.if.annotated.by"),
|
||||
new JavaClassValidator().annotationsOnly()),
|
||||
checkbox("m_ignorePrimitives", InspectionGadgetsBundle.message("primitive.fields.ignore.option")));
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringList;
|
||||
|
||||
public class ClassWithMultipleLoggersInspection extends BaseInspection {
|
||||
|
||||
@@ -54,8 +54,8 @@ public class ClassWithMultipleLoggersInspection extends BaseInspection {
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("loggerNames", InspectionGadgetsBundle.message("logger.class.name"),
|
||||
new JavaClassValidator()
|
||||
stringList("loggerNames", InspectionGadgetsBundle.message("logger.class.name"),
|
||||
new JavaClassValidator()
|
||||
.withTitle(InspectionGadgetsBundle.message("choose.logger.class")))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -64,15 +64,15 @@ public class ClassWithoutLoggerInspection extends BaseInspection {
|
||||
return pane(
|
||||
tabs(
|
||||
tab(InspectionGadgetsBundle.message("class.without.logger.loggers.tab"),
|
||||
stringSet("loggerNames", InspectionGadgetsBundle.message("logger.class.name"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("choose.logger.class")))),
|
||||
stringList("loggerNames", InspectionGadgetsBundle.message("logger.class.name"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("choose.logger.class")))),
|
||||
tab(InspectionGadgetsBundle.message("options.title.ignored.classes"),
|
||||
stringSet("ignoredClasses", InspectionGadgetsBundle.message("ignored.class.hierarchies.border.title"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("choose.class.hierarchy.to.ignore.title"))),
|
||||
stringList("ignoredClasses", InspectionGadgetsBundle.message("ignored.class.hierarchies.border.title"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("choose.class.hierarchy.to.ignore.title"))),
|
||||
checkbox("ignoreSuperLoggers", InspectionGadgetsBundle.message("super.class.logger.option"))),
|
||||
tab(InspectionGadgetsBundle.message("class.without.logger.annotations.tab"),
|
||||
stringSet("annotations", InspectionGadgetsBundle.message("ignore.classes.annotated.by"),
|
||||
new JavaClassValidator().annotationsOnly()))
|
||||
stringList("annotations", InspectionGadgetsBundle.message("ignore.classes.annotated.by"),
|
||||
new JavaClassValidator().annotationsOnly()))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringList;
|
||||
|
||||
public class NonStaticFinalLoggerInspection extends BaseInspection {
|
||||
|
||||
@@ -49,8 +49,8 @@ public class NonStaticFinalLoggerInspection extends BaseInspection {
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("loggerClassNames", InspectionGadgetsBundle.message("logger.class.name"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("choose.logger.class"))));
|
||||
stringList("loggerClassNames", InspectionGadgetsBundle.message("logger.class.name"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("choose.logger.class"))));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -33,7 +33,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringList;
|
||||
|
||||
public class PublicMethodWithoutLoggingInspection extends BaseInspection {
|
||||
|
||||
@@ -48,8 +48,8 @@ public class PublicMethodWithoutLoggingInspection extends BaseInspection {
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("loggerClassNames", InspectionGadgetsBundle.message("logger.class.name"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("choose.logger.class"))));
|
||||
stringList("loggerClassNames", InspectionGadgetsBundle.message("logger.class.name"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("choose.logger.class"))));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -39,14 +39,13 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
|
||||
public class SuppressionAnnotationInspection extends BaseInspection {
|
||||
public List<String> myAllowedSuppressions = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(stringSet("myAllowedSuppressions", JavaBundle.message("ignored.suppressions")));
|
||||
return pane(OptPane.stringList("myAllowedSuppressions", JavaBundle.message("ignored.suppressions")));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -50,7 +50,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringList;
|
||||
|
||||
public class InnerClassMayBeStaticInspection extends BaseInspection {
|
||||
|
||||
@@ -67,8 +67,8 @@ public class InnerClassMayBeStaticInspection extends BaseInspection {
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("ignorableAnnotations", InspectionGadgetsBundle.message("ignore.if.annotated.by"),
|
||||
new JavaClassValidator().annotationsOnly()));
|
||||
stringList("ignorableAnnotations", InspectionGadgetsBundle.message("ignore.if.annotated.by"),
|
||||
new JavaClassValidator().annotationsOnly()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -58,7 +58,7 @@ public class NonBooleanMethodNameMayNotStartWithQuestionInspection extends BaseI
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("questionList", InspectionGadgetsBundle.message("boolean.method.name.must.start.with.question.table.label")),
|
||||
stringList("questionList", InspectionGadgetsBundle.message("boolean.method.name.must.start.with.question.table.label")),
|
||||
checkbox("ignoreBooleanMethods", InspectionGadgetsBundle.message("ignore.methods.with.boolean.return.type.option")),
|
||||
checkbox("onlyWarnOnBaseMethods", InspectionGadgetsBundle.message("ignore.methods.overriding.super.method"))
|
||||
);
|
||||
|
||||
@@ -36,7 +36,6 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
|
||||
public class QuestionableNameInspection extends BaseInspection {
|
||||
|
||||
@@ -56,7 +55,7 @@ public class QuestionableNameInspection extends BaseInspection {
|
||||
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(stringSet("nameList", InspectionGadgetsBundle.message("questionable.name.list.label")));
|
||||
return pane(OptPane.stringList("nameList", InspectionGadgetsBundle.message("questionable.name.list.label")));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.*;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringList;
|
||||
|
||||
/**
|
||||
* @author Dmitry Batkovich
|
||||
@@ -85,9 +85,9 @@ public abstract class CollectionsListSettings {
|
||||
}
|
||||
|
||||
public @NotNull OptPane getOptionPane() {
|
||||
return pane(stringSet("myCollectionClassesRequiringCapacity",
|
||||
QuickFixBundle.message("collection.addall.can.be.replaced.with.constructor.fix.options.label"),
|
||||
new JavaClassValidator().withTitle(
|
||||
return pane(stringList("myCollectionClassesRequiringCapacity",
|
||||
QuickFixBundle.message("collection.addall.can.be.replaced.with.constructor.fix.options.label"),
|
||||
new JavaClassValidator().withTitle(
|
||||
QuickFixBundle.message("collection.addall.can.be.replaced.with.constructor.fix.options.dialog.title"))));
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringList;
|
||||
|
||||
public class IOResourceInspection extends ResourceInspection {
|
||||
final List<String> ignoredTypes = new ArrayList<>();
|
||||
@@ -48,8 +48,8 @@ public class IOResourceInspection extends ResourceInspection {
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return super.getOptionsPane()
|
||||
.prepend(stringSet("ignoredTypes", InspectionGadgetsBundle.message("ignored.io.resource.types.label"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("choose.io.resource.type.to.ignore"))
|
||||
.prepend(stringList("ignoredTypes", InspectionGadgetsBundle.message("ignored.io.resource.types.label"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("choose.io.resource.type.to.ignore"))
|
||||
.withSuperClass("java.io.Closeable")));
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringList;
|
||||
|
||||
public class NonSerializableFieldInSerializableClassInspection extends SerializableInspectionBase {
|
||||
@SuppressWarnings({"PublicField"})
|
||||
@@ -38,8 +38,8 @@ public class NonSerializableFieldInSerializableClassInspection extends Serializa
|
||||
|
||||
@Override
|
||||
protected @NotNull OptPane getAdditionalOptions() {
|
||||
return pane(stringSet("ignorableAnnotations", InspectionGadgetsBundle.message("ignore.if.annotated.by"),
|
||||
new JavaClassValidator().annotationsOnly()));
|
||||
return pane(stringList("ignorableAnnotations", InspectionGadgetsBundle.message("ignore.if.annotated.by"),
|
||||
new JavaClassValidator().annotationsOnly()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,8 +46,8 @@ public abstract class SerializableInspectionBase extends BaseInspection {
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
List<OptRegularComponent> components = new ArrayList<>();
|
||||
components.add(OptPane.stringSet("superClassList", InspectionGadgetsBundle.message("ignore.classes.in.hierarchy.column.name"),
|
||||
new JavaClassValidator()));
|
||||
components.add(OptPane.stringList("superClassList", InspectionGadgetsBundle.message("ignore.classes.in.hierarchy.column.name"),
|
||||
new JavaClassValidator()));
|
||||
components.addAll(getAdditionalOptions().components());
|
||||
components.add(OptPane.checkbox("ignoreAnonymousInnerClasses", InspectionGadgetsBundle.message("ignore.anonymous.inner.classes")));
|
||||
return new OptPane(components);
|
||||
|
||||
@@ -45,8 +45,8 @@ public class SizeReplaceableByIsEmptyInspection extends BaseInspection {
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("ignoredTypes", InspectionGadgetsBundle.message("options.label.ignored.classes"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("choose.class.type.to.ignore"))),
|
||||
stringList("ignoredTypes", InspectionGadgetsBundle.message("options.label.ignored.classes"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("choose.class.type.to.ignore"))),
|
||||
checkbox("ignoreNegations", InspectionGadgetsBundle.message("size.replaceable.by.isempty.negation.ignore.option"))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringList;
|
||||
|
||||
public class AccessToNonThreadSafeStaticFieldFromInstanceInspection extends BaseInspection {
|
||||
|
||||
@@ -40,8 +40,8 @@ public class AccessToNonThreadSafeStaticFieldFromInstanceInspection extends Base
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
stringSet("nonThreadSafeClasses", InspectionGadgetsBundle.message("access.to.non.thread.safe.static.field.from.instance.option.title"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("access.to.non.thread.safe.static.field.from.instance.class.chooser.title")))
|
||||
stringList("nonThreadSafeClasses", InspectionGadgetsBundle.message("access.to.non.thread.safe.static.field.from.instance.option.title"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("access.to.non.thread.safe.static.field.from.instance.class.chooser.title")))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringList;
|
||||
|
||||
public class AccessToStaticFieldLockedOnInstanceInspection extends BaseInspection {
|
||||
|
||||
@@ -44,7 +44,7 @@ public class AccessToStaticFieldLockedOnInstanceInspection extends BaseInspectio
|
||||
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(stringSet(
|
||||
return pane(stringList(
|
||||
"ignoredClasses", InspectionGadgetsBundle.message("options.label.ignored.classes"),
|
||||
new JavaClassValidator().withTitle(InspectionGadgetsBundle.message("choose.class.type.to.ignore"))
|
||||
));
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.intellij.codeInspection.MoveToPackageFix;
|
||||
import com.intellij.codeInspection.ProblemDescriptor;
|
||||
import com.intellij.codeInspection.ProblemHighlightType;
|
||||
import com.intellij.codeInspection.options.OptPane;
|
||||
import com.intellij.codeInspection.options.OptSet;
|
||||
import com.intellij.codeInspection.options.OptStringList;
|
||||
import com.intellij.codeInspection.options.OptionController;
|
||||
import com.intellij.codeInspection.util.InspectionMessage;
|
||||
import com.intellij.codeInspection.util.IntentionFamilyName;
|
||||
@@ -75,7 +75,7 @@ import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringList;
|
||||
|
||||
public final class PluginXmlDomInspection extends DevKitPluginXmlInspectionBase {
|
||||
@NonNls
|
||||
@@ -109,11 +109,12 @@ public final class PluginXmlDomInspection extends DevKitPluginXmlInspectionBase
|
||||
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
OptSet ignoreClassList = stringSet("myRegistrationCheckIgnoreClassList", DevKitBundle.message("inspections.plugin.xml.ignore.classes.title"),
|
||||
new JavaClassValidator().withTitle(DevKitBundle.message("inspections.plugin.xml.add.ignored.class.title")));
|
||||
OptStringList
|
||||
ignoreClassList = stringList("myRegistrationCheckIgnoreClassList", DevKitBundle.message("inspections.plugin.xml.ignore.classes.title"),
|
||||
new JavaClassValidator().withTitle(DevKitBundle.message("inspections.plugin.xml.add.ignored.class.title")));
|
||||
if (ApplicationManager.getApplication().isInternal()) {
|
||||
return pane(ignoreClassList,
|
||||
stringSet("PLUGINS_MODULES", DevKitBundle.message("inspections.plugin.xml.plugin.modules.label")));
|
||||
OptPane.stringList("PLUGINS_MODULES", DevKitBundle.message("inspections.plugin.xml.plugin.modules.label")));
|
||||
}
|
||||
return pane(ignoreClassList);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ import java.util.*;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
|
||||
public final class SuspiciousLocalesLanguagesInspection extends LocalInspectionTool {
|
||||
private static final String ADDITIONAL_LANGUAGES_ATTR_NAME = "additionalLanguages";
|
||||
@@ -65,7 +64,7 @@ public final class SuspiciousLocalesLanguagesInspection extends LocalInspectionT
|
||||
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(stringSet("myAdditionalLanguages", JavaI18nBundle.message("dissociate.resource.bundle.quick.fix.options.label")));
|
||||
return pane(OptPane.stringList("myAdditionalLanguages", JavaI18nBundle.message("dissociate.resource.bundle.quick.fix.options.label")));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -45,8 +45,8 @@ class RedundantInnerClassModifierInspection : AbstractKotlinInspection() {
|
||||
var ignorableAnnotations = OrderedSet(listOf(JUnitCommonClassNames.ORG_JUNIT_JUPITER_API_NESTED))
|
||||
|
||||
override fun getOptionsPane(): OptPane {
|
||||
return OptPane.pane(OptPane.stringSet("ignorableAnnotations", InspectionGadgetsBundle.message("ignore.if.annotated.by"),
|
||||
JavaClassValidator().annotationsOnly()))
|
||||
return OptPane.pane(OptPane.stringList("ignorableAnnotations", InspectionGadgetsBundle.message("ignore.if.annotated.by"),
|
||||
JavaClassValidator().annotationsOnly()))
|
||||
}
|
||||
|
||||
override fun buildVisitor(holder: ProblemsHolder, isOnTheFly: Boolean) = classVisitor(fun(targetClass) {
|
||||
|
||||
@@ -5,7 +5,7 @@ package org.jetbrains.kotlin.idea.intentions
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.options.OptPane
|
||||
import com.intellij.codeInspection.options.OptPane.pane
|
||||
import com.intellij.codeInspection.options.OptPane.stringSet
|
||||
import com.intellij.codeInspection.options.OptPane.stringList
|
||||
import com.intellij.codeInspection.options.OptionController
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.project.Project
|
||||
@@ -88,7 +88,7 @@ class UsePropertyAccessSyntaxInspection : IntentionBasedInspection<KtExpression>
|
||||
super.writeSettings(node)
|
||||
}
|
||||
|
||||
override fun getOptionsPane(): OptPane = pane(stringSet("fqNameStrings", KotlinBundle.message("excluded.methods")))
|
||||
override fun getOptionsPane(): OptPane = pane(stringList("fqNameStrings", KotlinBundle.message("excluded.methods")))
|
||||
|
||||
override fun getOptionController(): OptionController {
|
||||
return super.getOptionController()
|
||||
|
||||
@@ -21,7 +21,7 @@ import com.intellij.codeInspection.ProblemsHolder
|
||||
import com.intellij.codeInspection.options.OptPane
|
||||
import com.intellij.codeInspection.options.OptPane.checkbox
|
||||
import com.intellij.codeInspection.options.OptPane.pane
|
||||
import com.intellij.codeInspection.options.OptPane.stringSet
|
||||
import com.intellij.codeInspection.options.OptPane.stringList
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.profile.codeInspection.ProjectInspectionProfileManager
|
||||
import com.intellij.psi.PsiFile
|
||||
@@ -66,8 +66,8 @@ abstract class PackageUpdateInspection : AbstractPackageUpdateInspectionCheck()
|
||||
|
||||
override fun getOptionsPane(): OptPane {
|
||||
return pane(
|
||||
checkbox("onlyStable", PackageSearchBundle.message("packagesearch.ui.toolwindow.packages.filter.onlyStable")),
|
||||
stringSet("excludeList", PackageSearchBundle.message("packagesearch.inspection.upgrade.excluded.dependencies"))
|
||||
checkbox("onlyStable", PackageSearchBundle.message("packagesearch.ui.toolwindow.packages.filter.onlyStable")),
|
||||
stringList("excludeList", PackageSearchBundle.message("packagesearch.inspection.upgrade.excluded.dependencies"))
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -70,8 +70,8 @@ public class PyPep8NamingInspection extends PyInspection {
|
||||
return pane(
|
||||
checkbox("ignoreOverriddenFunctions", PyPsiBundle.message("ignore.overridden.functions")),
|
||||
horizontalStack(
|
||||
stringSet("ignoredBaseClasses", PyPsiBundle.message("INSP.pep8.naming.column.name.excluded.base.classes")),
|
||||
stringSet("ignoredErrors", PyPsiBundle.message("INSP.pep8.naming.column.name.ignored.errors"))
|
||||
stringList("ignoredBaseClasses", PyPsiBundle.message("INSP.pep8.naming.column.name.excluded.base.classes")),
|
||||
stringList("ignoredErrors", PyPsiBundle.message("INSP.pep8.naming.column.name.ignored.errors"))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
|
||||
/**
|
||||
* Warns about shadowing built-in names.
|
||||
@@ -65,7 +64,7 @@ public class PyShadowingBuiltinsInspection extends PyInspection {
|
||||
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(stringSet("ignoredNames", PyPsiBundle.message("INSP.shadowing.builtins.ignore.built.ins.label")));
|
||||
return pane(OptPane.stringList("ignoredNames", PyPsiBundle.message("INSP.shadowing.builtins.ignore.built.ins.label")));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -45,7 +45,6 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
|
||||
/**
|
||||
* User: catherine
|
||||
@@ -142,6 +141,6 @@ public class RestRoleInspection extends RestInspection {
|
||||
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(stringSet("ignoredRoles", PythonRestBundle.message("python.rest.inspections.role.ignore.roles.label")));
|
||||
return pane(OptPane.stringList("ignoredRoles", PythonRestBundle.message("python.rest.inspections.role.ignore.roles.label")));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.intellij.codeInspection.*
|
||||
import com.intellij.codeInspection.ex.EditInspectionToolsSettingsAction
|
||||
import com.intellij.codeInspection.ex.ProblemDescriptorImpl
|
||||
import com.intellij.codeInspection.options.OptPane.pane
|
||||
import com.intellij.codeInspection.options.OptPane.stringSet
|
||||
import com.intellij.codeInspection.options.OptPane.stringList
|
||||
import com.intellij.execution.ExecutionException
|
||||
import com.intellij.notification.Notification
|
||||
import com.intellij.notification.NotificationAction
|
||||
@@ -54,7 +54,7 @@ private class PyStubPackagesAdvertiser : PyInspection() {
|
||||
var ignoredPackages: MutableList<String> = mutableListOf()
|
||||
|
||||
override fun getOptionsPane() =
|
||||
pane(stringSet("ignoredPackages", PyPsiBundle.message("INSP.stub.packages.compatibility.ignored.packages.label")))
|
||||
pane(stringList("ignoredPackages", PyPsiBundle.message("INSP.stub.packages.compatibility.ignored.packages.label")))
|
||||
|
||||
override fun buildVisitor(holder: ProblemsHolder,
|
||||
isOnTheFly: Boolean,
|
||||
|
||||
@@ -52,7 +52,7 @@ class PyStubPackagesCompatibilityInspection : PyInspection() {
|
||||
var ignoredStubPackages: MutableList<String> = mutableListOf()
|
||||
|
||||
override fun getOptionsPane() =
|
||||
OptPane.pane(OptPane.stringSet("ignoredStubPackages", PyPsiBundle.message("INSP.stub.packages.compatibility.ignored.packages.label")))
|
||||
OptPane.pane(OptPane.stringList("ignoredStubPackages", PyPsiBundle.message("INSP.stub.packages.compatibility.ignored.packages.label")))
|
||||
|
||||
override fun buildVisitor(holder: ProblemsHolder,
|
||||
isOnTheFly: Boolean,
|
||||
|
||||
@@ -53,7 +53,6 @@ import org.jetbrains.annotations.Nullable;
|
||||
import java.util.*;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
|
||||
/**
|
||||
* @author vlan
|
||||
@@ -66,7 +65,7 @@ public class PyPackageRequirementsInspection extends PyInspection {
|
||||
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(stringSet("ignoredPackages", PyPsiBundle.message("INSP.requirements.ignore.packages.label")));
|
||||
return pane(OptPane.stringList("ignoredPackages", PyPsiBundle.message("INSP.requirements.ignore.packages.label")));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -10,7 +10,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
|
||||
/**
|
||||
* Dummy inspection for configuring the PEP8 checker. The checking itself is performed by
|
||||
@@ -22,7 +21,7 @@ public class PyPep8Inspection extends PyInspection implements ExternalAnnotatorB
|
||||
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(stringSet("ignoredErrors", PyBundle.message("INSP.settings.pep8.ignore.errors.label")));
|
||||
return pane(OptPane.stringList("ignoredErrors", PyBundle.message("INSP.settings.pep8.ignore.errors.label")));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -48,7 +48,6 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static com.intellij.codeInspection.options.OptPane.pane;
|
||||
import static com.intellij.codeInspection.options.OptPane.stringSet;
|
||||
|
||||
/**
|
||||
* Marks references that fail to resolve. Also tracks unused imports and provides "optimize imports" support.
|
||||
@@ -73,7 +72,7 @@ public class PyUnresolvedReferencesInspection extends PyUnresolvedReferencesInsp
|
||||
|
||||
@Override
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(stringSet("ignoredIdentifiers", PyPsiBundle.message("INSP.unresolved.refs.ignore.references.label")));
|
||||
return pane(OptPane.stringList("ignoredIdentifiers", PyPsiBundle.message("INSP.unresolved.refs.ignore.references.label")));
|
||||
}
|
||||
|
||||
public static class Visitor extends PyUnresolvedReferencesVisitor {
|
||||
|
||||
@@ -27,7 +27,7 @@ public class HtmlUnknownAttributeInspection extends HtmlUnknownAttributeInspecti
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
checkbox("myCustomValuesEnabled", XmlAnalysisBundle.message("html.inspections.unknown.tag.attribute.checkbox.title"),
|
||||
stringSet("myValues", XmlAnalysisBundle.message("html.inspections.unknown.tag.attribute.title")))
|
||||
stringList("myValues", XmlAnalysisBundle.message("html.inspections.unknown.tag.attribute.title")))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class HtmlUnknownBooleanAttributeInspection extends HtmlUnknownBooleanAtt
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
checkbox("myCustomValuesEnabled", XmlAnalysisBundle.message("html.inspections.unknown.tag.boolean.attribute.checkbox.title"),
|
||||
stringSet("myValues", XmlAnalysisBundle.message("html.inspections.unknown.tag.boolean.attribute.title")))
|
||||
stringList("myValues", XmlAnalysisBundle.message("html.inspections.unknown.tag.boolean.attribute.title")))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class HtmlUnknownTagInspection extends HtmlUnknownTagInspectionBase {
|
||||
public @NotNull OptPane getOptionsPane() {
|
||||
return pane(
|
||||
checkbox("myCustomValuesEnabled", XmlAnalysisBundle.message("html.inspections.unknown.tag.checkbox.title"),
|
||||
stringSet("myValues", XmlAnalysisBundle.message("html.inspections.unknown.tag.title")))
|
||||
stringList("myValues", XmlAnalysisBundle.message("html.inspections.unknown.tag.title")))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user