You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by ge...@apache.org on 2019/03/01 10:02:09 UTC

[incubator-netbeans-website] branch master updated: Updated numbering, shortcuts, anchor, table images (#331)

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/incubator-netbeans-website.git


The following commit(s) were added to refs/heads/master by this push:
     new e7cf999  Updated numbering, shortcuts, anchor, table images (#331)
e7cf999 is described below

commit e7cf99978f4b3bff03a1fb4d24f924436439ec19
Author: Brian Cowell <18...@users.noreply.github.com>
AuthorDate: Fri Mar 1 21:02:05 2019 +1100

    Updated numbering, shortcuts, anchor, table images (#331)
    
    Fixed numbered lists.
    Updated keyboard short cuts from text to graphics.
    Fixed page anchoring. (were broken)
    Fixed table images - missing "a" attribute outside of row.
---
 .../src/content/kb/docs/java/code-inspect.asciidoc | 144 ++++++++++++---------
 1 file changed, 83 insertions(+), 61 deletions(-)

diff --git a/netbeans.apache.org/src/content/kb/docs/java/code-inspect.asciidoc b/netbeans.apache.org/src/content/kb/docs/java/code-inspect.asciidoc
index 42c55a4..efa9652 100644
--- a/netbeans.apache.org/src/content/kb/docs/java/code-inspect.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/java/code-inspect.asciidoc
@@ -28,6 +28,7 @@
 :toc-title:
 :description: Static Code Analysis in the NetBeans IDE Java Editor - Apache NetBeans
 :keywords: Apache NetBeans, Tutorials, Static Code Analysis in the NetBeans IDE Java Editor
+:experimental:
 
 The NetBeans IDE Java Editor has a static code analysis feature, which is a tool for finding potential problems and detecting inconsistencies in your source code.
 
@@ -48,9 +49,9 @@ In this tutorial, you will learn how to perform static analysis of your Java cod
 NOTE: ``jsr305-2.0.0.jar``  is included into  ``library.zip``  for the purposes of this tutorial.
 
 If using another NetBeans project, link:http://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/2.0.0/jsr305-2.0.0.jar[+jsr305-2.0.0.jar+] should be downloaded and added to the Libraries folder of the your project in the IDE as follows:
-
-1. Right-click the Libraries folder and choose the Add JAR/Folder from the popup menu.
-2. In the Add JAR/Folder dialog box, specify the path to the downloaded  ``jsr305-2.0.0.jar``  file and click Open.
+[lowerroman, start=1]
+. Right-click the Libraries folder and choose the Add JAR/Folder from the popup menu.
+. In the Add JAR/Folder dialog box, specify the path to the downloaded  ``jsr305-2.0.0.jar``  file and click Open.
 
 image::images/jar.png[]
 
@@ -59,24 +60,27 @@ image::images/jar.png[]
 In addition to the required software listed above you should have the following installed on your computer:
 
 * The link:https://netbeans.org/projects/samples/downloads/download/Samples/Java/library.zip[+library.zip+] file should be unzipped into your NetBeans project folder and opened in the NetBeans IDE.
-* The FindBugs plugin should be downloaded and installed into the NetBeans IDE as follows:
-1. Choose Source > Inspect from the main IDE's menu.
-2. In the Inspect dialog box, click Install.
+
+The FindBugs plugin should be downloaded and installed into the NetBeans IDE as follows:
+
+[arabic, start=1]
+. Choose Source > Inspect from the main IDE's menu.
+. In the Inspect dialog box, click Install.
 
 [.feature]
 --
 image::images/inspect-small.png[role="left", link="images/inspect.png"]
 --
-
-3. In the Installer dialog box, click Next to proceed with the installation.
+[start=3]
+. In the Installer dialog box, click Next to proceed with the installation.
 
 [.feature]
 --
 image::images/plugin-small.png[role="left", link="images/plugin.png"]
 --
-
-4. Review the license agreement, select the license agreement option, and click Install.
-5. When the installation is complete, click Finish.
+[start=4]
+. Review the license agreement, select the license agreement option, and click Install.
+. When the installation is complete, click Finish.
 
 == Using Predefined Configurations
 
@@ -87,15 +91,16 @@ You can use the following predefined configurations when inspecting your code in
 * <<fb,FindBugs>>
 * <<default,Default>>
 
+[[all]]
 === Running All Analyzers
 
 The  ``All Analyzers``  configuration deploys all static code analysis tools available in the IDE.
 
 *To run the  ``All Analyzers``  configuration, complete the following steps:*
 
-1. Choose Source > Inspect from the main IDE's toolbar.
-2. In the Scope drop-down list of the Inspect dialog box, select  ``Current Project (library)`` .
-3. In the Configuration drop-down list, select the  ``All Analyzers``  configuration.
+. Choose Source > Inspect from the main IDE's toolbar.
+. In the Scope drop-down list of the Inspect dialog box, select  ``Current Project (library)`` .
+. In the Configuration drop-down list, select the  ``All Analyzers``  configuration.
 
 [.feature]
 --
@@ -104,7 +109,8 @@ image::images/allconfig-small.png[role="left", link="images/allconfig.png"]
 
 NOTE: You need to install the <<plugin,FindBugs>> plugin to run this configuration for the first time.
 
-4. Click Inspect.
+[start=4]
+. Click Inspect.
 The results of the analysis are displayed in the Inspector Window as a tree view on the left.
 
 [.feature]
@@ -119,37 +125,42 @@ The description of the currently selected in the tree view finding is displayed
 image::images/alldescription-small.png[role="left", link="images/alldescription.png"]
 --
 
-NOTE: If you want to leave some part of your code that is reported as problematic as is, the IDE allows you to suppress the warning for this code to leave it without any changes. You can double-click a warning in the tree view of the Inspector Window to go to the Source Editor. Press Alt-Enter, click the black arrow pointing to the right at the end of the displayed hint, and choose  ``SuppressWarning - _(warning name)_`` .
+NOTE: If you want to leave some part of your code that is reported as problematic as is, the IDE allows you to suppress the warning for this code to leave it without any changes. You can double-click a warning in the tree view of the Inspector Window to go to the Source Editor. + 
+Press kbd:[Alt+Enter], click the black arrow pointing to the right at the end of the displayed hint, and choose  ``SuppressWarning - _(warning name)_`` .
 
 [.feature]
 --
 image::images/suppress-small.png[role="left", link="images/suppress.png"]
 --
 
+[[hints]]
 === Verifying Java Code against NetBeans Java Hints
 
 The  ``NetBeans Java Hints``  configuration available in the IDE enables you to verify if the predefined coding standard rules are satisfied by the source code under consideration. In other words, it applies a set of NetBeans Java Hints (also known as code inspections) to your Java source files.
 
 *To run the  ``NetBeans Java Hints``  configuration, complete the following steps:*
 
-1. Choose Source > Inspect from the main IDE's toolbar.
-2. In the Scope drop-down list of the Inspect dialog box, select  ``Open Projects``  (if you have only one  ``library``  project open in the IDE) or  ``Current Project (library)`` .
+. Choose Source > Inspect from the main IDE's toolbar.
+. In the Scope drop-down list of the Inspect dialog box, select  ``Open Projects``  (if you have only one  ``library``  project open in the IDE) or  ``Current Project (library)`` .
 
 NOTE: You can define a scope (a file, package, or project(s)) for the  ``NetBeans Java Hints``  configuration.
 
-3. Select the Configuration radio button and choose  ``NetBeans Java Hints``  in the drop-down list.
+[start=3]
+. Select the Configuration radio button and choose  ``NetBeans Java Hints``  in the drop-down list.
 
 [.feature]
 --
 image::images/hints-small.png[role="left", link="images/hints.png"]
 --
 
-4. Click Inspect.
+[start=4]
+. Click Inspect.
 The IDE displays the tree view with the results of the analysis with the  ``NetBeans Java Hints``  configuration in the Inspector Window.
 
 image::images/hintsconfig.png[]
 
-5. In the Inspector Window, click the <<categorize,Categorize>> button in the toolbar on the left to view the problems grouped into categories.
+[start=5]
+. In the Inspector Window, click the <<categorize,Categorize>> button in the toolbar on the left to view the problems grouped into categories.
 
 image::images/catview.png[]
 
@@ -158,16 +169,17 @@ The following table displays the commands available in the Inspector Window.
 
 |Icon |Name |Function 
 
-|image::images/refreshbutton.png[] |*Refresh* |Displays a refreshed list of the static analysis results. 
+a|image::images/refreshbutton.png[] |*Refresh* |Displays a refreshed list of the static analysis results. 
 
-|image::images/upbutton.png[] |*Previous Problem* |Displays the previous problem in the list of the static analysis results. 
+a|image::images/upbutton.png[] |*Previous Problem* |Displays the previous problem in the list of the static analysis results. 
 
-|image::images/downbutton.png[] |*Next Problem* |Displays the following problem in the list of the static analysis results. 
+a|image::images/downbutton.png[] |*Next Problem* |Displays the following problem in the list of the static analysis results. 
 
-|image::images/categorizebutton.png[] |
+a|image::images/categorizebutton.png[] |
 *Categorize* |Toggles the collapsed view of the problems detected in a file, project, or package or the categorized view of all the detected problems. 
 |===
 
+[[fb]]
 === Finding Potential Problems in Java Code with FindBugs
 
 The  ``FindBugs``  configuration available in the IDE enables you to find a wide range of potential problems in your code. It invokes the popular open source FindBugs tool for code analysis in Java. The bug report gets generated and is displayed in the Inspector Window of the NetBeans IDE, which categorizes all the found problems and allows direct navigation from the bugs in the report to the suspicious code. You can also read a bug description in the adjacent window or review it at the  [...]
@@ -176,18 +188,20 @@ NOTE: You need to install the <<plugin,FindBugs>> plugin to run this configurati
 
 *To identify potential errors in your Java code with the  ``FindBugs``  configuration, complete the following steps:*
 
-1. Open the  ``library``  project in the NetBeans IDE and choose Source > Inspect from the main toolbar.
-2. In the Scope drop-down list of the Inspect dialog box, select  ``Current Project (library)`` .
+. Open the  ``library``  project in the NetBeans IDE and choose Source > Inspect from the main toolbar.
+. In the Scope drop-down list of the Inspect dialog box, select  ``Current Project (library)`` .
 
 NOTE: You can inspect a file, package, or project(s) with the  ``FindBugs``  configuration.
 
-3. In the Inspect dialog box, select the  ``FindBugs``  configuration.
+[start=3]
+. In the Inspect dialog box, select the  ``FindBugs``  configuration.
 
 [.feature]
 --
 image::images/fb-small.png[role="left", link="images/fb.png"]
 --
 
+[start=4]
 4. Click the Inspect button to initiate the static code analysis.
 The result of the static code analysis is displayed in the Inspector Window below the Source Editor.
 The description of the selected bug is displayed in the frame on the right.
@@ -197,12 +211,13 @@ The description of the selected bug is displayed in the frame on the right.
 image::images/inspector-small.png[role="left", link="images/inspector.png"]
 --
 
-5. Alternatively, click the <<categorize,Categorize>> button in the toolbar on the left to view the bugs grouped into categories.
+[start=5]
+. Alternatively, click the <<categorize,Categorize>> button in the toolbar on the left to view the bugs grouped into categories.
 
 image::images/fbcat.png[]
 
-NOTE: If you double-click an issue in the expanded list, the IDE displays the reported issue in the Source Editor. 
-Press Alt-Enter to view the bug description in the source code.
+NOTE: If you double-click an issue in the expanded list, the IDE displays the reported issue in the Source Editor. + 
+Press kbd:[Alt+Enter] to view the bug description in the source code.
 
 [.feature]
 --
@@ -213,47 +228,51 @@ NOTE: Potential errors are highlighted in the code with exclamation mark icons (
 
 *To enable FindBugs in the Java Editor, complete the following steps:*
 
-1. Choose Tools > Options in the main IDE's toolbar.
-2. Select the Editor tab and choose Hints.
-3. Choose  ``FindBugs``  in the Language drop-down list.
+. Choose Tools > Options in the main IDE's toolbar.
+. Select the Editor tab and choose Hints.
+. Choose  ``FindBugs``  in the Language drop-down list.
 
 [.feature]
 --
 image::images/fb-editor-small.png[role="left", link="images/fb-editor.png"]
 --
 
-4. Select the Run FindBugs in Editor option.
-5. Click OK.
-If you now press Alt-Enter in the source code where a bug is reported and click the black arrow pointing to the right at the end of the displayed tip, the IDE shows some fixing options for a potential bug.
+[start=4]
+. Select the Run FindBugs in Editor option.
+. Click OK.
+If you now press kbd:[Alt+Enter] in the source code where a bug is reported and click the black arrow pointing to the right at the end of the displayed tip, the IDE shows some fixing options for a potential bug.
 
 [.feature]
 --
 image::images/fbenabled-small.png[role="left", link="images/fbenabled.png"]
 --
 
+[[default]]
 === Customizing a Default Configuration
 
 While working on your code you may need to customize a predefined configuration that includes your own NetBeans Java hints or FindBugs bugs.
 
 *To tailor a predefined  ``Default``  configuration to your own needs, complete the following steps:*
 
-1. Choose Source > Inspect from the main IDE's toolbar.
-2. In the Inspect dialog box, select the Configuration radio button and select the  ``Default``  configuration.
-3. Click Manage.
+. Choose Source > Inspect from the main IDE's toolbar.
+. In the Inspect dialog box, select the Configuration radio button and select the  ``Default``  configuration.
+. Click Manage.
 The IDE displays the Configurations dialog box.
 
 image::images/configurations-db.png[]
 
-4. Ensure  ``Default``  is selected in the Configurations drop-down list.
-5. In the Analyzer drop-down list, select the  ``JRE 8 Profiles Conformance`` ,  ``Netbeans Java Hints`` , or  ``FindBugs``  analyzer.
-6. Depending on the choice of the analyzer in the previous step, select the profile to validate, the inspections, or bugs you need to include into your  ``Default``  configuration.
+[start=4]
+. Ensure  ``Default``  is selected in the Configurations drop-down list.
+. In the Analyzer drop-down list, select the  ``JRE 8 Profiles Conformance`` ,  ``Netbeans Java Hints`` , or  ``FindBugs``  analyzer.
+. Depending on the choice of the analyzer in the previous step, select the profile to validate, the inspections, or bugs you need to include into your  ``Default``  configuration.
 
 [.feature]
 --
 image::images/select-inspections-small.png[role="left", link="images/select-inspections.png"]
 --
 
-7. Click OK to save your  ``Default``  configuration.
+[start=7]
+. Click OK to save your  ``Default``  configuration.
 
 == Creating and Deleting Configurations
 
@@ -261,10 +280,10 @@ You can create and delete your own configurations to be used in the static analy
 
 *To create a configuration, complete the following steps:*
 
-1. Choose Source > Inspect from the main IDE's toolbar.
-2. In the Inspect dialog box, select the Configuration radio button and select the  ``Default``  configuration.
-3. Click Manage.
-4. In the Configurations dialog box, click the black arrow at the end of the Configurations drop-down list and choose New.
+. Choose Source > Inspect from the main IDE's toolbar.
+. In the Inspect dialog box, select the Configuration radio button and select the  ``Default``  configuration.
+. Click Manage.
+. In the Configurations dialog box, click the black arrow at the end of the Configurations drop-down list and choose New.
 
 image::images/newconfig.png[]
 
@@ -272,9 +291,10 @@ A  ``newConfig``  configuration is created and added to the Configurations drop-
 
 image::images/newconfig-created.png[]
 
-5. In the Analyzer drop-down list, choose  ``JRE 8 Profiles Conformance`` ,  ``Netbeans Java Hints`` , or  ``FindBugs`` .
-6. Specify the profile, inspections, or bugs to be included into your own configuration.
-7. Click OK to save your edits and close the Configurations dialog box.
+[start=5]
+. In the Analyzer drop-down list, choose  ``JRE 8 Profiles Conformance`` ,  ``Netbeans Java Hints`` , or  ``FindBugs`` .
+. Specify the profile, inspections, or bugs to be included into your own configuration.
+. Click OK to save your edits and close the Configurations dialog box.
 The created  ``newConfig``  configuration is available in the Configuration drop-down list of the Inspect dialog box.
 
 [.feature]
@@ -282,20 +302,21 @@ The created  ``newConfig``  configuration is available in the Configuration drop
 image::images/newconfig-inspect-small.png[role="left", link="images/newconfig-inspect.png"]
 --
 
-NOTE: To rename a configuration, select the  ``newConfig``  configuration in the Configurations drop-down list, click the black arrow at the end of the Configurations drop-down list and choose Rename. Type a new name (for example,  ``renamedConfig`` ) and press Enter to save your edits.
+NOTE: To rename a configuration, select the  ``newConfig``  configuration in the Configurations drop-down list, click the black arrow at the end of the Configurations drop-down list and choose Rename. Type a new name (for example,  ``renamedConfig`` ) and press kbd:[Enter] to save your edits.
 
 image::images/renamedconfig.png[]
 
 *To delete a configuration, complete the following steps:*
 
-1. Choose Source > Inspect from the main IDE's toolbar.
-2. In the Inspect dialog box, select the Configuration radio button and select the configuration to be deleted ( ``renamedConfig``  in this example).
-3. Click Manage.
-4. In the Configurations dialog box, click the black arrow at the end of the Configurations drop-down list and choose Delete.
+. Choose Source > Inspect from the main IDE's toolbar.
+. In the Inspect dialog box, select the Configuration radio button and select the configuration to be deleted ( ``renamedConfig``  in this example).
+. Click Manage.
+. In the Configurations dialog box, click the black arrow at the end of the Configurations drop-down list and choose Delete.
 
 image::images/delete.png[]
 
-5. In the Delete Configuration dialog box, click Yes to confirm the deletion of the configuration.
+[start=5]
+. In the Delete Configuration dialog box, click Yes to confirm the deletion of the configuration.
 
 image::images/delete-confirm.png[]
 
@@ -309,9 +330,9 @@ You can inspect your code for a particular deficiency in your source code using
 
 *To detect a specific inconsistency or problem in your Java source code with a single inspection, complete the following steps:*
 
-1. Choose Source > Inspect from the main IDE's menu.
-2. In the Scope drop-down list of the Inspect dialog box, select a file, package, or project(s) to be inspected.
-3. Select Single Inspection and do either of the following:
+. Choose Source > Inspect from the main IDE's menu.
+. In the Scope drop-down list of the Inspect dialog box, select a file, package, or project(s) to be inspected.
+. Select Single Inspection and do either of the following:
 * In the Single Inspection drop-down list, scroll and select a _single_ NetBeans Java hint or FindBugs bug to be used in the source code analysis.
 
 [.feature]
@@ -326,7 +347,8 @@ image::images/single-inspection-small.png[role="left", link="images/single-inspe
 image::images/hint-inspection-small.png[role="left", link="images/hint-inspection.png"]
 --
 
-4. In the Inspect dialog box, click Inspect to perform the source code analysis. 
+[start=4]
+. In the Inspect dialog box, click Inspect to perform the source code analysis. 
 After the Inspect operation is completed, the hints that can be applied to your code or bugs that have been found are displayed in the Inspector Window below the Source Editor.
 
 == Summary


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

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