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 421c4b8  tutorial: update Platform module "Google Toolbar" example
     new eb65c0a  Merge pull request #502 from bradh/nbm-googlebar
421c4b8 is described below

commit 421c4b8bcb27a8048e806b865979ea7871ed67c4
Author: Brad Hards <[email protected]>
AuthorDate: Tue Dec 1 17:18:07 2020 +1100

    tutorial: update Platform module "Google Toolbar" example
---
 .../images/nbm-googlebar/google-result.png         | Bin 0 -> 1133 bytes
 .../tutorials/images/nbm-googlebar/google.png      | Bin 0 -> 612 bytes
 .../tutorials/images/nbm-googlebar/google24.png    | Bin 0 -> 1327 bytes
 .../images/nbm-googlebar/new-action-0.png          | Bin 0 -> 24096 bytes
 .../images/nbm-googlebar/new-action-1.png          | Bin 0 -> 85648 bytes
 .../images/nbm-googlebar/new-action-2.png          | Bin 0 -> 54588 bytes
 .../images/nbm-googlebar/new-action-3.png          | Bin 0 -> 63973 bytes
 .../images/nbm-googlebar/new-action-4.png          | Bin 0 -> 69843 bytes
 .../images/nbm-googlebar/new-action-5.png          | Bin 0 -> 26047 bytes
 .../images/nbm-googlebar/new-project-0.png         | Bin 0 -> 72126 bytes
 .../images/nbm-googlebar/new-project-1.png         | Bin 0 -> 63422 bytes
 .../images/nbm-googlebar/new-project-2.png         | Bin 0 -> 59389 bytes
 .../images/nbm-googlebar/new-project-3.png         | Bin 0 -> 19275 bytes
 .../images/nbm-googlebar/new-toolbar-0.png         | Bin 0 -> 26439 bytes
 .../images/nbm-googlebar/new-toolbar-1.png         | Bin 0 -> 84062 bytes
 .../images/nbm-googlebar/new-toolbar-2.png         | Bin 0 -> 56787 bytes
 .../images/nbm-googlebar/new-toolbar-3.png         | Bin 0 -> 14862 bytes
 .../images/nbm-googlebar/new-toolbar-4.png         | Bin 0 -> 15372 bytes
 .../images/nbm-googlebar/new-toolbar-5.png         | Bin 0 -> 45747 bytes
 .../images/nbm-googlebar/new-toolbar-6.png         | Bin 0 -> 51147 bytes
 .../images/nbm-googlebar/new-toolbar-7.png         | Bin 0 -> 51028 bytes
 .../tutorials/images/nbm-googlebar/result-1.png    | Bin 0 -> 112397 bytes
 .../tutorials/images/nbm-googlebar/result-2.png    | Bin 0 -> 116839 bytes
 .../tutorials/images/nbm-googlebar/result-3.png    | Bin 0 -> 124903 bytes
 .../src/content/tutorials/nbm-google.asciidoc      | 236 ++++++++++++---------
 25 files changed, 136 insertions(+), 100 deletions(-)

diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/google-result.png
 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/google-result.png
new file mode 100644
index 0000000..2895ce5
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/google-result.png
 differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/google.png 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/google.png
new file mode 100644
index 0000000..28cadaf
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/google.png 
differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/google24.png 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/google24.png
new file mode 100644
index 0000000..e502ce2
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/google24.png 
differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-action-0.png
 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-action-0.png
new file mode 100644
index 0000000..a654b83
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-action-0.png
 differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-action-1.png
 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-action-1.png
new file mode 100644
index 0000000..8f91411
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-action-1.png
 differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-action-2.png
 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-action-2.png
new file mode 100644
index 0000000..ff90bae
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-action-2.png
 differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-action-3.png
 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-action-3.png
new file mode 100644
index 0000000..ab8d827
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-action-3.png
 differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-action-4.png
 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-action-4.png
new file mode 100644
index 0000000..306befd
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-action-4.png
 differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-action-5.png
 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-action-5.png
new file mode 100644
index 0000000..12acde0
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-action-5.png
 differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-project-0.png
 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-project-0.png
new file mode 100644
index 0000000..46a20e7
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-project-0.png
 differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-project-1.png
 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-project-1.png
new file mode 100644
index 0000000..515c5ca
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-project-1.png
 differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-project-2.png
 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-project-2.png
new file mode 100644
index 0000000..80b809d
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-project-2.png
 differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-project-3.png
 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-project-3.png
new file mode 100644
index 0000000..2a34e1d
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-project-3.png
 differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-0.png
 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-0.png
new file mode 100644
index 0000000..7ef1ff3
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-0.png
 differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-1.png
 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-1.png
new file mode 100644
index 0000000..fbb9c3f
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-1.png
 differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-2.png
 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-2.png
new file mode 100644
index 0000000..e65f871
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-2.png
 differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-3.png
 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-3.png
new file mode 100644
index 0000000..4cbd94a
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-3.png
 differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-4.png
 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-4.png
new file mode 100644
index 0000000..c366fb7
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-4.png
 differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-5.png
 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-5.png
new file mode 100644
index 0000000..19cbc46
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-5.png
 differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-6.png
 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-6.png
new file mode 100644
index 0000000..8d231f3
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-6.png
 differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-7.png
 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-7.png
new file mode 100644
index 0000000..8528abf
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/new-toolbar-7.png
 differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/result-1.png 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/result-1.png
new file mode 100644
index 0000000..5fc6561
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/result-1.png 
differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/result-2.png 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/result-2.png
new file mode 100644
index 0000000..9b9f309
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/result-2.png 
differ
diff --git 
a/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/result-3.png 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/result-3.png
new file mode 100644
index 0000000..8f357e9
Binary files /dev/null and 
b/netbeans.apache.org/src/content/tutorials/images/nbm-googlebar/result-3.png 
differ
diff --git a/netbeans.apache.org/src/content/tutorials/nbm-google.asciidoc 
b/netbeans.apache.org/src/content/tutorials/nbm-google.asciidoc
index 37cf6f6..e96abbb 100644
--- a/netbeans.apache.org/src/content/tutorials/nbm-google.asciidoc
+++ b/netbeans.apache.org/src/content/tutorials/nbm-google.asciidoc
@@ -27,77 +27,73 @@
 :toc-title:
 :icons: font
 :experimental:
-:description: NetBeans Platform Plugin Quick Start - Apache NetBeans
+:description: Apache NetBeans Platform Plugin Quick Start
+:reviewed: 2020-12-01
 :keywords: Apache NetBeans Platform, Platform Tutorials, NetBeans Platform 
Plugin Quick Start
 
-Welcome to NetBeans plugin development!
+Welcome to Apache NetBeans plugin development!
 
-This tutorial provides a simple and quick introduction to the NetBeans plugin 
development workflow by walking you through the creation of a new toolbar for 
any NetBeans Platform application. Once you are done with this tutorial, you 
will have a general understanding of how to create, build, and install plugins 
for the NetBeans Platform.
+This tutorial provides a simple and quick introduction to the Apache NetBeans 
plugin development workflow by walking you through the creation of a new 
toolbar for any Apache NetBeans Platform application. Once you are done with 
this tutorial, you will know how to create, build, and install plugins for the 
Apache NetBeans Platform.
 
-After you finish this tutorial, you can move on to the  
link:https://netbeans.apache.org/kb/docs/platform.html[NetBeans Platform 
learning trail]. The learning trail provides comprehensive tutorials that 
highlight a wide range of NetBeans APIs for a variety of application types. If 
you do not need to do a "Hello World" tutorial, you can skip the instructions 
that follow and jump straight to the learning trail.
-
-NOTE:  This document uses NetBeans IDE 8.0 and NetBeans Platform 8.0. If you 
are using an earlier version, see  link:74/nbm-google.html[the previous version 
of this document].
-
-
-
-
-
-
-
-For troubleshooting purposes, you are welcome to download the  
link:http://web.archive.org/web/20170409072842/http://java.net/projects/nb-api-samples/show/versions/8.0/tutorials/GoogleToolbar[completed
 tutorial source code].
+After you finish this tutorial, you can move on to the  
link:https://netbeans.apache.org/kb/docs/platform.html[NetBeans Platform 
learning trail]. The learning trail provides comprehensive tutorials that 
highlight a wide range of Apache NetBeans APIs for a variety of application 
types. If you do not need to do a "Hello World" tutorial, you can skip the 
instructions that follow and jump straight to the learning trail.
 
 The toolbar you create in this tutorial will look as follows:
 
+image::images/nbm-googlebar/google-result.png[]
 
-image::images/google-result.png[]
+The concept is that the user enters some text, presses kbd:Enter, and the 
IDE's default browser opens and the text in the toolbar is sent to a Google 
search, with the results available in the open browser.
 
-When the user presses Enter in the toolbar above, the IDE's default browser 
opens and the text in the toolbar is sent to a Google search, with the results 
available in the open browser.
-
-To create this toolbar, you will use the  
link:http://bits.netbeans.org/dev/javadoc/[NetBeans APIs] to enhance the 
NetBeans Platform's feature set. Specifically, you will create and register an 
action invoked by a button created by the NetBeans Platform in the toolbar. You 
will then create a  ``JPanel``  containing a  ``JLabel``  and  ``JTextField``  
as GUI components. Finally, you will implement  
link:http://bits.netbeans.org/dev/javadoc/org-openide-util/org/openide/util/actions/Present
 [...]
-
-Do some background reading before diving into this tutorial. In particular, 
read the  
link:http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html[Modules
 API Reference] document, which explains what modules are and provides some 
context for this tutorial. Also note that there is an extensive Reference 
Material section on the  
link:https://netbeans.apache.org/kb/docs/platform.html[NetBeans Platform 
Learning Trail].
+To create this toolbar, you will use the  
link:https://bits.netbeans.org/dev/javadoc/[NetBeans APIs] to enhance the 
Apache NetBeans Platform's feature set. Specifically, you will create and 
register an action invoked by a button created by the NetBeans Platform in the 
toolbar. You will then create a  ``JPanel``  containing a  ``JLabel``  and  
``JTextField``  as GUI components. Finally, you will implement  
link:https://bits.netbeans.org/dev/javadoc/org-openide-util/org/openide/util/action
 [...]
 
+If it would help you, do some background reading before diving into this 
tutorial. In particular, you might like to read the  
link:https://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html[Modules
 API Reference] document, which explains what modules are and provides some 
context for this tutorial. Also note that there is an extensive Reference 
Material section on the  
link:https://netbeans.apache.org/kb/docs/platform.html[NetBeans Platform 
Learning  [...]
 
+The completed tutorial source code is also available as 
link:https://github.com/bradh/GoogleBar[a GitHub repository].
 
 == Setting up the Module Project
 
-We begin by creating the source structure common to all NetBeans Platform 
modules. Read the  
link:http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html[Modules
 API Reference] for details.
+We begin by creating the source structure common to all NetBeans Platform 
modules. Read the  
link:https://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html[Modules
 API Reference] for details.
 
 
 [start=1]
-1. Choose File > New Project (Ctrl+Shift+N). Under Categories, select NetBeans 
Modules. Under Projects, select Module: 
-image::images/new-project-0.png[] 
+1. Choose menu:File[New Project] (kbd:[Ctrl+Shift+N]). Under Categories, 
expand Java with Ant, and select NetBeans Modules. Under Projects, select 
Module: 
+
+image::images/nbm-googlebar/new-project-0.png[]
 
 The difference between the 4 templates above is as follows:
 
 * *NetBeans Platform Application.* A project that groups a set of module 
projects and library wrapper module projects that have dependencies on each 
other, and lets you deploy them together as a unit. Automatically included are 
a subset of the modules that make up the NetBeans Platform.
-* *Module Suite.* Same as above, except that the pre-included modules are more 
than only those relating to the NetBeans Platform—in this case, all the modules 
that make up NetBeans IDE are included as well.
+* *Module Suite.* Same as above, except that the pre-included modules are more 
than only those relating to the NetBeans Platform — in this case, all the 
modules that make up NetBeans IDE are included as well.
 * *Library Wrapper Module.* A project that puts a library JAR file on its 
classpath and exports some or all of the JAR file's packages from the module as 
public packages.
 * *Module.* A project for implementing the functionality, business logic, and 
user interface of a module or application built on the NetBeans Platform.
-Click Next.
+
+Click btn:[Next].
 
 [start=2]
 1. In the Name and Location panel:
 * In the Project Name field, type  ``GoogleToolbar`` .
 * In the Project Location field, change the value to any directory on your 
computer where the module will be stored.
 
-If you see the below, click Next. 
+It should look similar to this:
 
+image::images/nbm-googlebar/new-project-1.png[] 
 
-image::images/new-project-1.png[] 
-
+Click btn:[Next].
 
 [start=3]
 1. In the Basic Module Configuration panel:
 * Type  ``org.myorg.googletoolbar``  in "Code Name Base", which defines the 
unique string identifying the module you are creating. The code name base is 
also used as the main package of the module, i.e., your main package will be 
"org.myorg.googletoolbar".
 * Do not select the "Generate OSGi Bundle" checkbox, since we will be using 
the default NetBeans module system, rather than OSGi.
 
-image::images/new-project-2.png[] If you see the above, click Finish.
+It should look similar to this:
+
+image::images/nbm-googlebar/new-project-2.png[]
+
+Click btn:[Finish].
 
 The IDE creates the  ``GoogleToolbar``  project: 
 
 
-image::images/new-project-3.png[]
+image::images/nbm-googlebar/new-project-3.png[]
 
 A "project" is a NetBeans IDE compilation/deployment unit. It contains a Build 
Script, as shown above, which on disk is named "build.xml" file. This is an Ant 
script for compiling and running the project. The project contains all of your 
sources. The project opens in the IDE. You can view its logical structure in 
the Projects window (Ctrl+1) and its file structure in the Files window 
(Ctrl+2).
 
@@ -106,20 +102,20 @@ If you expand the Important Files node, you can open the 
Module Manifest, shown
 
 [source,java]
 ----
-
 Manifest-Version: 1.0
+AutoUpdate-Show-In-Client: true
 OpenIDE-Module: org.myorg.googletoolbar
 OpenIDE-Module-Localizing-Bundle: org/myorg/googletoolbar/Bundle.properties
 OpenIDE-Module-Specification-Version: 1.0
 ----
 
-For details on these NetBeans-specific manifest keys, read the  
link:http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html[NetBeans
 Modules API] Javadoc description.
+For details on these NetBeans-specific manifest keys, check the  
link:http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html[NetBeans
 Modules API] Javadoc description.
 
 
 
 == Coding the Module
 
-In order to create a Google toolbar, you need to complete the following steps:
+In order to create a Google toolbar, we will need to complete the following 
steps:
 
 * <<creating-action,Create the Action>>
 * <<creating-panel,Create the Toolbar>>
@@ -129,26 +125,37 @@ In order to create a Google toolbar, you need to complete 
the following steps:
 
 In this section, you use the New Action wizard in NetBeans IDE to create a new 
Action. An Action is a piece of code invoked by the user to do something in the 
application. An Action can be invoked from a menu item, toolbar button, and 
keyboard shortcut in the application.
 
-NOTE:  As you will see, the New Action wizard creates a Java class with 
annotations. At compile-time, the annotations are converted into XML elements 
in a file contributed to the virtual filesystem of the application, which is 
how an Action is registered in the application. For many questions and answers 
relating to the creation and registration of Actions in the NetBeans Platform, 
see  
link:https://netbeans.apache.org/wiki/index.asciidoc#_actions:_how_to_add_things_to_files.2c_folders.2
 [...]
+NOTE:  As you will see, the New Action wizard creates a Java class with 
annotations. At compile-time, the annotations are converted into XML elements 
in a file contributed to the virtual filesystem of the application, which is 
how an Action is registered in the application. For more information relating 
to the creation and registration of Actions in the NetBeans Platform, see  
link:https://netbeans.apache.org/wiki/index.asciidoc#_actions:_how_to_add_things_to_files.2c_folders.2c_menus.2c
 [...]
 
 
 [start=1]
-1. Right-click the GoogleToolbar project node and choose New > Action. If 
Action is not displayed, access it by choosing Other, then in the New File 
wizard under Categories, select Module Development and then Action: 
-image::images/new-action-0.png[] Click Next.
+1. Right-click the GoogleToolbar project node and choose New > Action:
+
+image::images/nbm-googlebar/new-action-0.png[]
+
+If Action is not displayed, access it by choosing Other, then in the New File 
wizard under Categories, select Module Development and then Action.
+
+image::images/nbm-googlebar/new-action-1.png[]
+
+Click btn:[Next].
 
 [start=2]
 1. In the Action Type panel: 
 * Keep the default setting, which will let the Action be unconditionally 
enabled, as shown below.
 
-image::images/new-action-1.png[] Click Next.
+image::images/nbm-googlebar/new-action-2.png[]
+
+Click btn:[Next].
 
 [start=3]
 1. In the GUI Registration panel: 
 * Select File from the Category drop-down list. The Category drop-down list 
controls where an action is shown in the Keyboard Shortcuts editor in the IDE.
 * Deselect Global Menu Item because we will not need a menu item.
-* Select Global Toolbar Button. In the Toolbar drop-down list, select File, 
then in the Position drop-down list, select the toolbar button's position 
within the toolbar, such as the one shown below.
+* Select Global Toolbar Button. In the Toolbar drop-down list, select File, 
then in the Position drop-down list, select the toolbar button's position 
within the toolbar as "Save All - HERE" as shown below.
+
+image::images/nbm-googlebar/new-action-3.png[]
 
-image::images/new-action-2.png[] Click Next.
+Click btn:[Next].
 
 [start=4]
 1. 
@@ -161,30 +168,31 @@ In the Name, Icon, and Location panel:
 If needed, here are two icons you can use:
 
 * 16x16: 
-image::images/google.png[]
+
+image::images/nbm-googlebar/google.png[]
+
 * 24x24: 
-image::images/google24.png[]
 
-However, note that in the end, you will not use the icon at all once you have 
created the toolbar—instead, you will display the JPanel that you create in the 
next section.
+image::images/nbm-googlebar/google24.png[]
 
-The Name, Icon, and Location panel of the New Action wizard should now look 
like this:
+However, note that by the end of this tutorial you will not use the icon at 
all once you have created the toolbar. Instead, you will display the JPanel 
that you create in the next section.
 
+The Name, Icon, and Location panel of the New Action wizard should now look 
like this:
 
-image::images/new-action-3.png[]
+image::images/nbm-googlebar/new-action-4.png[]
 
 [start=5]
-1. 
-Click Finish. The module source structure is now as follows: 
+1. Click btn:[Finish]. The module source structure is now as follows: 
 
+image::images/nbm-googlebar/new-action-5.png[]
 
-image::images/new-action-4.png[] 
+Additional dependencies have been included in the Libraries section, and 
additional sources have been added.
 
- ``GoogleActionListener.java`` , which you should see in the Projects window, 
has this content:
+``GoogleActionListener.java`` , which you should see in the Projects window, 
has this content:
 
 
 [source,java]
 ----
-
 package org.myorg.googletoolbar;
 
 import java.awt.event.ActionEvent;
@@ -194,83 +202,91 @@ import org.openide.awt.ActionReference;
 import org.openide.awt.ActionRegistration;
 import org.openide.util.NbBundle.Messages;
 
-link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/ActionID.html[@ActionID](
+@ActionID(
         category = "File",
-        id = "org.myorg.googletoolbar.GoogleActionListener")
-link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/ActionRegistration.html[@ActionRegistration](
+        id = "org.myorg.googletoolbar.GoogleActionListener"
+)
+@ActionRegistration(
         iconBase = "org/myorg/googletoolbar/google.png",
-        displayName = "#CTL_GoogleActionListener")
-link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/ActionReference.html[@ActionReference](
-        path = "Toolbars/File",
-        position = 0)
-link:http://bits.netbeans.org/dev/javadoc/org-openide-util/org/openide/util/NbBundle.Messages.html[@Messages]("CTL_GoogleActionListener=Google")
+        displayName = "#CTL_GoogleActionListener"
+)
+@ActionReference(path = "Toolbars/File", position = 500)
+@Messages("CTL_GoogleActionListener=Google")
 public final class GoogleActionListener implements ActionListener {
 
     @Override
     public void actionPerformed(ActionEvent e) {
         // TODO implement action body
     }
-
 }
 ----
 
-NOTE:  When you build the module, which is done automatically in the next step 
when you run the module, the class annotations that you see above will be 
converted to XML tags in a file that will be contributed to the virtual 
filesystem of the application. The XML file will be named "generated-layer.xml" 
and will be found in the "build\classes\META-INF" folder of your module, which 
you can see if the Files window (Ctrl-2) is open in the IDE. This file is 
created at compile-time and contai [...]
+NOTE:  When you build the module, which is done automatically in the next step 
when you run the module, the class annotations that you see above will be 
converted to XML tags in a file that will be contributed to the virtual 
filesystem of the application. The XML file will be named "generated-layer.xml" 
and will be found in the "build\classes\META-INF" folder of your module, which 
you can see if the Files window (Ctrl-2) is open in the IDE. This file is 
created at compile-time and contai [...]
 
 
 [start=6]
 1. In the Projects window, right-click the  ``GoogleToolbar``  project node 
and choose Run. The module is built and installed in a new instance of the IDE 
(which is currently set to be the target platform). By default, the default 
target platform is the version of the IDE you are currently working in. The 
target platform opens so that you can try out the new module. You should be 
able to see your button and click it: 
-image::images/result-1.png[]
 
-In the next section, you change the  ``JButton``  that has been created for 
you in the toolbar by the NetBeans Platform with your own  ``JComponent`` .
+image::images/nbm-googlebar/result-1.png[]
 
+Close the target platform instance:
+
+image::images/nbm-googlebar/result-2.png[]
 
 === Creating the Toolbar
 
-In this section, you create a  ``JPanel``  that will replace the  ``JButton``  
that the NetBeans Platform created for you in the previous section.
+In this section, we will create a  ``JPanel``  that will replace the  
``JButton``  that the Action wizard created in the previous section.
 
 
 [start=1]
-1. Right-click the project node and choose New > Other. Under Categories, 
select Swing GUI Forms. Under File Types, select JPanel Form: 
+1. Right-click the project node and choose New > Other.
 
+image::images/nbm-googlebar/new-toolbar-0.png[]
 
-image::images/new-toolbar-0.png[]
+Under Categories, select Swing GUI Forms. Under File Types, select JPanel 
Form: 
 
-Click Next.
+image::images/nbm-googlebar/new-toolbar-1.png[]
 
+Click btn:[Next].
 
 [start=2]
 1. In the Name and Location panel, type  ``GooglePanel``  as the Class Name 
and select the package from the drop-down list: 
 
+image::images/nbm-googlebar/new-toolbar-2.png[]
 
-image::images/new-toolbar-1.png[]
+Click btn:[Finish].  
 
-Click Finish.  ``GooglePanel.java``  is added to the package and is opened in 
the Design view in the Source Editor.
+``GooglePanel.java``  is added to the package and is opened in the Design view 
in the Source Editor.
 
 
 [start=3]
 1. Place the cursor at the bottom right-hand corner of the JPanel, then select 
the JPanel and drag the cursor to resize it, so that its width and length 
resemble that of a toolbar, as shown below: 
-image::images/new-toolbar-2.png[]
+
+image::images/nbm-googlebar/new-toolbar-3.png[]
 
 [start=4]
-1. Drag a  ``JTextField``  item and a  ``JLabel``  item from the Palette 
(Ctrl+Shift+8) directly into the  ``JPanel`` , then resize the  ``JPanel``  and 
the other two items so that they fit snugly together. Finally, press F2 on the  
``JLabel``  and change its text to  ``Google:`` , then delete the default text 
in the  ``JTextField`` . (If you click F2 over the  ``JLabel``  and the  
``JTextField`` , their display text will become editable.) Your  ``JPanel``  
should now resemble the image  [...]
-image::images/new-toolbar-3.png[]
+1. Drag a  Label (``JLabel``) item and a Text Field (``JTextField``)  item 
from the Palette (Ctrl+Shift+8) directly into the  ``JPanel`` , then resize the 
 ``JPanel``  and the other two items so that they fit snugly together. Finally, 
press F2 on the  ``JLabel``  and change its text to  ``Google:`` , then delete 
the default text in the  ``JTextField`` . 
+
+If you click F2 over the  ``JLabel``  and the  ``JTextField`` , their display 
text will become editable. You can also do this using the properties dialog.
+
+Your  ``JPanel``  should now resemble the image shown below: 
+
+image::images/nbm-googlebar/new-toolbar-4.png[]
+
+You can set other UI properties as required.
 
 [start=5]
 1. Double-click on the JTextField (or right-click on it and choose Events > 
Action > actionPerformed). This generates a  ``jTextField1ActionPerformed()``  
method in the  ``GooglePanel.java``  source code, which displays in the Source 
Editor. Fill out the  ``jTextField1ActionPerformed``  method as follows 
(inserted text shown in *bold*):
 
 [source,java]
 ----
-
-private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {
-    *
+private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {      
                                      
     try {
         String searchText = URLEncoder.encode(jTextField1.getText(), "UTF-8");
-        URLDisplayer.getDefault().showURL
-           (new 
URL("http://www.google.com/search?hl=en&amp;q="+searchText+"&amp;btnG=Google+Search";));
-    } catch (Exception eee){
-        return;//nothing much to do
+        URLDisplayer.getDefault().showURL(new 
URL("https://www.google.com/search?q="; + searchText));
+    } catch (UnsupportedEncodingException | MalformedURLException eee) {
+        //nothing much to do
     }
-    *
 }
 ----
 
@@ -279,28 +295,35 @@ If you need to, right-click in the Source Editor and 
choose Format (Alt+Shift+F)
 
 [start=6]
 1. Right-click in the Source Editor and choose Fix Imports (Ctrl+Shift+I). The 
Fix All Imports dialog displays, listing suggested paths for unrecognized 
classes: 
-image::images/new-toolbar-4.png[] Click OK. The IDE creates the following 
import statements at the top of the class:
+
+image::images/nbm-googlebar/new-toolbar-5.png[]
+
+Click btn:[OK].
+
+The IDE creates the following import statements at the top of the class:
 
 [source,java]
 ----
-
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLEncoder;
-import  
link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/HtmlBrowser.URLDisplayer.html[org.openide.awt.HtmlBrowser.URLDisplayer];
+import org.openide.awt.HtmlBrowser.URLDisplayer;
 ----
 
 Also notice that all errors disappear from the Source Editor.
 
 [start=7]
 1. 
-Because the  ``JPanel``  you have created is the component that will be 
rendered in the toolbar, you need to implement  `` 
link:http://bits.netbeans.org/dev/javadoc/org-openide-util/org/openide/util/actions/Presenter.Toolbar.html[Presenter.Toolbar]``
  in the  ``ActionListener``  you created earlier, in order to display the  
``JPanel``  in the toolbar. Change the signature of Open  
``GoogleActionListener.java`` . so that  `` 
link:http://bits.netbeans.org/dev/javadoc/org-openide-util/org/o [...]
+Because the  ``JPanel``  you have created is the component that will be 
rendered in the toolbar, you need to implement  `` 
link:https://bits.netbeans.org/dev/javadoc/org-openide-util-ui/org/openide/util/actions/Presenter.Toolbar.html[Presenter.Toolbar]``
  in the  ``ActionListener``  you created earlier, in order to display the  
``JPanel``  in the toolbar.
+
+Change the signature of Open  ``GoogleActionListener.java`` . so that  `` 
link:https://bits.netbeans.org/dev/javadoc/org-openide-util-ui/org/openide/util/actions/Presenter.Toolbar.html[Presenter.Toolbar]``
  is implemented. When using  ``Presenter.Toolbar`` , you need to extend  
``AbstractAction`` , instead of implementing  ``ActionListener`` . Also, you 
can delete the "iconBase" attribute (as well as the icons from the source tree) 
because you no longer need an icon in this scenario.
 
 The result of these changes is as follows:
 
 
 [source,java]
 ----
-
 package org.myorg.googletoolbar;
 
 import java.awt.Component;
@@ -309,44 +332,57 @@ import javax.swing.AbstractAction;
 import org.openide.awt.ActionID;
 import org.openide.awt.ActionReference;
 import org.openide.awt.ActionRegistration;
+import org.openide.util.NbBundle.Messages;
 import org.openide.util.actions.Presenter;
 
 @ActionID(
         category = "File",
-        id = "org.myorg.googletoolbar.GoogleActionListener")
+        id = "org.myorg.googletoolbar.GoogleActionListener"
+)
 @ActionRegistration(
-link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/ActionRegistration.html#lazy()[lazy
 = false],
-        displayName = "NOT-USED")
-@ActionReference(
-        path = "Toolbars/File",
-        position = 0)
+        lazy = false,
+        displayName = "NOT-USED"
+)
+@ActionReference(path = "Toolbars/File", position = 500)
+@Messages("CTL_GoogleActionListener=Google")
 public final class GoogleActionListener extends AbstractAction implements 
Presenter.Toolbar {
 
     @Override
-    public Component getToolbarPresenter() {
-        return new GooglePanel();
+    public void actionPerformed(ActionEvent e) {
+        // delegated to toolbar
     }
 
     @Override
-    public void actionPerformed(ActionEvent e) {
-        //delegated to toolbar
+    public Component getToolbarPresenter() {
+        return new GooglePanel();
     }
-
 }
 ----
 
+``Presenter.Toolbar`` is provided in the Utilities library, which we need to 
add.
+
+[start=8]
+1. Click near to the relevant `import` statement, and select Search Module 
Dependency for org.openide.util.actions.Presenter:
+
+image::images/nbm-googlebar/new-toolbar-6.png[]
+
+The matching dependency is shown:
+
+image::images/nbm-googlebar/new-toolbar-6.png[]
+
+Click menu:[OK] to add the library module, which appears in the Project view.
 
 [start=8]
 1. Run the module again. This time, instead of a  ``JButton`` , you should see 
your  ``JPanel`` . Type a search string in the text field: 
 
 
-image::images/result-2.png[]
+image::images/nbm-googlebar/result-3.png[]
 
-Press Enter. The IDE's default browser starts up, if you have set one in the 
Options window. Above, the embedded browser is shown in action. The Google URL 
and your search string are sent to the browser and a search is performed. When 
the search results are returned, you can view them in the browser.
+Press Enter. The IDE's default browser starts up, if you have set one in the 
Options window. The Google URL and your search string are sent to the browser 
and a search is performed. When the search results are returned, you can view 
them in the browser.
 
 In this section, you have created a  ``JPanel``  that displays a  
``JTextField``  and a  ``JLabel`` . You have presented it in the NetBeans 
toolbar, thanks to the  ``Presenter.Toolbar``  class. When the user presses 
Enter in the  ``JTextField`` , its content is sent to a Google search. The HTML 
browser opens and you see the result of the Google search. The  
``ActionListener``  is used to integrate the  ``JPanel``  within the 
application's toolbar, as registered via the annotations in the [...]
 
-link:http://netbeans.apache.org/community/mailing-lists.html[ Send Us Your 
Feedback]
+link:https://netbeans.apache.org/community/mailing-lists.html[ Send Us Your 
Feedback]
 
 
 
@@ -355,7 +391,7 @@ 
link:http://netbeans.apache.org/community/mailing-lists.html[ Send Us Your Feedb
 This concludes the NetBeans Plugin Quick Start. This document has described 
how to create a plugin that adds a Google Search toolbar to the IDE. For more 
information about creating and developing plugins, see the following resources:
 
 *  link:https://netbeans.apache.org/kb/docs/platform.html[NetBeans Platform 
Learning Trail]
-*  link:http://bits.netbeans.org/dev/javadoc/[NetBeans API Javadoc]
+*  link:https://bits.netbeans.org/dev/javadoc/[NetBeans API Javadoc]
 * NetBeans API classes used in this tutorial:
-*  `` 
link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/HtmlBrowser.URLDisplayer.html[HtmlBrowser.URLDisplayer]``
 
-*  `` 
link:http://bits.netbeans.org/dev/javadoc/org-openide-util/org/openide/util/actions/Presenter.Toolbar.html[Presenter.Toolbar]``
 
+*  `` 
link:https://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/HtmlBrowser.URLDisplayer.html[HtmlBrowser.URLDisplayer]``
 
+*  `` 
link:https://bits.netbeans.org/dev/javadoc/org-openide-util/org/openide/util/actions/Presenter.Toolbar.html[Presenter.Toolbar]``
 


---------------------------------------------------------------------
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

Reply via email to