This is an automated email from the ASF dual-hosted git repository.
geertjan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-website.git
The following commit(s) were added to refs/heads/master by this push:
new fd8fc24 More tweaks to fix the hints tutorial
fd8fc24 is described below
commit fd8fc24e0dc3957f00836697fa7862e21961f4dc
Author: Geertjan Wielenga <[email protected]>
AuthorDate: Sun Mar 7 15:51:06 2021 +0100
More tweaks to fix the hints tutorial
---
.../src/content/tutorials/nbm-java-hint.asciidoc | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/netbeans.apache.org/src/content/tutorials/nbm-java-hint.asciidoc
b/netbeans.apache.org/src/content/tutorials/nbm-java-hint.asciidoc
index d98adbe..44640f3 100644
--- a/netbeans.apache.org/src/content/tutorials/nbm-java-hint.asciidoc
+++ b/netbeans.apache.org/src/content/tutorials/nbm-java-hint.asciidoc
@@ -32,9 +32,6 @@
This tutorial demonstrates how to create a NetBeans module that provides one
or more Java hints. At the end of the first scenario covered in this tutorial,
whenever the user types " ``JOptionPane.showMessageDialog`` ", a Java hint will
appear, asking the user whether the statement is needed (or whether it is there
because the user needed it for debugging):
-
-image::images/result-1.png[]
-
At the end of the second scenario, the user will be able to click the hint to
delete the superfluous statement:
In addition, the user will be able to find and replace multiple instances of
the superfluous statement, after using the "Inspect & Transform" dialog in
the Refactor menu, which displays all found instances in the Refactoring window:
@@ -82,6 +79,8 @@ In this section, you provide the Java code for the Java hint.
[start=2]
1. In the New Java Hint Description panel, fill out the fields as follows:
+
+
image::images/new-hint-2.png[]
Click Next.
@@ -89,6 +88,8 @@ Click Next.
[start=3]
1. In the New Java Hint Location panel, fill out the fields as follows:
+
+
image::images/new-hint-3.png[]
Click Finish.
@@ -242,7 +243,7 @@ In this section, you learn how to fix statements of
interest that have been iden
[source,java]
----
-private static final class FixImpl extends
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-java-hints/org/netbeans/spi/java/hints/JavaFix.html[JavaFix]
{
+private static final class FixImpl extends JavaFix {
public FixImpl(CompilationInfo info, TreePath tp) {
super(info, tp);
@@ -293,7 +294,7 @@ The code above comes from the NetBeans sources, where it is
used in the SystemOu
----
public static ErrorDescription computeWarning(HintContext ctx) {
- *
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-editor-hints/org/netbeans/spi/editor/hints/Fix.html?is-external=true[Fix]
fix = new FixImpl(ctx.getInfo(), ctx.getPath()).toEditorFix();*
+ Fix fix = new FixImpl(ctx.getInfo(), ctx.getPath()).toEditorFix();
return ErrorDescriptionFactory.forName(
ctx,
ctx.getPath(),
---------------------------------------------------------------------
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