You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/07/03 15:31:46 UTC

[GitHub] geertjanw closed pull request #623: backport to release90 : NETBEANS-999 Show var hints when caret on current line

geertjanw closed pull request #623: backport to release90 : NETBEANS-999 Show var hints when caret on current line
URL: https://github.com/apache/incubator-netbeans/pull/623
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/java.hints/src/org/netbeans/modules/java/hints/jdk/ConvertToVarHint.java b/java.hints/src/org/netbeans/modules/java/hints/jdk/ConvertToVarHint.java
index c001f7d743..684ab15042 100644
--- a/java.hints/src/org/netbeans/modules/java/hints/jdk/ConvertToVarHint.java
+++ b/java.hints/src/org/netbeans/modules/java/hints/jdk/ConvertToVarHint.java
@@ -34,6 +34,7 @@
 import org.netbeans.api.java.source.TreeMaker;
 import org.netbeans.api.java.source.WorkingCopy;
 import org.netbeans.spi.editor.hints.ErrorDescription;
+import org.netbeans.spi.editor.hints.Severity;
 import org.netbeans.spi.java.hints.ErrorDescriptionFactory;
 import org.netbeans.spi.java.hints.Hint;
 import org.netbeans.spi.java.hints.HintContext;
@@ -54,7 +55,7 @@
  *
  * @author arusinha
  */
-@Hint(displayName = "#DN_CanUseVarForExplicitType", description = "#DESC_CanUseVarForExplicitType", category = "rules15", minSourceVersion = "10") //NOI18N
+@Hint(displayName = "#DN_CanUseVarForExplicitType", description = "#DESC_CanUseVarForExplicitType", category = "rules15", severity = Severity.HINT, minSourceVersion = "10") //NOI18N
 @Messages("MSG_ConvertibleToVarType=Explict type can be replaced with 'var'")  //NOI18N  
 public class ConvertToVarHint {
 
diff --git a/java.hints/src/org/netbeans/modules/java/hints/jdk/ConvertVarToExplicitType.java b/java.hints/src/org/netbeans/modules/java/hints/jdk/ConvertVarToExplicitType.java
index db826e7f3e..13a19d82eb 100644
--- a/java.hints/src/org/netbeans/modules/java/hints/jdk/ConvertVarToExplicitType.java
+++ b/java.hints/src/org/netbeans/modules/java/hints/jdk/ConvertVarToExplicitType.java
@@ -34,6 +34,7 @@
 import org.netbeans.api.java.source.WorkingCopy;
 import org.netbeans.modules.java.hints.errors.Utilities;
 import org.netbeans.spi.editor.hints.ErrorDescription;
+import org.netbeans.spi.editor.hints.Severity;
 import org.netbeans.spi.java.hints.ErrorDescriptionFactory;
 import org.netbeans.spi.java.hints.Hint;
 import org.netbeans.spi.java.hints.HintContext;
@@ -48,7 +49,7 @@
  *
  * @author rtaneja
  */
-@Hint(displayName = "#DN_ConvertVarToExplicitType", description = "#DESC_ConvertVarToExplicitType", category = "rules15", minSourceVersion = "10")
+@Hint(displayName = "#DN_ConvertVarToExplicitType", description = "#DESC_ConvertVarToExplicitType", category = "rules15", severity = Severity.HINT, minSourceVersion = "10")
 @Messages("MSG_ConvertibleToExplicitType=Convert var to explicit type")
 public class ConvertVarToExplicitType {
 
diff --git a/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/ConvertToVarHintTest.java b/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/ConvertToVarHintTest.java
index ebf1991675..4ea28140ac 100644
--- a/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/ConvertToVarHintTest.java
+++ b/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/ConvertToVarHintTest.java
@@ -29,7 +29,7 @@
 public class ConvertToVarHintTest {
 
     private static final String VAR_CONV_DESC = "Explict type can be replaced with 'var'"; //NOI18N
-    private static final String VAR_CONV_WARNING = "verifier:" + VAR_CONV_DESC; //NOI18N
+    private static final String VAR_CONV_WARNING = "hint:" + VAR_CONV_DESC; //NOI18N
 
     @Test
     public void testIntLiteralRefToVar() throws Exception {
diff --git a/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/ConvertVarToExplicitTypeTest.java b/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/ConvertVarToExplicitTypeTest.java
index 69bbe476fc..84cf5bd477 100644
--- a/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/ConvertVarToExplicitTypeTest.java
+++ b/java.hints/test/unit/src/org/netbeans/modules/java/hints/jdk/ConvertVarToExplicitTypeTest.java
@@ -27,7 +27,7 @@
  */
 public class ConvertVarToExplicitTypeTest {
     private static final String VAR_CONV_DESC = "Convert var to explicit type";//NOI18N
-    private static final String VAR_CONV_WARNING = "verifier:" + VAR_CONV_DESC; //NOI18N
+    private static final String VAR_CONV_WARNING = "hint:" + VAR_CONV_DESC; //NOI18N
 
     @Test
     public void testConvertVartoIntType() throws Exception {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists