From 1007d4d7c73aa0bb6d8e06772121d2e7a89d0a3d Mon Sep 17 00:00:00 2001 From: Bas Leijdekkers Date: Fri, 16 Sep 2011 11:09:13 +0200 Subject: [PATCH] IDEA-73347 (Naming convention inspections options: fields "Min Length" and "Max Length" behave agains usability rules) --- .../src/com/siyeh/InspectionGadgetsBundle.properties | 4 ++-- .../src/com/siyeh/ig/naming/ConventionInspection.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/InspectionGadgets/src/com/siyeh/InspectionGadgetsBundle.properties b/plugins/InspectionGadgets/src/com/siyeh/InspectionGadgetsBundle.properties index 3e4e3f8ef2d4..cc204db06687 100644 --- a/plugins/InspectionGadgets/src/com/siyeh/InspectionGadgetsBundle.properties +++ b/plugins/InspectionGadgets/src/com/siyeh/InspectionGadgetsBundle.properties @@ -1120,8 +1120,8 @@ constant.naming.convention.problem.descriptor.long=Constant name #ref#ref doesn''t match regex ''{0}'' #loc constant.naming.convention.immutables.option=Only check static final fields with immutable types convention.pattern.option=Pattern: -convention.min.length.option=Min Length: -convention.max.length.option=Max Length: +convention.min.length.option=Min length: +convention.max.length.option=Max length: enumerated.class.naming.convention.problem.descriptor.short=Enumerated class name #ref is too short #loc enumerated.class.naming.convention.problem.descriptor.long=Enumerated class name #ref is too long #loc enumerated.class.naming.convention.problem.descriptor.regex.mismatch=Enumerated class name #ref doesn''t match regex ''{0}'' #loc diff --git a/plugins/InspectionGadgets/src/com/siyeh/ig/naming/ConventionInspection.java b/plugins/InspectionGadgets/src/com/siyeh/ig/naming/ConventionInspection.java index 15b72a6d4801..ae8360cb64aa 100644 --- a/plugins/InspectionGadgets/src/com/siyeh/ig/naming/ConventionInspection.java +++ b/plugins/InspectionGadgets/src/com/siyeh/ig/naming/ConventionInspection.java @@ -1,5 +1,5 @@ /* - * Copyright 2003-2009 Dave Griffith, Bas Leijdekkers + * Copyright 2003-2011 Dave Griffith, Bas Leijdekkers * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -119,7 +119,7 @@ public abstract class ConventionInspection extends BaseInspection { numberFormat.setMaximumIntegerDigits(2); final InternationalFormatter formatter = new InternationalFormatter(numberFormat); - formatter.setAllowsInvalid(false); + formatter.setAllowsInvalid(true); formatter.setCommitsOnValidEdit(true); final JFormattedTextField minLengthField =