diff --git a/src/main/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePackageProtected.java b/src/main/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePackageProtected.java index 24d0582..27adbbf 100644 --- a/src/main/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePackageProtected.java +++ b/src/main/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePackageProtected.java @@ -72,7 +72,7 @@ public class MakePackageProtected { private static final EnumSet oppositeModifiers = EnumSet.of(Modifier.PRIVATE, Modifier.PUBLIC, Modifier.PROTECTED); @Hint(displayName = "#DN_MakePackageProtected", description = "#DESC_MakePackageProtected", category = "suggestions", - hintKind = Hint.Kind.INSPECTION, severity = Severity.HINT) + hintKind = Hint.Kind.ACTION, severity = Severity.HINT) @TriggerTreeKind({Tree.Kind.CLASS, Tree.Kind.METHOD, Tree.Kind.VARIABLE}) public static ErrorDescription convert(HintContext ctx) { diff --git a/src/main/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePrivate.java b/src/main/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePrivate.java index 21d9fd3..07aaf43 100644 --- a/src/main/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePrivate.java +++ b/src/main/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePrivate.java @@ -72,7 +72,7 @@ public class MakePrivate { private static final EnumSet oppositeModifiers = EnumSet.of(Modifier.PUBLIC, Modifier.PROTECTED); @Hint(displayName = "#DN_MakePrivate", description = "#DESC_MakePrivate", category = "suggestions", - hintKind = Hint.Kind.INSPECTION, severity = Severity.HINT) + hintKind = Hint.Kind.ACTION, severity = Severity.HINT) @TriggerTreeKind({Tree.Kind.CLASS, Tree.Kind.METHOD, Tree.Kind.VARIABLE}) public static ErrorDescription convert(HintContext ctx) { diff --git a/src/main/java/de/markiewb/netbeans/plugins/hints/modifiers/MakeProtected.java b/src/main/java/de/markiewb/netbeans/plugins/hints/modifiers/MakeProtected.java index b717add..433d9b7 100644 --- a/src/main/java/de/markiewb/netbeans/plugins/hints/modifiers/MakeProtected.java +++ b/src/main/java/de/markiewb/netbeans/plugins/hints/modifiers/MakeProtected.java @@ -72,7 +72,7 @@ public class MakeProtected { private static final EnumSet oppositeModifiers = EnumSet.of(Modifier.PRIVATE, Modifier.PUBLIC); @Hint(displayName = "#DN_MakeProtected", description = "#DESC_MakeProtected", category = "suggestions", - hintKind = Hint.Kind.INSPECTION, severity = Severity.HINT) + hintKind = Hint.Kind.ACTION, severity = Severity.HINT) @TriggerTreeKind({Tree.Kind.CLASS, Tree.Kind.METHOD, Tree.Kind.VARIABLE}) public static ErrorDescription convert(HintContext ctx) { diff --git a/src/main/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePublic.java b/src/main/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePublic.java index 8fb8a6e..7b463ff 100644 --- a/src/main/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePublic.java +++ b/src/main/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePublic.java @@ -72,7 +72,7 @@ public class MakePublic { private static final EnumSet oppositeModifiers = EnumSet.of(Modifier.PRIVATE, Modifier.PROTECTED); @Hint(displayName = "#DN_MakePublic", description = "#DESC_MakePublic", category = "suggestions", - hintKind = Hint.Kind.INSPECTION, severity = Severity.HINT) + hintKind = Hint.Kind.ACTION, severity = Severity.HINT) @TriggerTreeKind({Tree.Kind.CLASS, Tree.Kind.METHOD, Tree.Kind.VARIABLE}) public static ErrorDescription convert(HintContext ctx) { diff --git a/src/test/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePackageProtectedTest.java b/src/test/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePackageProtectedTest.java index 5ecda43..9ea06db 100644 --- a/src/test/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePackageProtectedTest.java +++ b/src/test/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePackageProtectedTest.java @@ -7,7 +7,7 @@ public class MakePackageProtectedTest { @Test public void testFixWorking_Private_Field() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " private String s = null;\n" @@ -23,7 +23,7 @@ public void testFixWorking_Private_Field() throws Exception { @Test public void testFixWorking_Private_Inner_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " private class Inner {}\n" @@ -40,7 +40,7 @@ public void testFixWorking_Private_Inner_Class() throws Exception { @Test public void testFixWorking_Private_Method() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " private static void main(String[] args) {\n" @@ -64,14 +64,14 @@ public void testFixWorking_Private_Method() throws Exception { */ @Test(expected = AssertionError.class) public void testFixWorking_Private_TopLevel_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test; private class Test {}") .run(MakePackageProtected.class); } @Test public void testFixWorking_Protected_Field() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " protected String s = null;\n" @@ -87,7 +87,7 @@ public void testFixWorking_Protected_Field() throws Exception { @Test public void testFixWorking_Protected_Inner_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " protected class Inner {}\n" @@ -103,7 +103,7 @@ public void testFixWorking_Protected_Inner_Class() throws Exception { @Test public void testFixWorking_Protected_Method() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " protected static void main(String[] args) {\n" @@ -127,14 +127,14 @@ public void testFixWorking_Protected_Method() throws Exception { */ @Test(expected = AssertionError.class) public void testFixWorking_Protected_TopLevel_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test; protected class Test {}") .run(MakePackageProtected.class); } @Test public void testFixWorking_Public_Field() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " public String s = null;\n" @@ -151,7 +151,7 @@ public void testFixWorking_Public_Field() throws Exception { @Test public void testFixWorking_Public_Inner_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " public class Inner {}\n" @@ -168,7 +168,7 @@ public void testFixWorking_Public_Inner_Class() throws Exception { @Test public void testFixWorking_Public_Method() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " public static void main(String[] args) {\n" @@ -187,7 +187,7 @@ public void testFixWorking_Public_Method() throws Exception { @Test public void testFixWorking_Public_TopLevel_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test; public class Test {}") .run(MakePackageProtected.class) .findWarning("0:27-0:31:hint:" + Bundle.ERR_MakePackageProtected()) diff --git a/src/test/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePrivateTest.java b/src/test/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePrivateTest.java index 5bf1658..7adc78d 100644 --- a/src/test/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePrivateTest.java +++ b/src/test/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePrivateTest.java @@ -7,7 +7,7 @@ public class MakePrivateTest { @Test public void testFixWorking_PackageProtected_Field() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " String s = null;\n" @@ -24,7 +24,7 @@ public void testFixWorking_PackageProtected_Field() throws Exception { @Test public void testFixWorking_PackageProtected_Inner_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|').setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " class Inner {}\n" @@ -41,7 +41,7 @@ public void testFixWorking_PackageProtected_Inner_Class() throws Exception { @Test public void testFixWorking_PackageProtected_Method() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|').setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " static void main(String[] args) {\n" @@ -64,7 +64,7 @@ public void testFixWorking_PackageProtected_Method() throws Exception { */ @Test public void testFixWorking_PackageProtected_TopLevel_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|').setCaretMarker('|') .input("package test; class Test {}") .run(MakePrivate.class) .assertNotContainsWarnings("0:20-0:24:hint:" + Bundle.ERR_MakePrivate()); @@ -72,7 +72,7 @@ public void testFixWorking_PackageProtected_TopLevel_Class() throws Exception { @Test public void testFixWorking_Protected_Field() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|').setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " protected String s = null;\n" @@ -83,7 +83,7 @@ public void testFixWorking_Protected_Field() throws Exception { @Test public void testFixWorking_Protected_Inner_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|').setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " protected class Inner {}\n" @@ -94,7 +94,7 @@ public void testFixWorking_Protected_Inner_Class() throws Exception { @Test public void testFixWorking_Protected_Method() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|').setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " protected static void main(String[] args) {\n" @@ -111,14 +111,14 @@ public void testFixWorking_Protected_Method() throws Exception { */ @Test(expected = AssertionError.class) public void testFixWorking_Protected_TopLevel_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|').setCaretMarker('|') .input("package test; protected class Test {}") .run(MakePrivate.class); } @Test public void testFixWorking_Public_Field() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|').setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " public String s = null;\n" @@ -136,7 +136,7 @@ public void testFixWorking_Public_Field() throws Exception { @Test public void testFixWorking_Public_Inner_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|').setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " public class Inner {}\n" @@ -153,7 +153,7 @@ public void testFixWorking_Public_Inner_Class() throws Exception { @Test public void testFixWorking_Public_Method() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|').setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " static void main(String[] args) {\n" @@ -177,7 +177,7 @@ public void testFixWorking_Public_Method() throws Exception { */ @Test public void testFixWorking_Public_TopLevel_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|').setCaretMarker('|') .input("package test; public class Test {}") .run(MakePrivate.class) .assertNotContainsWarnings("0:27-1:31:hint:" + Bundle.ERR_MakePrivate()); diff --git a/src/test/java/de/markiewb/netbeans/plugins/hints/modifiers/MakeProtectedTest.java b/src/test/java/de/markiewb/netbeans/plugins/hints/modifiers/MakeProtectedTest.java index d088dd5..f51c152 100644 --- a/src/test/java/de/markiewb/netbeans/plugins/hints/modifiers/MakeProtectedTest.java +++ b/src/test/java/de/markiewb/netbeans/plugins/hints/modifiers/MakeProtectedTest.java @@ -7,7 +7,7 @@ public class MakeProtectedTest { @Test public void testFixWorking_PackageProtected_Field() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " String s = null;\n" @@ -24,7 +24,7 @@ public void testFixWorking_PackageProtected_Field() throws Exception { @Test public void testFixWorking_PackageProtected_Inner_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " class Inner {}\n" @@ -41,7 +41,7 @@ public void testFixWorking_PackageProtected_Inner_Class() throws Exception { @Test public void testFixWorking_PackageProtected_Method() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " static void main(String[] args) {\n" @@ -64,7 +64,7 @@ public void testFixWorking_PackageProtected_Method() throws Exception { */ @Test public void testFixWorking_PackageProtected_TopLevel_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test; class Test {}") .run(MakeProtected.class) .assertNotContainsWarnings("0:20-0:24:hint:" + Bundle.ERR_MakeProtected()); @@ -72,7 +72,7 @@ public void testFixWorking_PackageProtected_TopLevel_Class() throws Exception { @Test public void testFixWorking_Private_Field() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " private String s = null;\n" @@ -89,7 +89,7 @@ public void testFixWorking_Private_Field() throws Exception { @Test public void testFixWorking_Private_Inner_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " private class Inner {}\n" @@ -106,7 +106,7 @@ public void testFixWorking_Private_Inner_Class() throws Exception { @Test public void testFixWorking_Private_Method() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " private static void main(String[] args) {\n" @@ -130,14 +130,14 @@ public void testFixWorking_Private_Method() throws Exception { */ @Test(expected = AssertionError.class) public void testFixWorking_Private_TopLevel_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test; private class Test {}") .run(MakeProtected.class); } @Test public void testFixWorking_Public_Field() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " public String s = null;\n" @@ -155,7 +155,7 @@ public void testFixWorking_Public_Field() throws Exception { @Test public void testFixWorking_Public_Inner_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " public class Inner {}\n" @@ -172,7 +172,7 @@ public void testFixWorking_Public_Inner_Class() throws Exception { @Test public void testFixWorking_Public_Method() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " static void main(String[] args) {\n" @@ -192,7 +192,7 @@ public void testFixWorking_Public_Method() throws Exception { @Test public void testFixWorking_Public_TopLevel_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test; public class Test {}") .run(MakeProtected.class) .assertNotContainsWarnings("0:20-1:24:hint:" + Bundle.ERR_MakeProtected()); diff --git a/src/test/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePublicTest.java b/src/test/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePublicTest.java index da39bdd..d018ee3 100644 --- a/src/test/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePublicTest.java +++ b/src/test/java/de/markiewb/netbeans/plugins/hints/modifiers/MakePublicTest.java @@ -7,7 +7,7 @@ public class MakePublicTest { @Test public void testFixWorking_PackageProtected_Field() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " String s = null;\n" @@ -24,7 +24,7 @@ public void testFixWorking_PackageProtected_Field() throws Exception { @Test public void testFixWorking_PackageProtected_Inner_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " class Inner {}\n" @@ -41,7 +41,7 @@ public void testFixWorking_PackageProtected_Inner_Class() throws Exception { @Test public void testFixWorking_PackageProtected_Method() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " static void main(String[] args) {\n" @@ -60,7 +60,7 @@ public void testFixWorking_PackageProtected_Method() throws Exception { @Test public void testFixWorking_PackageProtected_TopLevel_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test; class Test {}") .run(MakePublic.class) .findWarning("0:20-0:24:hint:" + Bundle.ERR_MakePublic()) @@ -71,7 +71,7 @@ public void testFixWorking_PackageProtected_TopLevel_Class() throws Exception { @Test public void testFixWorking_Private_Field() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " private String s = null;\n" @@ -88,7 +88,7 @@ public void testFixWorking_Private_Field() throws Exception { @Test public void testFixWorking_Private_Inner_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " private class Inner {}\n" @@ -105,7 +105,7 @@ public void testFixWorking_Private_Inner_Class() throws Exception { @Test public void testFixWorking_Private_Method() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " private static void main(String[] args) {\n" @@ -129,14 +129,14 @@ public void testFixWorking_Private_Method() throws Exception { */ @Test(expected = AssertionError.class) public void testFixWorking_Private_TopLevel_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test; private class Test {}") .run(MakePublic.class); } @Test public void testFixWorking_Protected_Field() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " protected String s = null;\n" @@ -153,7 +153,7 @@ public void testFixWorking_Protected_Field() throws Exception { @Test public void testFixWorking_Protected_Inner_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " protected class Inner {}\n" @@ -170,7 +170,7 @@ public void testFixWorking_Protected_Inner_Class() throws Exception { @Test public void testFixWorking_Protected_Method() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test;\n" + "public class Test {\n" + " protected static void main(String[] args) {\n" @@ -194,7 +194,7 @@ public void testFixWorking_Protected_Method() throws Exception { */ @Test(expected = AssertionError.class) public void testFixWorking_Protected_TopLevel_Class() throws Exception { - HintTest.create() + HintTest.create().setCaretMarker('|') .input("package test; protected class Test {}") .run(MakePublic.class); }