This is an automated email from the ASF dual-hosted git repository.

vieiro 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 ccb514b  [tutorials] Groovy tutorial updated (#120)
ccb514b is described below

commit ccb514bb204034aa46923bb61585b09ba75b74f8
Author: Antonio Vieiro <vie...@users.noreply.github.com>
AuthorDate: Mon Jan 14 16:33:31 2019 +0100

    [tutorials] Groovy tutorial updated (#120)
    
    - Removing feedback link.
    - Updated list numbering.
---
 .../kb/docs/java/groovy-quickstart.asciidoc        | 30 ++++++++++++----------
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git 
a/netbeans.apache.org/src/content/kb/docs/java/groovy-quickstart.asciidoc 
b/netbeans.apache.org/src/content/kb/docs/java/groovy-quickstart.asciidoc
index 5a7fc2f..7469058 100644
--- a/netbeans.apache.org/src/content/kb/docs/java/groovy-quickstart.asciidoc
+++ b/netbeans.apache.org/src/content/kb/docs/java/groovy-quickstart.asciidoc
@@ -30,16 +30,16 @@
 
 This document gets you started with link:http://groovy.codehaus.org/[+Groovy+] 
in NetBeans IDE. You will create a Java application, add a JFrame, and retrieve 
a simple message from a Groovy file.
 
-
 image::images/netbeans-stamp-80-74-73.png[title="Content on this page applies 
to the NetBeans IDE 7.2, 7.3, 7.4 and 8.0"]
 
+== Requirements
 
-*To follow this tutorial, you need the following software and resources.*
+To follow this tutorial, you need the following software and resources.
 
 |===
 |Software or Resource |Version Required 
 
-|link:https://netbeans.org/downloads/index.html[+NetBeans IDE+] |7.2, 7.3, 
7.4, 8.0, Java bundle 
+|link:http://netbeans.apache.org/download/index.html[+NetBeans IDE+] |7.2, 
7.3, 7.4, 8.0, or up Java bundle 
 
 |link:http://www.oracle.com/technetwork/java/javase/downloads/index.html[+Java 
Development Kit (JDK)+] |version 7 or 8 
 
@@ -57,8 +57,10 @@ Support for Groovy is disabled by default when you install 
the Java version of t
 
 Alternatively, you can type `groovy` in the Search field to filter the list of 
plugins.
 
+[start=4]
 4. Select the checkbox for the Groovy and Grails plugin and click Activate.
 image::images/groovy-plugin.png[title="Groovy plugin selected in the Plugins 
manager"]
+[start=5]
 5. Click Activate in the NetBeans IDE Installer window to activate the Groovy 
plugin.
 6. Click Finish in the NetBeans IDE Installer window after the installation is 
complete and then click Close in the Plugins manager.
 
@@ -82,15 +84,18 @@ In this section you will create a JFrame and a Groovy class.
 1. Right-click the project node in the Projects window and choose New > Other 
to open the New File dialog box.
 2. Select JFrame Form in the Swing GUI Forms category. Click Next.
 image::images/groovy-newjframe.png[title="JFrame Form template in New File 
wizard"]
+[start=3]
 3. Type *DisplayJFrame* as the Class Name.
 4. Type *org.demo* as the Package. Click Finish.
 image::images/groovy-newjframe2.png[title="Name and Location panel in New 
JFrame Form wizard"]
 
 When you click Finish the IDE creates the JFrame form and opens the file in 
the editor.
 
+[start=5]
 5. Right-click the project node in the Projects window and choose New > Other 
to open the New File dialog box.
 6. Select Groovy Class in the Groovy category. Click Next.
 image::images/groovy-newgroovyclass.png[title="Groovy Class template in New 
File wizard"]
+[start=7]
 7. Type *GreetingProvider* as the Class Name.
 8. Select the  ``org.demo``  package from the Package dropdown list. Click 
Finish.
 
@@ -106,37 +111,40 @@ In this section, you will code the interaction between 
the Groovy file and the J
 1. Open  ``GreetingProvider.groovy``  in the editor (if not already open).
 2. Define a greeting variable within the class definition by adding the 
following code (in bold). Save your changes.
 
-[source,java]
+[source,groovy]
 ----
 
 class GreetingProvider {
 
-    *def greeting = "Hello from Groovy"*
+    def greeting = "Hello from Groovy"
 
 }
 ----
+[start=3]
 3. Open  ``DisplayJFrame.java``  in the editor (if not already open) and click 
the Design tab.
 4. Open the Palette (Window > Palette from the main menu) and drag and drop a 
Text Field element ( ``jTextField`` ) from the Palette and into the JFrame.
 image::images/groovy-jtextfield.png[title="JTextfield in DesignJFrame open in 
the Design view of the editor"]
+[start=5]
 5. Click the Source tab in the editor and add the following code at the top of 
the class body to instantiate the Groovy class and in the constructor to call 
the  ``getGreeting()``  method in the Groovy class.
 
 [source,java]
 ----
 
-public class DisplayJFrameForm extends javax.swing.JFrame {*
+public class DisplayJFrameForm extends javax.swing.JFrame {
 
-    GreetingProvider provider = new GreetingProvider();*
+    GreetingProvider provider = new GreetingProvider();
 
     public DisplayJFrame() {
         initComponents();
-        *String greeting = provider.getGreeting().toString();
-        jTextField1.setText(greeting);*
+        String greeting = provider.getGreeting().toString();
+        jTextField1.setText(greeting);
     }
 ----
 
 You can use code completion in the Java class to find the methods you need in 
the Groovy class.
 
 image::images/groovy-codecompletion.png[title="Code completion in the editor"]
+[start=6]
 6. Right-click the project node in the Projects window and choose Run.
 
 When you choose Run the IDE compiles and launches the application.
@@ -147,10 +155,6 @@ In the window of the application you can see that the text 
from the Groovy class
 
 You now know how to create a basic Java application that interacts with Groovy.
 
-link:/about/contact_form.html?to=3&subject=Feedback:%20NetBeans%20IDE%20Groovy%20Quick%20Start[+Send
 Feedback on This Tutorial+]
-
-
-
 == See Also
 
 NetBeans IDE also supports the Grails web framework, which uses the Groovy 
language in Java web development. To learn how to use the Grails framework with 
NetBeans IDE, see link:../web/grails-quickstart.html[+Introduction to the 
Grails Framework+].


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

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

Reply via email to