You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: netbeans.apache.org/src/content/tutorials/68/nbm-google.asciidoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -189,11 +189,11 @@ image::images/google_60_add-module-dependency.png[] Click OK, then click OK agai
189
189
1. Right-click in the Source Editor and choose Fix Imports (Alt+Shift+F). The Fix All Imports dialog displays, listing suggested paths for unrecognized classes:
190
190
image::images/google_60_fix-all-imports.png[] Click OK. The IDE creates the following import statements for ``GooglePanel.java`` :
StatusDisplayer.getDefault().setStatusText("Not a Java file: " + fileObject.getPath());
220
220
} else {
@@ -257,10 +257,10 @@ In this section, we are introduced to our first explicitly invoked "Retouche" ta
257
257
[start=1]
258
258
1. Replace the "Hurray!" message in the ``actionPerformed`` method with this line: link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-java-source/org/netbeans/api/java/source/JavaSource.html#runUserActionTask(org.netbeans.api.java.source.Task,%20boolean)[javaSource.runUserActionTask]
259
259
260
-
[source,java]
260
+
[source,java,subs="verbatim,macros,quotes"]
261
261
----
262
262
263
-
(new link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-java-source/org/netbeans/api/java/source/Task.html[Task]< link:https://bits.netbeans.org/dev/javadoc/org-netbeans-modules-java-source/org/netbeans/api/java/source/CompilationController.html[CompilationController]>());
263
+
(new link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-java-source/org/netbeans/api/java/source/Task.html[Task]< link:https://bits.netbeans.org/dev/javadoc/org-netbeans-modules-java-source/org/netbeans/api/java/source/CompilationController.html[CompilationController]>());
264
264
----
265
265
266
266
You should now see a lightbulb in the editor's left sidebar, as shown here:
@@ -279,7 +279,7 @@ Click the lightbulb in the editor. Alternatively, put the caret in the line and
279
279
[start=2]
280
280
1. Tweak the generated method slightly, by adding a ``true`` boolean to the end of the method, and letting the IDE wrap the snippet in a try/catch block. At the end, the result should be as follows:
281
281
282
-
[source,java]
282
+
[source,java,subs="verbatim,quotes"]
283
283
----
284
284
285
285
public void actionPerformed(ActionEvent ev) {
@@ -310,15 +310,15 @@ public void actionPerformed(ActionEvent ev) {
310
310
[start=3]
311
311
1. Implement the ``run()`` method as follows:
312
312
313
-
[source,java]
313
+
[source,java,subs="macros"]
314
314
----
315
315
316
316
@Override
317
317
public void run(CompilationController compilationController) throws Exception {
1. Next, instead of printing all the elements to the Output window, we will only print the element under the caret. Only replace the ``visitClass`` method, with the code highlighted below:
451
451
452
-
[source,java]
452
+
[source,java,subs="quotes"]
453
453
----
454
454
455
455
private class MemberVisitor extends TreePathScanner<Void, Void> {
@@ -500,7 +500,7 @@ In this section, you allow the user to show the currently selected Customer obje
500
500
[start=1]
501
501
1. Start by tweaking the ``CustomerViewer`` module so that the current ``Customer`` object is added to the viewer window's ``Lookup`` whenever a new ``Node`` is selected. Do this by adding the current ``Customer`` object to the ``Lookup`` of the Node, as follows (note the parts in bold):
502
502
503
-
[source,java]
503
+
[source,java,subs="quotes"]
504
504
----
505
505
506
506
@Override
@@ -744,7 +744,7 @@ When the ``handleSave`` method is invoked, the ``Savable`` is unregistered f
744
744
NOTE: All the code below is an inner class within ``CustomerEditorTopComponent`` .
745
745
746
746
747
-
[source,java]
747
+
[source,java,subs="macros"]
748
748
----
749
749
750
750
private static final Icon ICON = ImageUtilities.loadImageIcon("org/shop/editor/Icon.png", true);
@@ -1021,7 +1021,7 @@ public void resetFields() {
1021
1021
[start=2]
1022
1022
1. In the `` link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/netbeans/spi/actions/AbstractSavable.html[AbstractSavable]`` , ensure that a return of ``null`` indicates that a new entry is saved, instead of an existing entry being updated:
Copy file name to clipboardExpand all lines: netbeans.apache.org/src/content/tutorials/nbm-emf.asciidoc
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -338,17 +338,17 @@ The other OSGi-related dependencies you see in the screenshot above were added b
338
338
1. Create a new Java class named `LibraryNode`, which provides a new Node for the Library object, as well as a new Node for the Book object and Borrower object:
339
339
340
340
341
-
[source,java]
341
+
[source,java,subs="verbatim,macros"]
342
342
----
343
343
344
-
public class LibraryNode extends link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html[AbstractNode] {
344
+
public class LibraryNode extends link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html[AbstractNode] {
1. Create a new Java class named `LibraryChildFactory`, which is a factory class for creating new `LibraryNode`s:
400
400
401
401
402
-
[source,java]
402
+
[source,java,subs="verbatim,macros"]
403
403
----
404
404
405
-
public class LibraryChildFactory extends link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/ChildFactory.html[ChildFactory]<Library> {
405
+
public class LibraryChildFactory extends link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/ChildFactory.html[ChildFactory]<Library> {
@@ -467,10 +467,10 @@ public class LibraryChildFactory extends link:http://bits.netbeans.org/dev/java
467
467
1. Create a new Java class named `LibraryViewer`, which provides the window where the `LibraryNode` will be displayed:
468
468
469
469
470
-
[source,java]
470
+
[source,java,subs="macros"]
471
471
----
472
472
473
-
public class LibraryViewer extends link:http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/TopComponent.html[TopComponent] implements link:http://bits.netbeans.org/dev/javadoc/org-openide-explorer/org/openide/explorer/ExplorerManager.Provider.html[ExplorerManager.Provider] {
473
+
public class LibraryViewer extends link:http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/TopComponent.html[TopComponent] implements link:http://bits.netbeans.org/dev/javadoc/org-openide-explorer/org/openide/explorer/ExplorerManager.Provider.html[ExplorerManager.Provider] {
474
474
475
475
private ExplorerManager em = new ExplorerManager();
476
476
@@ -480,7 +480,7 @@ public class LibraryViewer extends link:http://bits.netbeans.org/dev/javadoc/or
480
480
//Set the layout of the window:
481
481
setLayout(new BorderLayout());
482
482
//Create a new BeanTreeView:
483
-
link:http://bits.netbeans.org/dev/javadoc/org-openide-explorer/org/openide/explorer/view/BeanTreeView.html[BeanTreeView] btv = new BeanTreeView();
483
+
link:http://bits.netbeans.org/dev/javadoc/org-openide-explorer/org/openide/explorer/view/BeanTreeView.html[BeanTreeView] btv = new BeanTreeView();
0 commit comments