This is an automated email from the ASF dual-hosted git repository.
matthiasblaesing pushed a commit to branch delivery
in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/delivery by this push:
new fd437b1 CheckRegexp hint causes all lines with regexp shown with a
warning
new b64d24e Merge pull request #3287 from
matthiasblaesing/reduce_level_regexp
fd437b1 is described below
commit fd437b125fc689a08321246e95e92a94b49324a2
Author: Matthias Bläsing <[email protected]>
AuthorDate: Sat Oct 30 12:16:03 2021 +0200
CheckRegexp hint causes all lines with regexp shown with a warning
The severity of the CheckRegexp of VERIFIER causes all lines in source
files containing a regexp to be marked as warning. This is invalid, as
the regexp are perfectly ok.
The severity is reduced to HINT. That way the hint is readily available
when the regexp is under the cursor, but does not clutter the whole
file.
---
.../src/org/netbeans/modules/java/hints/jdk/CheckRegex.java | 3 ++-
.../unit/src/org/netbeans/modules/java/hints/jdk/CheckRegexTest.java | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git
a/java/java.hints/src/org/netbeans/modules/java/hints/jdk/CheckRegex.java
b/java/java.hints/src/org/netbeans/modules/java/hints/jdk/CheckRegex.java
index 5d6179d..2b8f223 100644
--- a/java/java.hints/src/org/netbeans/modules/java/hints/jdk/CheckRegex.java
+++ b/java/java.hints/src/org/netbeans/modules/java/hints/jdk/CheckRegex.java
@@ -38,6 +38,7 @@ import javax.swing.SwingUtilities;
import org.netbeans.api.annotations.common.CheckForNull;
import org.netbeans.api.java.source.CompilationInfo;
import org.netbeans.spi.editor.hints.ErrorDescription;
+import org.netbeans.spi.editor.hints.Severity;
import org.netbeans.spi.java.hints.ConstraintVariableType;
import org.netbeans.spi.java.hints.ErrorDescriptionFactory;
import org.netbeans.spi.java.hints.Hint;
@@ -47,7 +48,7 @@ import org.netbeans.spi.java.hints.TriggerPattern;
import org.netbeans.spi.java.hints.TriggerPatterns;
import org.openide.util.NbBundle.Messages;
-@Hint(displayName = "#DN_CheckRegex", description = "#DESC_CheckRegex",
category = "general")
+@Hint(displayName = "#DN_CheckRegex", description = "#DESC_CheckRegex",
category = "general", severity = Severity.HINT)
@Messages({
"DN_CheckRegex=Check Regular Expression",
"DESC_CheckRegex=Check Regular Expression"
diff --git
a/java/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/CheckRegexTest.java
b/java/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/CheckRegexTest.java
index 22eb381..9b14902 100644
---
a/java/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/CheckRegexTest.java
+++
b/java/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/CheckRegexTest.java
@@ -34,7 +34,7 @@ public class CheckRegexTest {
+ " }\n"
+ "}\n")
.run(CheckRegex.class)
- .assertWarnings("4:34-4:41:verifier:" +
Bundle.ERR_CheckRegex());
+ .assertWarnings("4:34-4:41:hint:" + Bundle.ERR_CheckRegex());
}
@Test
@@ -48,7 +48,7 @@ public class CheckRegexTest {
+ " }\n"
+ "}\n")
.run(CheckRegex.class)
- .assertWarnings("4:34-4:41:verifier:" +
Bundle.ERR_CheckRegex());
+ .assertWarnings("4:34-4:41:hint:" + Bundle.ERR_CheckRegex());
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists