This is an automated email from the ASF dual-hosted git repository.
skygo 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 c2a8aa127 cleanup code block
new 68fbc76e1 Merge pull request #611 from ebarboni/palettetutorial
c2a8aa127 is described below
commit c2a8aa127a662c506dda0c0f5d4511556e4cc252
Author: Eric Barboni <[email protected]>
AuthorDate: Wed Sep 21 17:24:34 2022 +0200
cleanup code block
---
.../src/content/tutorials/68/nbm-google.asciidoc | 4 +-
.../src/content/tutorials/71/nbm-idioms.asciidoc | 19 ----
.../src/content/tutorials/72/nbm-idioms.asciidoc | 19 ----
.../src/content/tutorials/73/nbm-idioms.asciidoc | 19 ----
.../src/content/tutorials/74/nbm-idioms.asciidoc | 19 ----
.../src/content/tutorials/80/nbm-idioms.asciidoc | 19 ----
.../src/content/tutorials/nbm-copyfqn.asciidoc | 22 ++--
.../src/content/tutorials/nbm-crud.asciidoc | 8 +-
.../src/content/tutorials/nbm-emf.asciidoc | 18 +--
.../src/content/tutorials/nbm-feedreader.asciidoc | 33 +++---
.../src/content/tutorials/nbm-idioms.asciidoc | 19 ----
.../content/tutorials/nbm-javacc-parser.asciidoc | 122 ++++++++++-----------
.../src/content/tutorials/nbm-javafx.asciidoc | 4 +-
.../tutorials/nbm-mark-occurrences.asciidoc | 26 ++---
.../src/content/tutorials/nbm-nodesapi3.asciidoc | 81 +++++++-------
.../src/content/tutorials/nbm-options.asciidoc | 14 +--
.../src/content/tutorials/nbm-paintapp.asciidoc | 6 +-
.../content/tutorials/nbm-palette-api1.asciidoc | 53 ++++-----
.../content/tutorials/nbm-palette-api2.asciidoc | 57 +++++-----
.../content/tutorials/nbm-porting-basic.asciidoc | 4 +-
.../content/tutorials/nbm-projecttypeant.asciidoc | 42 +++----
.../src/content/tutorials/nbm-test.asciidoc | 4 +-
.../src/content/tutorials/nbm-wizard.asciidoc | 14 +--
.../src/content/tutorials/nbm-workflow.asciidoc | 22 ++--
.../content/wiki/DevFaqAccessSourcesWeb.asciidoc | 4 +-
.../content/wiki/DevFaqDotSettingsFiles.asciidoc | 2 +-
.../src/content/wiki/DevFaqHelpGuidelines.asciidoc | 6 +-
.../wiki/DevFaqHowToChangeUpdateCenterURL.asciidoc | 2 +-
.../src/content/wiki/DevFaqMIMEResolver.asciidoc | 2 +-
.../src/content/wiki/DevFaqSignNbm.asciidoc | 2 +-
.../src/content/wiki/DevFaqWhatIsACluster.asciidoc | 71 +++++-------
31 files changed, 299 insertions(+), 438 deletions(-)
diff --git a/netbeans.apache.org/src/content/tutorials/68/nbm-google.asciidoc
b/netbeans.apache.org/src/content/tutorials/68/nbm-google.asciidoc
index 1add19abb..5ea682351 100644
--- a/netbeans.apache.org/src/content/tutorials/68/nbm-google.asciidoc
+++ b/netbeans.apache.org/src/content/tutorials/68/nbm-google.asciidoc
@@ -189,11 +189,11 @@ image::images/google_60_add-module-dependency.png[] Click
OK, then click OK agai
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:
image::images/google_60_fix-all-imports.png[] Click OK. The IDE creates the
following import statements for ``GooglePanel.java`` :
-[source,java]
+[source,java,subs="macros"]
----
import java.net.URL;
-import
link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/HtmlBrowser.URLDisplayer.html[org.openide.awt.HtmlBrowser.URLDisplayer];
+import
link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/HtmlBrowser.URLDisplayer.html[org.openide.awt.HtmlBrowser.URLDisplayer];
----
diff --git a/netbeans.apache.org/src/content/tutorials/71/nbm-idioms.asciidoc
b/netbeans.apache.org/src/content/tutorials/71/nbm-idioms.asciidoc
deleted file mode 100644
index 34d326889..000000000
--- a/netbeans.apache.org/src/content/tutorials/71/nbm-idioms.asciidoc
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-
diff --git a/netbeans.apache.org/src/content/tutorials/72/nbm-idioms.asciidoc
b/netbeans.apache.org/src/content/tutorials/72/nbm-idioms.asciidoc
deleted file mode 100644
index 34d326889..000000000
--- a/netbeans.apache.org/src/content/tutorials/72/nbm-idioms.asciidoc
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-
diff --git a/netbeans.apache.org/src/content/tutorials/73/nbm-idioms.asciidoc
b/netbeans.apache.org/src/content/tutorials/73/nbm-idioms.asciidoc
deleted file mode 100644
index 34d326889..000000000
--- a/netbeans.apache.org/src/content/tutorials/73/nbm-idioms.asciidoc
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-
diff --git a/netbeans.apache.org/src/content/tutorials/74/nbm-idioms.asciidoc
b/netbeans.apache.org/src/content/tutorials/74/nbm-idioms.asciidoc
deleted file mode 100644
index 34d326889..000000000
--- a/netbeans.apache.org/src/content/tutorials/74/nbm-idioms.asciidoc
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-
diff --git a/netbeans.apache.org/src/content/tutorials/80/nbm-idioms.asciidoc
b/netbeans.apache.org/src/content/tutorials/80/nbm-idioms.asciidoc
deleted file mode 100644
index 34d326889..000000000
--- a/netbeans.apache.org/src/content/tutorials/80/nbm-idioms.asciidoc
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-
diff --git a/netbeans.apache.org/src/content/tutorials/nbm-copyfqn.asciidoc
b/netbeans.apache.org/src/content/tutorials/nbm-copyfqn.asciidoc
index 87575fd13..d468b426e 100644
--- a/netbeans.apache.org/src/content/tutorials/nbm-copyfqn.asciidoc
+++ b/netbeans.apache.org/src/content/tutorials/nbm-copyfqn.asciidoc
@@ -207,14 +207,14 @@ In this section, we begin using one of the new "Retouche"
APIs, called link:htt
[start=1]
1. Fill out the ``actionPerformed`` method by adding the lines highlighted
below:
-[source,java]
+[source,java,subs="macros,quotes"]
----
public void actionPerformed(ActionEvent ev) {
*FileObject fileObject = context.getPrimaryFile();
-link:https://bits.netbeans.org/dev/javadoc/org-netbeans-modules-java-source/org/netbeans/api/java/source/JavaSource.html[JavaSource]
javaSource =
link:https://bits.netbeans.org/dev/javadocorg-netbeans-modules-java-source/org/netbeans/api/java/source/JavaSource.html#forFileObject(org.openide.filesystems.FileObject)[JavaSource.forFileObject(fileObject)];
+
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-modules-java-source/org/netbeans/api/java/source/JavaSource.html[JavaSource]
javaSource =
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-modules-java-source/org/netbeans/api/java/source/JavaSource.html#forFileObject-org.openide.filesystems.FileObject-[JavaSource.forFileObject(fileObject)];
if (javaSource == null) {
StatusDisplayer.getDefault().setStatusText("Not a Java file: " +
fileObject.getPath());
} else {
@@ -257,10 +257,10 @@ In this section, we are introduced to our first
explicitly invoked "Retouche" ta
[start=1]
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]
-[source,java]
+[source,java,subs="verbatim,macros,quotes"]
----
-(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]>());
+(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]>());
----
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
[start=2]
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:
-[source,java]
+[source,java,subs="verbatim,quotes"]
----
public void actionPerformed(ActionEvent ev) {
@@ -310,15 +310,15 @@ public void actionPerformed(ActionEvent ev) {
[start=3]
1. Implement the ``run()`` method as follows:
-[source,java]
+[source,java,subs="macros"]
----
@Override
public void run(CompilationController compilationController) throws Exception {
-link:https://bits.netbeans.org/dev/javadoc/org-netbeans-modules-java-source/org/netbeans/api/java/source/CompilationController.html#toPhase(org.netbeans.api.java.source.JavaSource.Phase)[compilationController.toPhase(Phase.ELEMENTS_RESOLVED)];
+
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-modules-java-source/org/netbeans/api/java/source/CompilationController.html#toPhase(org.netbeans.api.java.source.JavaSource.Phase)[compilationController.toPhase(Phase.ELEMENTS_RESOLVED)];
-link:https://docs.oracle.com/javase/1.5.0/docs/api/javax/swing/text/Document.html[Document]
document =
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-modules-java-source/org/netbeans/api/java/source/CompilationController.html#getDocument()[compilationController.getDocument()];
+
link:https://docs.oracle.com/javase/1.5.0/docs/api/javax/swing/text/Document.html[Document]
document =
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-modules-java-source/org/netbeans/api/java/source/CompilationController.html#getDocument()[compilationController.getDocument()];
if (document != null) {
StatusDisplayer.getDefault().setStatusText("Hurray, the Java file is
open!");
} else {
@@ -370,7 +370,7 @@ In this section, now that we know that we are dealing with
a Java file and that
[start=2]
1. Replace the "Hurray!" message in the ``run()`` method with the lines
highlighted below:
-[source,java]
+[source,java,subs="quotes"]
----
public void run(CompilationController compilationController) throws Exception {
@@ -449,7 +449,7 @@ image::images/copyfqn_72_four1.png[]
[start=5]
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:
-[source,java]
+[source,java,subs="quotes"]
----
private class MemberVisitor extends TreePathScanner<Void, Void> {
@@ -509,7 +509,7 @@ image::images/copyfqn_72_four2.png[]
[start=7]
1. But we can detect a lot more than just the name of the element under the
caret. In the ``visitClass`` method, replace the lines in bold below:
-[source,java]
+[source,java,subs="quotes"]
----
@Override
diff --git a/netbeans.apache.org/src/content/tutorials/nbm-crud.asciidoc
b/netbeans.apache.org/src/content/tutorials/nbm-crud.asciidoc
index b6fe23760..60aaf7acc 100644
--- a/netbeans.apache.org/src/content/tutorials/nbm-crud.asciidoc
+++ b/netbeans.apache.org/src/content/tutorials/nbm-crud.asciidoc
@@ -417,7 +417,7 @@ public class CustomerChildFactory extends
ChildFactory<Customer> {
[start=6]
1. Back in the ``CustomerViewerTopComponent`` , use the ``ExplorerManager``
to pass the result list from the JPA query in to the ``Node`` :
-[source,java]
+[source,java,subs="quotes"]
----
EntityManager entityManager =
Persistence.createEntityManagerFactory("CustomerLibraryPU").createEntityManager();
@@ -500,7 +500,7 @@ In this section, you allow the user to show the currently
selected Customer obje
[start=1]
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):
-[source,java]
+[source,java,subs="quotes"]
----
@Override
@@ -744,7 +744,7 @@ When the ``handleSave`` method is invoked, the
``Savable`` is unregistered f
NOTE: All the code below is an inner class within
``CustomerEditorTopComponent`` .
-[source,java]
+[source,java,subs="macros"]
----
private static final Icon ICON =
ImageUtilities.loadImageIcon("org/shop/editor/Icon.png", true);
@@ -1021,7 +1021,7 @@ public void resetFields() {
[start=2]
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:
-[source,java]
+[source,java,subs="verbatim,quotes"]
----
@Override
diff --git a/netbeans.apache.org/src/content/tutorials/nbm-emf.asciidoc
b/netbeans.apache.org/src/content/tutorials/nbm-emf.asciidoc
index 020fb5351..ebe8989b4 100644
--- a/netbeans.apache.org/src/content/tutorials/nbm-emf.asciidoc
+++ b/netbeans.apache.org/src/content/tutorials/nbm-emf.asciidoc
@@ -338,17 +338,17 @@ The other OSGi-related dependencies you see in the
screenshot above were added b
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:
-[source,java]
+[source,java,subs="verbatim,macros"]
----
-public class LibraryNode extends
link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html[AbstractNode]
{
+public class LibraryNode extends
link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html[AbstractNode]
{
public LibraryNode(Library library) {
super(Children.create(new BookOrBorrowerChildFactory(library), true));
setDisplayName(library.getName());
}
- private static class BookOrBorrowerChildFactory extends
link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/ChildFactory.html[ChildFactory]<Object>
{
+ private static class BookOrBorrowerChildFactory extends
link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/ChildFactory.html[ChildFactory]<Object>
{
private final Library library;
@@ -371,7 +371,7 @@ public class LibraryNode extends
link:http://bits.netbeans.org/dev/javadoc/org-
@Override
protected Node createNodeForKey(Object key) {
-link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/BeanNode.html[BeanNode]
childNode = null;
+
link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/BeanNode.html[BeanNode]
childNode = null;
try {
childNode = new BeanNode(key);
if (key instanceof Book) {
@@ -399,10 +399,10 @@
link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Be
1. Create a new Java class named `LibraryChildFactory`, which is a factory
class for creating new `LibraryNode`s:
-[source,java]
+[source,java,subs="verbatim,macros"]
----
-public class LibraryChildFactory extends
link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/ChildFactory.html[ChildFactory]<Library>
{
+public class LibraryChildFactory extends
link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/ChildFactory.html[ChildFactory]<Library>
{
@Override
protected boolean createKeys(List<Library> list) {
@@ -467,10 +467,10 @@ public class LibraryChildFactory extends
link:http://bits.netbeans.org/dev/java
1. Create a new Java class named `LibraryViewer`, which provides the window
where the `LibraryNode` will be displayed:
-[source,java]
+[source,java,subs="macros"]
----
-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]
{
+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]
{
private ExplorerManager em = new ExplorerManager();
@@ -480,7 +480,7 @@ public class LibraryViewer extends
link:http://bits.netbeans.org/dev/javadoc/or
//Set the layout of the window:
setLayout(new BorderLayout());
//Create a new BeanTreeView:
-link:http://bits.netbeans.org/dev/javadoc/org-openide-explorer/org/openide/explorer/view/BeanTreeView.html[BeanTreeView]
btv = new BeanTreeView();
+
link:http://bits.netbeans.org/dev/javadoc/org-openide-explorer/org/openide/explorer/view/BeanTreeView.html[BeanTreeView]
btv = new BeanTreeView();
//Hide the root node:
btv.setRootVisible(false);
//Add the BeanTreeView:
diff --git a/netbeans.apache.org/src/content/tutorials/nbm-feedreader.asciidoc
b/netbeans.apache.org/src/content/tutorials/nbm-feedreader.asciidoc
index 48c2e8de8..5f00c3e25 100644
--- a/netbeans.apache.org/src/content/tutorials/nbm-feedreader.asciidoc
+++ b/netbeans.apache.org/src/content/tutorials/nbm-feedreader.asciidoc
@@ -247,11 +247,12 @@ Press Ctrl-Shift-I to let the IDE generate the required
import statement.
[start=3]
-1. Register the ``FeedTopComponent`` in the window system by adding
annotations to the top of the class, as shown here, and then press Ctrl-Shift-I
to let the IDE generate the appropriate import statements:
link:http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/TopComponent.Description.html[@TopComponent.Description]
+1. Register the ``FeedTopComponent`` in the window system by adding
annotations to the top of the class, as shown here, and then press Ctrl-Shift-I
to let the IDE generate the appropriate import statements:
-[source,java]
+[source,java,subs="macros"]
----
+link:http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/TopComponent.Description.html[@TopComponent.Description]
(
preferredID = "FeedTopComponent",
persistenceType = TopComponent.PERSISTENCE_ALWAYS)
@@ -454,7 +455,7 @@ Take the following steps:
[start=2]
1. Replace the default class with the following:
-[source,java]
+[source,java,subs="macros"]
----
package org.myorg.feedreader;
@@ -466,7 +467,7 @@ import org.openide.nodes.FilterNode;
import org.openide.nodes.Node;
import org.openide.util.Utilities;
-public class RootNode extends
link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/FilterNode.html[FilterNode]
{
+public class RootNode extends
link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/FilterNode.html[FilterNode]
{
public RootNode(Node filterNode) throws DataObjectNotFoundException {
super(filterNode, new RssFolderChildren(filterNode));
@@ -499,7 +500,7 @@ To create this class, take the following steps:
Replace the default class with the following:
-[source,java]
+[source,java,subs="macros"]
----
package org.myorg.feedreader;
@@ -513,7 +514,7 @@ import org.openide.nodes.Node;
import org.openide.util.Exceptions;
import org.openide.util.Lookup;
-public class RssFolderChildren extends
link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/FilterNode.Children.html[FilterNode.Children]
{
+public class RssFolderChildren extends
link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/FilterNode.Children.html[FilterNode.Children]
{
RssFolderChildren(Node rssFolderNode) {
super(rssFolderNode);
@@ -522,7 +523,7 @@ public class RssFolderChildren extends
link:http://bits.netbeans.org/dev/javado
@Override
protected Node[] createNodes(Node n) {
FileObject fo = n.getLookup().lookup(FileObject.class);
- if (fo != null && fo.isFolder()) {
+ if (fo != null && fo.isFolder()) {
try {
return new Node[]{new RootNode(n)};
} catch (DataObjectNotFoundException ex) {
@@ -578,7 +579,7 @@ Take the following steps to create this class:
[start=2]
1. Replace the default class with the following:
-[source,java]
+[source,java,subs="macros"]
----
package org.myorg.feedreader;
@@ -596,7 +597,7 @@ import org.openide.util.lookup.Lookups;
/**
* Getting the feed node and wrapping it in a FilterNode
*/
-public class OneFeedNode extends
link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/FilterNode.html[FilterNode]
{
+public class OneFeedNode extends
link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/FilterNode.html[FilterNode]
{
OneFeedNode(Node feedFileNode, SyndFeed feed) {
super(feedFileNode, Children.create(new FeedChildFactory(feed),
false), Lookups.fixed(feed));
@@ -643,7 +644,7 @@ To create this class, take the following steps:
Replace the default class with the following:
-[source,java]
+[source,java,subs="macros"]
----
package org.myorg.feedreader;
@@ -657,7 +658,7 @@ import org.openide.nodes.Node;
import org.openide.util.Exceptions;
import org.openide.util.NbCollections;
-public class FeedChildFactory extends
link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/ChildFactory.html[ChildFactory<SyndEntry>]
{
+public class FeedChildFactory extends
link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/ChildFactory.html[ChildFactory<SyndEntry>]
{
private final SyndFeed feed;
@@ -667,7 +668,7 @@ public class FeedChildFactory extends
link:http://bits.netbeans.org/dev/javadoc
@Override
protected boolean createKeys(List<SyndEntry> list) {
- list.addAll(
link:http://bits.netbeans.org/dev/javadoc/org-openide-util/org/openide/util/NbCollections.html[NbCollections].checkedListByCopy(feed.getEntries(),
SyndEntry.class, true));
+
list.addAll(link:http://bits.netbeans.org/dev/javadoc/org-openide-util/org/openide/util/NbCollections.html[NbCollections].checkedListByCopy(feed.getEntries(),
SyndEntry.class, true));
return true;
}
@@ -702,7 +703,7 @@ To create this class, take the following steps:
[start=2]
1. Replace the default class with the following:
-[source,java]
+[source,java,subs="macros"]
----
package org.myorg.feedreader;
@@ -722,7 +723,7 @@ import org.openide.util.actions.SystemAction;
import org.openide.util.lookup.Lookups;
import org.openide.windows.TopComponent;
-class OneEntryNode extends
link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/FilterNode.html[FilterNode]
{
+class OneEntryNode extends
link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/FilterNode.html[FilterNode]
{
private final SyndEntry entry;
@@ -900,7 +901,7 @@ To create this class, take the following steps:
Replace the default class with the following:
-[source,java]
+[source,java,subs="macros"]
----
package org.myorg.feedreader;
@@ -1014,7 +1015,7 @@ To create this class, take the following steps:
Replace the default class with the following:
-[source,java]
+[source,java,subs="macros"]
----
package org.myorg.feedreader;
diff --git a/netbeans.apache.org/src/content/tutorials/nbm-idioms.asciidoc
b/netbeans.apache.org/src/content/tutorials/nbm-idioms.asciidoc
deleted file mode 100644
index 34d326889..000000000
--- a/netbeans.apache.org/src/content/tutorials/nbm-idioms.asciidoc
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-
diff --git
a/netbeans.apache.org/src/content/tutorials/nbm-javacc-parser.asciidoc
b/netbeans.apache.org/src/content/tutorials/nbm-javacc-parser.asciidoc
index 4e4822729..e02e1c3ea 100644
--- a/netbeans.apache.org/src/content/tutorials/nbm-javacc-parser.asciidoc
+++ b/netbeans.apache.org/src/content/tutorials/nbm-javacc-parser.asciidoc
@@ -81,7 +81,7 @@ The class will still not compile because the implementing
class ``Token`` does
* We need to make sure that the classes that JavaCC will generate for us will
be generated with the correct package statements. Add "package
org.simplejava.jccparser;" to ``Java1.5.jj`` file after the
"PARSER_BEGIN(JavaParser)" line:
-[source,java]
+[source,java,subs="quotes"]
----
PARSER_BEGIN(JavaParser)
@@ -123,7 +123,7 @@ image::images/javacc_72_parser-4.png[]
1. The first NetBeans APIclass you need to implement is ``
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/Parser.html[org.netbeans.modules.parsing.spi.Parser]``
. Create a class named ``SJParser`` and define it as follows:
-[source,java]
+[source,java,subs="macros"]
----
package org.simplejava.parser;
@@ -133,14 +133,14 @@ import java.io.StringReader;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.event.ChangeListener;
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/api/Snapshot.html[org.netbeans.modules.parsing.api.Snapshot];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/api/Task.html[org.netbeans.modules.parsing.api.Task];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/Parser.html[org.netbeans.modules.parsing.spi.Parser];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/ParserResultTask.html[org.netbeans.modules.parsing.spi.Parser.Result];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/SourceModificationEvent.html[org.netbeans.modules.parsing.spi.SourceModificationEvent];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/api/Snapshot.html[org.netbeans.modules.parsing.api.Snapshot];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/api/Task.html[org.netbeans.modules.parsing.api.Task];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/Parser.html[org.netbeans.modules.parsing.spi.Parser];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/ParserResultTask.html[org.netbeans.modules.parsing.spi.Parser.Result];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/SourceModificationEvent.html[org.netbeans.modules.parsing.spi.SourceModificationEvent];
import org.simplejava.jccparser.JavaParser;
-public class SJParser extends
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/Parser.html[Parser]
{
+public class SJParser extends
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/Parser.html[Parser]
{
private Snapshot snapshot;
private JavaParser javaParser;
@@ -257,7 +257,7 @@ Before working on the related code, we need to make some
modifications to the ge
* Change "ERROR_REPORTING = false;" to "ERROR_REPORTING = true;":
-[source,java]
+[source,java,subs="quotes"]
----
options {
@@ -273,7 +273,7 @@ options {
* Add "import java.util.*;" to your Java1.5.jj file:
-[source,java]
+[source,java,subs="quotes"]
----
PARSER_BEGIN(JavaParser)
@@ -281,7 +281,7 @@ PARSER_BEGIN(JavaParser)
package org.simplejava.jccparser;
import java.io.*;
-*import java.util.*;*
+*import java.util.\*;*
----
@@ -305,13 +305,13 @@ void recover (ParseException ex, int recoveryPoint) {
Token t;
do {
t = getNextToken ();
- } while (t.kind != EOF && t.kind != recoveryPoint);
+ } while (t.kind != EOF && t.kind != recoveryPoint);
}
----
* Catch ``ParseExceptions`` in ``CompilationUnit`` , ``FieldDeclaration``
, ``MethodDeclaration`` , and ``Statement`` :
-[source,java]
+[source,java,subs="quotes"]
----
final public void CompilationUnit() throws ParseException {
@@ -380,7 +380,7 @@ final public void CompilationUnit() throws ParseException {
----
-[source,java]
+[source,java,subs="quotes"]
----
final public void FieldDeclaration(int modifiers) throws ParseException {
@@ -407,7 +407,7 @@ final public void FieldDeclaration(int modifiers) throws
ParseException {
----
-[source,java]
+[source,java,subs="quotes"]
----
final public void MethodDeclaration(int modifiers) throws ParseException {
@@ -447,7 +447,7 @@ final public void MethodDeclaration(int modifiers) throws
ParseException {
----
-[source,java]
+[source,java,subs="quotes"]
----
final public void Statement() throws ParseException {
@@ -563,7 +563,7 @@ The above steps are standard in the sense that they are
common to all tasks impl
1. Create the ``SJSyntaxErrorHighlightingTask`` class:
-[source,java]
+[source,java,subs="macros"]
----
package org.simplejava.parser;
@@ -573,21 +573,21 @@ import java.util.List;
import javax.swing.text.BadLocationException;
import javax.swing.text.Document;
import javax.swing.text.StyledDocument;
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/Parser.Result.html[org.netbeans.modules.parsing.spi.Parser.Result];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/ParserResultTask.html[org.netbeans.modules.parsing.spi.ParserResultTask];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/Scheduler.html[org.netbeans.modules.parsing.spi.Scheduler];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/SchedulerEvent.html[org.netbeans.modules.parsing.spi.SchedulerEvent];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-editor-hints/org/netbeans/spi/editor/hints/ErrorDescription.html[org.netbeans.spi.editor.hints.ErrorDescription];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-editor-hints/org/netbeans/spi/editor/hints/ErrorDescriptionFactory.html[org.netbeans.spi.editor.hints.ErrorDescriptionFactory];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-editor-hints/org/netbeans/spi/editor/hints/HintsController.html[org.netbeans.spi.editor.hints.HintsController];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-editor-hints/org/netbeans/spi/editor/hints/Severity.html[org.netbeans.spi.editor.hints.Severity];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/Parser.Result.html[org.netbeans.modules.parsing.spi.Parser.Result];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/ParserResultTask.html[org.netbeans.modules.parsing.spi.ParserResultTask];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/Scheduler.html[org.netbeans.modules.parsing.spi.Scheduler];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/SchedulerEvent.html[org.netbeans.modules.parsing.spi.SchedulerEvent];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-editor-hints/org/netbeans/spi/editor/hints/ErrorDescription.html[org.netbeans.spi.editor.hints.ErrorDescription];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-editor-hints/org/netbeans/spi/editor/hints/ErrorDescriptionFactory.html[org.netbeans.spi.editor.hints.ErrorDescriptionFactory];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-editor-hints/org/netbeans/spi/editor/hints/HintsController.html[org.netbeans.spi.editor.hints.HintsController];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-editor-hints/org/netbeans/spi/editor/hints/Severity.html[org.netbeans.spi.editor.hints.Severity];
import org.openide.text.NbDocument;
import org.openide.util.Exceptions;
import org.simplejava.jccparser.ParseException;
import org.simplejava.jccparser.Token;
import org.simplejava.parser.SJParser.SJParserResult;
-public class SJSyntaxErrorHighlightingTask extends
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/ParserResultTask.html[ParserResultTask]
{
+public class SJSyntaxErrorHighlightingTask extends
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/ParserResultTask.html[ParserResultTask]
{
@Override
public void run (Result result, SchedulerEvent event) {
@@ -639,7 +639,7 @@ public class SJSyntaxErrorHighlightingTask extends
link:http://bits.netbeans.or
1. Create the ``SJSyntaxErrorHighlightingTaskFactory`` class in the
``org.simplejava.parser`` package:
-[source,java]
+[source,java,subs="macros"]
----
package org.simplejava.parser;
@@ -647,11 +647,11 @@ package org.simplejava.parser;
import java.util.Collection;
import java.util.Collections;
import org.netbeans.api.editor.mimelookup.MimeRegistration;
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/api/Snapshot.html[org.netbeans.modules.parsing.api.Snapshot];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/TaskFactory.html[org.netbeans.modules.parsing.spi.TaskFactory];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/api/Snapshot.html[org.netbeans.modules.parsing.api.Snapshot];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/TaskFactory.html[org.netbeans.modules.parsing.spi.TaskFactory];
@MimeRegistration(mimeType="text/x-sj",service=TaskFactory.class)
-public class SJSyntaxErrorHighlightingTaskFactory extends
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/TaskFactory.html[TaskFactory]
{
+public class SJSyntaxErrorHighlightingTaskFactory extends
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-parsing-api/org/netbeans/modules/parsing/spi/TaskFactory.html[TaskFactory]
{
@Override
public Collection create (Snapshot snapshot) {
@@ -682,18 +682,18 @@ Next, we'll create the skeleton of an indentation task
for our language.
Create a new ``
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/IndentTask.html[IndentTask]``
:
-[source,java]
+[source,java,subs="macros"]
----
package org.simplejava.parser;
import javax.swing.text.BadLocationException;
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/Context.html[org.netbeans.modules.editor.indent.spi.Context];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/ExtraLock.html[org.netbeans.modules.editor.indent.spi.ExtraLock];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/IndentTask.html[org.netbeans.modules.editor.indent.spi.IndentTask];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/Context.html[org.netbeans.modules.editor.indent.spi.Context];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/ExtraLock.html[org.netbeans.modules.editor.indent.spi.ExtraLock];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/IndentTask.html[org.netbeans.modules.editor.indent.spi.IndentTask];
import org.openide.awt.StatusDisplayer;
-public class SJIndentTask implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/IndentTask.html[IndentTask]
{
+public class SJIndentTask implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/IndentTask.html[IndentTask]
{
private Context context;
@@ -721,17 +721,17 @@ NOTE: The indent task will make a callback to the
``reindent()`` method when
1. Create a new ``
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/IndentTask.Factory.html[IndentTask.Factory]``
:
-[source,java]
+[source,java,subs="macros"]
----
package org.simplejava.parser;
import org.netbeans.api.editor.mimelookup.MimeRegistration;
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/Context.html[org.netbeans.modules.editor.indent.spi.Context];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/IndentTask.html[org.netbeans.modules.editor.indent.spi.IndentTask];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/Context.html[org.netbeans.modules.editor.indent.spi.Context];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/IndentTask.html[org.netbeans.modules.editor.indent.spi.IndentTask];
@MimeRegistration(mimeType="text/x-sj",service=IndentTask.Factory.class)
-public class SJIndentTaskFactory implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/IndentTask.Factory.html[IndentTask.Factory]
{
+public class SJIndentTaskFactory implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/IndentTask.Factory.html[IndentTask.Factory]
{
@Override
public IndentTask createTask(Context context) {
@@ -757,18 +757,18 @@ Next, we'll create the skeleton of a reformat task for
our language.
Create a new ``
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/ReformatTask.html[ReformatTask]``
:
-[source,java]
+[source,java,subs="macros"]
----
package org.simplejava.parser;
import javax.swing.text.BadLocationException;
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/Context.html[org.netbeans.modules.editor.indent.spi.Context];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/ExtraLock.html[org.netbeans.modules.editor.indent.spi.ExtraLock];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/ReformatTask.html[org.netbeans.modules.editor.indent.spi.ReformatTask];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/Context.html[org.netbeans.modules.editor.indent.spi.Context];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/ExtraLock.html[org.netbeans.modules.editor.indent.spi.ExtraLock];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/ReformatTask.html[org.netbeans.modules.editor.indent.spi.ReformatTask];
import org.openide.awt.StatusDisplayer;
-public class SJReformatTask implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/ReformatTask.html[ReformatTask]
{
+public class SJReformatTask implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/ReformatTask.html[ReformatTask]
{
private Context context;
@@ -796,17 +796,17 @@ NOTE: The reformat task will make a callback to the
``reformat()`` method whe
1. Create a new ``
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/ReformatTask.Factory.html[ReformatTask.Factory]``
:
-[source,java]
+[source,java,subs="macros"]
----
package org.simplejava.parser;
import org.netbeans.api.editor.mimelookup.MimeRegistration;
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/Context.html[org.netbeans.modules.editor.indent.spi.Context];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/ReformatTask.Factory.html[org.netbeans.modules.editor.indent.spi.ReformatTask];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/Context.html[org.netbeans.modules.editor.indent.spi.Context];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/ReformatTask.Factory.html[org.netbeans.modules.editor.indent.spi.ReformatTask];
@MimeRegistration(mimeType="text/x-sj",service=ReformatTask.Factory.class)
-public class SJReformatTaskFactory implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/ReformatTask.Factory.html[ReformatTask.Factory]
{
+public class SJReformatTaskFactory implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-indent/org/netbeans/modules/editor/indent/spi/ReformatTask.Factory.html[ReformatTask.Factory]
{
@Override
public ReformatTask createTask(Context context) {
@@ -844,19 +844,19 @@ image::images/javacc_72_add-brace-2.png[]
Create a new ``
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-bracesmatching/org/netbeans/spi/editor/bracesmatching/BracesMatcherFactory.html[BracesMatcherFactory]``
:
-[source,java]
+[source,java,subs="macros"]
----
package org.simplejava.parser;
import org.netbeans.api.editor.mimelookup.MimeRegistration;
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-bracesmatching/org/netbeans/spi/editor/bracesmatching/BracesMatcher.html[org.netbeans.spi.editor.bracesmatching.BracesMatcher];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-bracesmatching/org/netbeans/spi/editor/bracesmatching/BracesMatcherFactory.html[org.netbeans.spi.editor.bracesmatching.BracesMatcherFactory];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-bracesmatching/org/netbeans/spi/editor/bracesmatching/MatcherContext.html[org.netbeans.spi.editor.bracesmatching.MatcherContext];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-bracesmatching/org/netbeans/spi/editor/bracesmatching/support/BracesMatcherSupport.html[org.netbeans.spi.editor.bracesmatching.support.BracesMatcherSupport];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-bracesmatching/org/netbeans/spi/editor/bracesmatching/BracesMatcher.html[org.netbeans.spi.editor.bracesmatching.BracesMatcher];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-bracesmatching/org/netbeans/spi/editor/bracesmatching/BracesMatcherFactory.html[org.netbeans.spi.editor.bracesmatching.BracesMatcherFactory];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-bracesmatching/org/netbeans/spi/editor/bracesmatching/MatcherContext.html[org.netbeans.spi.editor.bracesmatching.MatcherContext];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-bracesmatching/org/netbeans/spi/editor/bracesmatching/support/BracesMatcherSupport.html[org.netbeans.spi.editor.bracesmatching.support.BracesMatcherSupport];
@MimeRegistration(mimeType="text/x-sj",service=BracesMatcherFactory.class)
-public class SJBracesMatcherFactory implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-bracesmatching/org/netbeans/spi/editor/bracesmatching/BracesMatcherFactory.html[BracesMatcherFactory]
{
+public class SJBracesMatcherFactory implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-bracesmatching/org/netbeans/spi/editor/bracesmatching/BracesMatcherFactory.html[BracesMatcherFactory]
{
@Override
public BracesMatcher createMatcher(MatcherContext context) {
@@ -894,7 +894,7 @@ image::images/javacc_72_add-fold-2.png[]
Create a new ``
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-fold/org/netbeans/spi/editor/fold/FoldManager.html[FoldManager]``
:
-[source,java]
+[source,java,subs="verbatim,macros"]
----
package org.simplejava.parser;
@@ -908,13 +908,13 @@ import org.netbeans.api.editor.fold.FoldType;
import org.netbeans.api.lexer.Token;
import org.netbeans.api.lexer.TokenHierarchy;
import org.netbeans.api.lexer.TokenSequence;
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-fold/org/netbeans/spi/editor/fold/FoldHierarchyTransaction.html[org.netbeans.spi.editor.fold.FoldHierarchyTransaction];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-fold/org/netbeans/spi/editor/fold/FoldHierarchyTransaction.html[org.netbeans.spi.editor.fold.FoldHierarchyTransaction];
import org.netbeans.spi.editor.fold.FoldManager;
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-fold/org/netbeans/spi/editor/fold/FoldOperation.html[org.netbeans.spi.editor.fold.FoldOperation];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-fold/org/netbeans/spi/editor/fold/FoldOperation.html[org.netbeans.spi.editor.fold.FoldOperation];
import org.openide.util.Exceptions;
import org.simplejava.lexer.SJTokenId;
-public class SJFoldManager implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-fold/org/netbeans/spi/editor/fold/FoldManager.html[FoldManager]
{
+public class SJFoldManager implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-fold/org/netbeans/spi/editor/fold/FoldManager.html[FoldManager]
{
private FoldOperation operation;
public static final FoldType COMMENT_FOLD_TYPE = new FoldType("/*...*/");
@@ -937,7 +937,7 @@ public class SJFoldManager implements
link:http://bits.netbeans.org/dev/javadoc
offset = ts.offset();
Token<SJTokenId> token = ts.token();
SJTokenId id = token.id();
- if (id.name().equals("FORMAL_COMMENT") && type == null) {
+ if (id.name().equals("FORMAL_COMMENT") && type == null) {
type = COMMENT_FOLD_TYPE;
start = offset;
try {
@@ -994,7 +994,7 @@ public class SJFoldManager implements
link:http://bits.netbeans.org/dev/javadoc
1. Create a new ``
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-fold/org/netbeans/spi/editor/fold/FoldManagerFactory.html[FoldManagerFactory]``
:
-[source,java]
+[source,java,subs="macros"]
----
package org.simplejava.parser;
@@ -1004,7 +1004,7 @@
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-fold/org/n
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-fold/org/netbeans/spi/editor/fold/FoldManagerFactory.html[import
org.netbeans.spi.editor.fold.FoldManagerFactory];
@MimeRegistration(mimeType="text/x-sj",service=FoldManagerFactory.class)
-public class SJFoldManagerFactory implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-fold/org/netbeans/spi/editor/fold/FoldManagerFactory.html[FoldManagerFactory]
{
+public class SJFoldManagerFactory implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-fold/org/netbeans/spi/editor/fold/FoldManagerFactory.html[FoldManagerFactory]
{
@Override
public FoldManager createFoldManager() {
diff --git a/netbeans.apache.org/src/content/tutorials/nbm-javafx.asciidoc
b/netbeans.apache.org/src/content/tutorials/nbm-javafx.asciidoc
index a5890eeac..e6f0737c0 100644
--- a/netbeans.apache.org/src/content/tutorials/nbm-javafx.asciidoc
+++ b/netbeans.apache.org/src/content/tutorials/nbm-javafx.asciidoc
@@ -233,7 +233,7 @@ In this section, you move the useful parts of the Swing
Interop sample into your
[start=5]
1. Change the constructor of the ``TopComponent`` to set the layout and to
call the ``init`` metod, as follows, that is, by adding the two highlighted
lines below:
-[source,java]
+[source,java,subs="quotes"]
----
public CoreTopComponent() {
@@ -368,7 +368,7 @@ public void init() {
}
----
- ``
link:http://docs.oracle.com/javafx/2/api/javafx/application/Platform.html[Platform.setImplicitExit]``
sets the implicitExit attribute to the specified value. If this attribute is
true, the JavaFX runtime will implicitly shutdown when the last window is
closed; the JavaFX launcher will call the Application.stop() method and
terminate the JavaFX application thread. If this attribute is false, the
application will continue to run normally even after the last window is closed,
until the [...]
+``
link:http://docs.oracle.com/javafx/2/api/javafx/application/Platform.html[Platform.setImplicitExit]``
sets the implicitExit attribute to the specified value. If this attribute is
true, the JavaFX runtime will implicitly shutdown when the last window is
closed; the JavaFX launcher will call the Application.stop() method and
terminate the JavaFX application thread. If this attribute is false, the
application will continue to run normally even after the last window is closed,
until the [...]
Notice how modulerizing the code is little more than refactoring. And, in the
end, you have code that is much clearer than it was in the beginning.
diff --git
a/netbeans.apache.org/src/content/tutorials/nbm-mark-occurrences.asciidoc
b/netbeans.apache.org/src/content/tutorials/nbm-mark-occurrences.asciidoc
index 66c010c59..cc4e2251a 100644
--- a/netbeans.apache.org/src/content/tutorials/nbm-mark-occurrences.asciidoc
+++ b/netbeans.apache.org/src/content/tutorials/nbm-mark-occurrences.asciidoc
@@ -136,21 +136,21 @@ To use the Highlighting SPI to create the palette in this
tutorial, take the fol
[start=2]
1. Replace the default content of the
``MarkHTMLOccurrencesHighlightsLayerFactory.java`` file with the following:
-[source,java]
+[source,java,subs="macros"]
----
import javax.swing.text.Document;
import org.netbeans.api.editor.mimelookup.MimeRegistration;
import org.netbeans.api.editor.mimelookup.MimeRegistrations;
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-lib2/org/netbeans/spi/editor/highlighting/HighlightsLayer.html[org.netbeans.spi.editor.highlighting.HighlightsLayer];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-lib2/org/netbeans/spi/editor/highlighting/HighlightsLayerFactory.html[org.netbeans.spi.editor.highlighting.HighlightsLayerFactory];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-lib2/org/netbeans/spi/editor/highlighting/ZOrder.html[org.netbeans.spi.editor.highlighting.ZOrder];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-lib2/org/netbeans/spi/editor/highlighting/HighlightsLayer.html[org.netbeans.spi.editor.highlighting.HighlightsLayer];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-lib2/org/netbeans/spi/editor/highlighting/HighlightsLayerFactory.html[org.netbeans.spi.editor.highlighting.HighlightsLayerFactory];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-lib2/org/netbeans/spi/editor/highlighting/ZOrder.html[org.netbeans.spi.editor.highlighting.ZOrder];
@MimeRegistrations({
@MimeRegistration(mimeType = "text/html", service =
HighlightsLayerFactory.class),
@MimeRegistration(mimeType = "text/xml", service =
HighlightsLayerFactory.class)
})
-public class MarkHTMLOccurrencesHighlightsLayerFactory implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-lib2/org/netbeans/spi/editor/highlighting/HighlightsLayerFactory.html[HighlightsLayerFactory]
{
+public class MarkHTMLOccurrencesHighlightsLayerFactory implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-lib2/org/netbeans/spi/editor/highlighting/HighlightsLayerFactory.html[HighlightsLayerFactory]
{
public static MarkHTMLOccurrencesHighlighter
getMarkOccurrencesHighlighter(Document doc) {
MarkHTMLOccurrencesHighlighter highlighter =
@@ -163,7 +163,7 @@ public class MarkHTMLOccurrencesHighlightsLayerFactory
implements link:http://b
}
@Override
- public HighlightsLayer[]
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-lib2/org/netbeans/spi/editor/highlighting/HighlightsLayerFactory.html#createLayers(org.netbeans.spi.editor.highlighting.HighlightsLayerFactory.Context)[createLayers](
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-lib2/org/netbeans/spi/editor/highlighting/HighlightsLayerFactory.Context.html[Context]
context) {
+ public HighlightsLayer[]
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-lib2/org/netbeans/spi/editor/highlighting/HighlightsLayerFactory.html#createLayers(org.netbeans.spi.editor.highlighting.HighlightsLayerFactory.Context)[createLayers](
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-lib2/org/netbeans/spi/editor/highlighting/HighlightsLayerFactory.Context.html[Context]
context) {
return new HighlightsLayer[]{
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-lib2/org/netbeans/spi/editor/highlighting/HighlightsLayer.html#create(java.lang.String,%20org.netbeans.spi.editor.highlighting.ZOrder,%20boolean,%20org.netbeans.spi.editor.highlighting.HighlightsContainer)[HighlightsLayer.create](
MarkHTMLOccurrencesHighlighter.class.getName(),
@@ -184,7 +184,7 @@ Several statements remain underlined in red because they
refer to the "MarkHTMLO
In this section, we create the highlight layer. Create a new Java class named
``MarkHTMLOccurrencesHighlighter`` , with the content below.
-[source,java]
+[source,java,subs="macros"]
----
import java.awt.Color;
@@ -198,12 +198,12 @@ import javax.swing.text.AttributeSet;
import javax.swing.text.Document;
import javax.swing.text.JTextComponent;
import javax.swing.text.StyleConstants;
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-settings/org/netbeans/api/editor/settings/AttributesUtilities.html[org.netbeans.api.editor.settings.AttributesUtilities];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor/org/netbeans/modules/editor/NbEditorUtilities.html[org.netbeans.modules.editor.NbEditorUtilities];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-lib2/org/netbeans/spi/editor/highlighting/support/OffsetsBag.html[org.netbeans.spi.editor.highlighting.support.OffsetsBag];
-import
link:http://bits.netbeans.org/dev/javadoc/org-openide-text/org/openide/cookies/EditorCookie.html[org.openide.cookies.EditorCookie];
-import
link:http://bits.netbeans.org/dev/javadoc/org-openide-loaders/org/openide/loaders/DataObject.html[org.openide.loaders.DataObject];
-import
link:http://bits.netbeans.org/dev/javadoc/org-openide-util/org/openide/util/RequestProcessor.html[org.openide.util.RequestProcessor];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-settings/org/netbeans/api/editor/settings/AttributesUtilities.html[org.netbeans.api.editor.settings.AttributesUtilities];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor/org/netbeans/modules/editor/NbEditorUtilities.html[org.netbeans.modules.editor.NbEditorUtilities];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-lib2/org/netbeans/spi/editor/highlighting/support/OffsetsBag.html[org.netbeans.spi.editor.highlighting.support.OffsetsBag];
+import
link:http://bits.netbeans.org/dev/javadoc/org-openide-text/org/openide/cookies/EditorCookie.html[org.openide.cookies.EditorCookie];
+import
link:http://bits.netbeans.org/dev/javadoc/org-openide-loaders/org/openide/loaders/DataObject.html[org.openide.loaders.DataObject];
+import
link:http://bits.netbeans.org/dev/javadoc/org-openide-util/org/openide/util/RequestProcessor.html[org.openide.util.RequestProcessor];
public class MarkHTMLOccurrencesHighlighter implements CaretListener {
diff --git a/netbeans.apache.org/src/content/tutorials/nbm-nodesapi3.asciidoc
b/netbeans.apache.org/src/content/tutorials/nbm-nodesapi3.asciidoc
index 76870a46d..6c3b28b4f 100644
--- a/netbeans.apache.org/src/content/tutorials/nbm-nodesapi3.asciidoc
+++ b/netbeans.apache.org/src/content/tutorials/nbm-nodesapi3.asciidoc
@@ -105,10 +105,10 @@ In this section, we use wizards to create a module
project and a custom window c
[start=8]
1. Open the Inspector, if it isn't open. (Use the Window menu.) In the
Inspector, select the ``moviePane`` , open the Properties window
(Ctrl-Shift-7), click the "Code" tab, and add this line to the Custom Creation
Code property (the very last property in the list):
-[source,java]
+[source,java,subs="macros"]
----
-new
link:https://bits.netbeans.org/dev/javadoc/org-openide-explorer/org/openide/explorer/view/BeanTreeView.html[BeanTreeView()];
+new
link:https://bits.netbeans.org/dev/javadoc/org-openide-explorer/org/openide/explorer/view/BeanTreeView.html[BeanTreeView()];
----
Click OK.
@@ -167,11 +167,11 @@ public ExplorerManager getExplorerManager() {
[start=4]
-1. Now go to the Constructor and add the following after the last existing
line:
link:https://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/TopComponent.html#associateLookup(org.openide.util.Lookup)[associateLookup]
+1. Now go to the Constructor and add the following after the last existing
line:
-[source,java]
+[source,java,subs="macros"]
----
-
+link:https://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/TopComponent.html#associateLookup(org.openide.util.Lookup)[associateLookup]
(
link:https://bits.netbeans.org/dev/javadocorg-openide-explorer/org/openide/explorer/ExplorerUtils.html[ExplorerUtils].
link:https://bits.netbeans.org/dev/javadocorg-openide-explorer/org/openide/explorer/ExplorerUtils.html#createLookup(org.openide.explorer.ExplorerManager,%20javax.swing.ActionMap)[createLookup(explorerManager,
getActionMap())]);
explorerManager.setRootContext(new
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html[AbstractNode(new
CategoryChildren())]);
explorerManager.getRootContext().setDisplayName("Marilyn Monroe's Movies");
@@ -220,7 +220,7 @@ From the above, you can see that a category has a name, and
nothing more.
[start=2]
1. Create another class, this time for creating the nodes for the categories:
-[source,java]
+[source,java,subs="macros"]
----
public class CategoryChildren extends
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Children.Keys.html[Children.Keys]
{
@@ -256,7 +256,7 @@ public class CategoryChildren extends
link:https://bits.netbeans.org/dev/javado
In this example, a popular children implementation called ``Children.Keys``
is used. By subclassing ``Children.Keys`` , you need not explicitly keep track
of the nodes. Instead, you keep track of a set of keys, which are lighter
weight objects. Each key typically represents one node. You must tell the
implementation how to create a node for each key. You can decide for yourself
what type of keys to use.
- ``addNotify()`` is called the first time that a list of nodes is needed. An
example of this is when a node is expanded. Here, when ``addNotify()`` is
called, a new category is instantiated. When a child node needs to be
constructed, the ``createNodes()`` method is called. It is passed the key for
which it is making a node. It returns either none, one, or more nodes
corresponding to what should be displayed for the key. In this example, a new
instance of one category node is being c [...]
+``addNotify()`` is called the first time that a list of nodes is needed. An
example of this is when a node is expanded. Here, when ``addNotify()`` is
called, a new category is instantiated. When a child node needs to be
constructed, the ``createNodes()`` method is called. It is passed the key for
which it is making a node. It returns either none, one, or more nodes
corresponding to what should be displayed for the key. In this example, a new
instance of one category node is being cr [...]
[start=3]
@@ -268,16 +268,16 @@ Note that in the code above, we create a node called
``CategoryNode`` . We will
[start=4]
1. Create a class called ``CategoryNode.java`` and define it as follows:
-[source,java]
+[source,java,subs="macros"]
----
-public class CategoryNode extends
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html[AbstractNode]
{
+public class CategoryNode extends
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html[AbstractNode]
{
/** Creates a new instance of CategoryNode */
public CategoryNode( Category category ) {
super( new MovieChildren(category), Lookups.singleton(category) );
-link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Node.html#setDisplayName(java.lang.String)[setDisplayName(category.getName())];
-link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Node.html#setDisplayName(java.lang.String)[setIconBaseWithExtension("org/netbeans/myfirstexplorer/marilyn_category.gif")];
+
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Node.html#setDisplayName(java.lang.String)[setDisplayName(category.getName())];
+
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Node.html#setDisplayName(java.lang.String)[setIconBaseWithExtension("org/netbeans/myfirstexplorer/marilyn_category.gif")];
}
public PasteType
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html#getDropType(java.awt.datatransfer.Transferable,%20int,%20int)[getDropType(Transferable
t, final int action, int index)] {
@@ -285,11 +285,11 @@
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/N
DnDConstants.ACTION_COPY_OR_MOVE+NodeTransfer.CLIPBOARD_CUT );
if( null != dropNode ) {
final Movie movie = (Movie)dropNode.getLookup().lookup(
Movie.class );
- if( null != movie && !this.equals(
dropNode.getParentNode() )) {
+ if( null != movie && !this.equals( dropNode.getParentNode() )) {
return new PasteType() {
public Transferable paste() throws IOException {
getChildren().add( new Node[] { new MovieNode(movie) }
);
- if( (action & DnDConstants.ACTION_MOVE) != 0 ) {
+ if( (action & DnDConstants.ACTION_MOVE) != 0 ) {
dropNode.getParentNode().getChildren().remove( new
Node[] {dropNode} );
}
return null;
@@ -391,10 +391,10 @@ From the above, you can see that a movie has a number,
belongs to a category, an
[start=2]
1. Now let's create the category's children. The class to be created is called
``MovieChildren.java`` . We use
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Index.ArrayChildren.html[Index.ArrayChildren],
so that we can put the nodes in an array list, which is loaded as needed.
Until a child node is needed, such as when the parent node is expanded, it is
not created. This is the content of the class:
-[source,java]
+[source,java,subs="macros"]
----
-public class MovieChildren extends
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Index.ArrayChildren.html[Index.ArrayChildren]
{
+public class MovieChildren extends
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Index.ArrayChildren.html[Index.ArrayChildren]
{
private Category category;
@@ -415,9 +415,9 @@ public class MovieChildren extends
link:https://bits.netbeans.org/dev/javadoc/
this.category = Category;
}
- protected java.util.List<Node>
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Index.ArrayChildren.html#initCollection()[initCollection()]
{
+ protected java.util.List<Node>
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Index.ArrayChildren.html#initCollection()[initCollection()]
{
ArrayList childrenNodes = new ArrayList( items.length );
- for( int i=0; i<items.length; i++ ) {
+ for( int i=0; i < items.length; i++ ) {
if( category.getName().equals( items[i][1] ) ) {
Movie item = new Movie();
item.setNumber(new Integer(items[i][0]));
@@ -441,10 +441,10 @@ public class MovieChildren extends
link:https://bits.netbeans.org/dev/javadoc/
[start=5]
1. Create a class called ``MovieNode.java`` and define it as follows:
-[source,java]
+[source,java,subs="macros"]
----
-public class MovieNode extends
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html[AbstractNode]
{
+public class MovieNode extends
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html[AbstractNode]
{
private Movie movie;
@@ -452,20 +452,20 @@ public class MovieNode extends
link:https://bits.netbeans.org/dev/javadoc/org-o
public MovieNode(Movie key) {
super(Children.LEAF, Lookups.fixed( new Object[] {key} ) );
this.movie = key;
-link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Node.html#setDisplayName(java.lang.String)[setDisplayName(key.getTitle())];
-link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html#setIconBaseWithExtension(java.lang.String)[setIconBaseWithExtension("org/netbeans/myfirstexplorer/marilyn.gif")];
+
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Node.html#setDisplayName(java.lang.String)[setDisplayName(key.getTitle())];
+
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html#setIconBaseWithExtension(java.lang.String)[setIconBaseWithExtension("org/netbeans/myfirstexplorer/marilyn.gif")];
}
- public boolean
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html#canCut()[canCut()]
{
+ public boolean
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html#canCut()[canCut()]
{
return true;
}
- public boolean
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html#canDestroy()[canDestroy()]
{
+ public boolean
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html#canDestroy()[canDestroy()]
{
return true;
}
- public Action[]
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Node.html#getActions(boolean)[getActions(boolean
popup)] {
+ public Action[]
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Node.html#getActions(boolean)[getActions(boolean
popup)] {
return new Action[] {
SystemAction.get( CopyAction.class ),
SystemAction.get( CutAction.class ),
@@ -519,10 +519,10 @@ map.put("delete",
ExplorerUtils.actionDelete(explorerManager, true));
Create a class called ``RootNode.java`` , with this content:
-[source,java]
+[source,java,subs="macros"]
----
-public class RootNode extends
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html[AbstractNode]
{
+public class RootNode extends
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html[AbstractNode]
{
/** Creates a new instance of RootNode */
public RootNode(Children children) {
@@ -543,10 +543,10 @@ public class RootNode extends
link:https://bits.netbeans.org/dev/javadoc/org-op
Notice that here we set one icon for when the node is in its closed state and
another for when it is expanded. To use this node, we need to change this line
in the TopComponent:
-[source,java]
+[source,java,subs="macros"]
----
-explorerManager.setRootContext(new
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html[AbstractNode](new
CategoryChildren()));
+explorerManager.setRootContext(new
link:https://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/AbstractNode.html[AbstractNode](new
CategoryChildren()));
----
We need to replace that line with this line:
@@ -577,7 +577,7 @@ However, note that only the BeanTreeView supports the drag
and drop functionalit
=== List View
-List view is an explorer view that displays items in a list. It is provided by
the
link:https://bits.netbeans.org/dev/javadoc/org-openide-explorer/org/openide/explorer/view/ListView.html[ListView]
class, which belongs to the Explorer And Property Sheet API.
+List view is an explorer view that displays items in a list. It is provided by
the
link:https://bits.netbeans.org/dev/javadoc/org-openide-explorer/org/openide/explorer/view/ListView.html[ListView]
class, which belongs to the Explorer And Property Sheet API.
[start=1]
@@ -729,12 +729,12 @@ Instead of adding an Explorer Manager to the
TopComponent's Lookup, you will nee
1. Right-click the project, choose Properties, and add a dependency on Core -
Component Palette in the Libraries category of the Project Properties dialog
box.
[start=2]
-1. Declare a new
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteController.html[PaletteController]
and set the root node as the palette's root:
+1. Declare a new
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteController.html[PaletteController]
and set the root node as the palette's root:
-[source,java]
+[source,java,subs="macros"]
----
-private
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteController.html[PaletteController]
palette = null;
+private
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteController.html[PaletteController]
palette = null;
private RootNode paletteRoot;
----
@@ -756,17 +756,17 @@ associateLookup( Lookups.fixed( new Object[]
{getPalette()} ));
[start=5]
-1. Here, we create a new instance of the
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteController.html[PaletteController]
and return it to the TopComponent's Lookup:
+1. Here, we create a new instance of the
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteController.html[PaletteController]
and return it to the TopComponent's Lookup:
-[source,java]
+[source,java,subs="macros"]
----
-private
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteController.html[PaletteController]
getPalette() {
+private
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteController.html[PaletteController]
getPalette() {
if( null == palette ) {
paletteRoot = new RootNode(new CategoryChildren());
paletteRoot.setName( "Palette Root");
- palette =
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteFactory.html[PaletteFactory].createPalette(
paletteRoot,
+ palette =
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteFactory.html[PaletteFactory].createPalette(
paletteRoot,
new MyPaletteActions(), null, new MyDragAndDropHandler() );
}
return palette;
@@ -777,10 +777,10 @@ private
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org
[start=6]
1. A palette consists of a root, a set of actions, and a handler for drag and
drop events. For purposes of this simple example, we will set our palette
actions to null:
-[source,java]
+[source,java,subs="macros"]
----
-private static class MyPaletteActions extends
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteActions.html[PaletteActions]
{
+private static class MyPaletteActions extends
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteActions.html[PaletteActions]
{
public Action[] getImportActions() {
return null;
}
@@ -808,12 +808,12 @@ private static class MyPaletteActions extends
link:https://bits.netbeans.org/de
[start=7]
1. And here is the definition of our drag and drop handler, using the NetBeans
API class
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/DragAndDropHandler.html[DragAndDropHandler]:
-[source,java]
+[source,java,subs="macros"]
----
public static final DataFlavor MyCustomDataFlavor
= new DataFlavor( Object.class, "MyDND" );
-private static class MyDragAndDropHandler extends
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/DragAndDropHandler.html[DragAndDropHandler]
{
+private static class MyDragAndDropHandler extends
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/DragAndDropHandler.html[DragAndDropHandler]
{
public void
link:https://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/DragAndDropHandler.html#customize(org.openide.util.datatransfer.ExTransferable,%20org.openide.util.Lookup)[customize(ExTransferable
exTransferable, Lookup lookup)] {
final MovieNode item = (MovieNode)lookup.lookup( MovieNode.class );
if( null != item ) {
@@ -831,4 +831,5 @@ private static class MyDragAndDropHandler extends
link:https://bits.netbeans.or
[start=8]
1. Install the module again. When the TopComponent opens, the new Component
Palette is shown. The categories you created in this tutorial are now
categories in the Component Palette, while the movies are items within the
categories. Next, you need to add drag and drop functionality to the items in
the palette, as described in the
link:https://netbeans.apache.org/tutorials/nbm-palette-api4.html[NetBeans Drag
and Drop Tutorial].
+
link:http://netbeans.apache.org/community/mailing-lists.html[Send Us Your
Feedback]
diff --git a/netbeans.apache.org/src/content/tutorials/nbm-options.asciidoc
b/netbeans.apache.org/src/content/tutorials/nbm-options.asciidoc
index 4ac980a9d..a3c0d1c42 100644
--- a/netbeans.apache.org/src/content/tutorials/nbm-options.asciidoc
+++ b/netbeans.apache.org/src/content/tutorials/nbm-options.asciidoc
@@ -132,7 +132,7 @@ image::images/options_72_pic7.png[]
The content of the ``CoolOptionsPanelController`` :
-[source,java]
+[source,java,subs="macros"]
----
package org.netbeans.modules.cooloptions;
@@ -148,7 +148,7 @@
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-options-api/org/n
displayName = "#AdvancedOption_DisplayName_CoolOptions",
keywords = "#AdvancedOption_Keywords_CoolOptions",
keywordsCategory = "Advanced/CoolOptions")
-public final class CoolOptionsOptionsPanelController extends
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-options-api/org/netbeans/spi/options/OptionsPanelController.html[OptionsPanelController]
{
+public final class CoolOptionsOptionsPanelController extends
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-options-api/org/netbeans/spi/options/OptionsPanelController.html[OptionsPanelController]
{
private CoolOptionsPanel panel;
private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
@@ -310,11 +310,10 @@ Look at the generated code.
* If you did not select "Allow Secondary Panels", two classes very similar to
those created in the previous section are generated. The panel is the same as
in the previous section, while the content of the
``CoolOptionsPanelController`` is the same too, except for the annotations:
-link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-options-api/org/netbeans/spi/options/OptionsPanelController.TopLevelRegistration.html[@OptionsPanelController.TopLevelRegistration]
-[source,java]
+[source,java,subs="macros"]
----
-
+link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-options-api/org/netbeans/spi/options/OptionsPanelController.TopLevelRegistration.html[@OptionsPanelController.TopLevelRegistration]
(
categoryName = "#OptionsCategory_Name_Cool",
iconBase = "org/netbeans/modules/cooloptions/icon32.png",
@@ -324,11 +323,10 @@
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-options-api/org/n
* If you selected "Allow Secondary Panels", the wizard does not create a
panel, nor a controller class, because the content of the panel will be
provided by its subpanels. Instead, the wizard generates a
``package-info.java`` file, with this content:
-link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-options-api/org/netbeans/spi/options/OptionsPanelController.ContainerRegistration.html[@ContainerRegistration]
-[source,java]
+[source,java,subs="macros"]
----
-
+link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-options-api/org/netbeans/spi/options/OptionsPanelController.ContainerRegistration.html[@ContainerRegistration]
(
id = "Cool",
categoryName = "#OptionsCategory_Name_Cool",
diff --git a/netbeans.apache.org/src/content/tutorials/nbm-paintapp.asciidoc
b/netbeans.apache.org/src/content/tutorials/nbm-paintapp.asciidoc
index ed697ec18..efe229659 100644
--- a/netbeans.apache.org/src/content/tutorials/nbm-paintapp.asciidoc
+++ b/netbeans.apache.org/src/content/tutorials/nbm-paintapp.asciidoc
@@ -220,11 +220,11 @@ Select Implement all abstract methods. The IDE generates
two method skeletons—
[start=4]
-1. Register the ``PaintTopComponent`` in the window system by adding
annotations to the top of the class, as shown here, and then press Ctrl-Shift-I
to let the IDE generate the appropriate import statements:
link:http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/TopComponent.Description.html[@TopComponent.Description]
+1. Register the ``PaintTopComponent`` in the window system by adding
annotations to the top of the class, as shown here, and then press Ctrl-Shift-I
to let the IDE generate the appropriate import statements:
-[source,java]
+[source,java,subs="macros"]
----
-
+link:http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/TopComponent.Description.html[@TopComponent.Description]
(
preferredID = "PaintTopComponent",
iconBase = "/org/netbeans/paint/new_icon.png",
diff --git
a/netbeans.apache.org/src/content/tutorials/nbm-palette-api1.asciidoc
b/netbeans.apache.org/src/content/tutorials/nbm-palette-api1.asciidoc
index 9df80f57e..83ff9f558 100644
--- a/netbeans.apache.org/src/content/tutorials/nbm-palette-api1.asciidoc
+++ b/netbeans.apache.org/src/content/tutorials/nbm-palette-api1.asciidoc
@@ -32,7 +32,7 @@
This tutorial demonstrates how to create and add code snippets to the HTML/JSP
Component Palette. Code snippets are small pieces of code that can be dragged
from a component palette and dropped in the Source Editor. They serve to speed
up coding. The HTML/JSP Component Palette has several code snippets already,
but you might want to add some additional ones and share them with others.
-NOTE: If you are using an earlier version of Apache NetBeans, see
link:74/nbm-palette-api1.html[the previous version of this document].
+NOTE: If you are using an earlier version of Apache NetBeans, see
link:74/nbm-palette-api1.html[the previous version of this document].
@@ -42,12 +42,12 @@ NOTE: If you are using an earlier version of Apache
NetBeans, see link:74/nbm-p
-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/palette[completed
tutorial source code].
+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/palette[completed
tutorial source code].
== Introduction to Code Snippets
-To create a code snippet, you use the
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/overview-summary.html[NetBeans
Palette API]. A code snippet requires the following files:
+To create a code snippet, you use the
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/overview-summary.html[NetBeans
Palette API]. A code snippet requires the following files:
* A Java class that defines the piece of code to be dragged into the Source
Editor.
* A display name for the palette item.
@@ -92,11 +92,12 @@ You need to create an XML file that defines the code
snippet, together with a re
1. Right-click the Libraries node in the Projects window, click Add Module
Dependency, and set a dependency on Common Palette.
[start=3]
-1. Define the ``package-info.java`` class as follows.
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteItemRegistration.html[@PaletteItemRegistration]
+1. Define the ``package-info.java`` class as follows.
-[source,java]
+[source,java,subs="verbatim,macros"]
----
+link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteItemRegistration.html[@PaletteItemRegistration]
(
paletteid = "HTMLPalette",
category = "HTML",
@@ -179,7 +180,7 @@ The IDE creates the ``NewSnippets2`` project. The project
contains all of your
=== Specifying the Module's Dependencies
-You will need to use several classes that belong to the
link:http://bits.netbeans.org/dev/javadoc/index.html[NetBeans APIs]. Each has
to be declared as a module dependency. Use the Project Properties dialog box
for this purpose, as described below.
+You will need to use several classes that belong to the
link:http://bits.netbeans.org/dev/javadoc/index.html[NetBeans APIs]. Each has
to be declared as a module dependency. Use the Project Properties dialog box
for this purpose, as described below.
[start=1]
@@ -211,7 +212,7 @@ In this section, you create ``BR.java`` , which defines a
code snippet for an H
[start=2]
1. Replace the default content of the ``BR.java`` file with the following:
-[source,java]
+[source,java,subs="verbatim,macros"]
----
package org.netbeans.modules.newsnippets2;
@@ -219,9 +220,9 @@ package org.netbeans.modules.newsnippets2;
import javax.swing.text.BadLocationException;
import javax.swing.text.JTextComponent;
import org.netbeans.modules.newsnippets2.HTMLPaletteUtilities;
-import
link:http://bits.netbeans.org/dev/javadoc/org-openide-text/org/openide/text/ActiveEditorDrop.html[org.openide.text.ActiveEditorDrop];
+import
link:http://bits.netbeans.org/dev/javadoc/org-openide-text/org/openide/text/ActiveEditorDrop.html[org.openide.text.ActiveEditorDrop];
-public class BR implements
link:http://bits.netbeans.org/dev/javadoc/org-openide-text/org/openide/text/ActiveEditorDrop.html[ActiveEditorDrop]
{
+public class BR implements
link:http://bits.netbeans.org/dev/javadoc/org-openide-text/org/openide/text/ActiveEditorDrop.html[ActiveEditorDrop]
{
public BR() {
}
@@ -232,7 +233,7 @@ public class BR implements
link:http://bits.netbeans.org/dev/javadoc/org-openid
}
@Override
- public boolean
link:http://bits.netbeans.org/dev/javadoc/org-openide-text/org/openide/text/ActiveEditorDrop.html#handleTransfer(javax.swing.text.JTextComponent)[handleTransfer(JTextComponent
targetComponent]) {
+ public boolean
link:http://bits.netbeans.org/dev/javadoc/org-openide-text/org/openide/text/ActiveEditorDrop.html#handleTransfer(javax.swing.text.JTextComponent)[handleTransfer(JTextComponent
targetComponent]) {
String body = createBody();
try {
HTMLPaletteUtilities.insert(body, targetComponent);
@@ -259,7 +260,7 @@ In this section, you create the ``HTMLPaletteUtilities``
class, which defines
[start=2]
1. Replace the default content of the ``HTMLPaletteUtilities.java`` file
with the following:
-[source,java]
+[source,java,subs="macros,quotes"]
----
package org.netbeans.modules.newsnippets2;
@@ -269,7 +270,7 @@ import javax.swing.text.Caret;
import javax.swing.text.Document;
import javax.swing.text.JTextComponent;
import javax.swing.text.StyledDocument;
-import
link:https://bits.netbeans.org/dev/javadoc/org-openide-text/org/openide/text/NbDocument.html[org.openide.text.NbDocument];
+import
link:https://bits.netbeans.org/dev/javadoc/org-openide-text/org/openide/text/NbDocument.html[org.openide.text.NbDocument];
public class HTMLPaletteUtilities {
@@ -291,7 +292,7 @@ public class HTMLPaletteUtilities {
}
try {
-link:https://bits.netbeans.org/dev/javadoc/org-openide-text/org/openide/text/NbDocument.html#runAtomicAsUser(javax.swing.text.StyledDocument,%20java.lang.Runnable)[NbDocument.runAtomicAsUser(doc,
new AtomicChange())];
+
link:https://bits.netbeans.org/dev/javadoc/org-openide-text/org/openide/text/NbDocument.html#runAtomicAsUser(javax.swing.text.StyledDocument,%20java.lang.Runnable)[NbDocument.runAtomicAsUser(doc,
new AtomicChange())];
} catch (BadLocationException ex) {}
}
@@ -357,7 +358,7 @@ The NetBeans Editor Palette Item DTD is used to declare the
``ActiveEditorDrop`
Instead of the above, you can use the 1.1 DTD, where you can define the
display name and tooltip without using a properties file. Below, only the
difference with the previous XML file definition is highlighted:
-[source,xml]
+[source,xml,subs="verbatim,quotes"]
----
<?xml version="1.0" encoding="UTF-8"?>
@@ -447,11 +448,11 @@ image::images/codesnippet_71_result.png[]
Optionally, you can let a ``JPanel`` appear when the palette item is
dropped. In the ``JPanel`` , you can let the user define values for attributes
that relate to the snippet that is about to be created. However, note that
adding such a customizer is optional. In the case of a line break, which is
what we are creating in this tutorial, there are no attributes that relate to
the BR tag. For that reason, to illustrate the customizer functionality, we
will add a comment before the BR tag [...]
-NOTE: If you check out the ``
link:https://github.com/apache/netbeans/bdb88f1fa043/html[html]`` module from
the link:https://github.com/apache/netbeans/[NetBeans sources], you will find
many examples of customizers in the ``
link:https://github.com/apache/netbeans/tree/master/ide/html/src/org/netbeans/modules/html/palette/items[org/netbeans/modules/html/palette/items]``
package.
+NOTE: If you check out the ``
link:https://github.com/apache/netbeans/bdb88f1fa043/html[html]`` module from
the link:https://github.com/apache/netbeans/[NetBeans sources], you will find
many examples of customizers in the ``
link:https://github.com/apache/netbeans/tree/master/ide/html/src/org/netbeans/modules/html/palette/items[org/netbeans/modules/html/palette/items]``
package.
[start=1]
-1. Add a dependency on the NetBeans ``
link:http://bits.netbeans.org/dev/javadoc/org-openide-dialogs/overview-summary.html[Dialogs
API]`` and the
link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/overview-summary.html[
``UI Utilities API`` ].
+1. Add a dependency on the NetBeans ``
link:http://bits.netbeans.org/dev/javadoc/org-openide-dialogs/overview-summary.html[Dialogs
API]`` and the
link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/overview-summary.html[
``UI Utilities API`` ].
[start=2]
1.
@@ -468,7 +469,7 @@ image::images/codesnippet_customizer-in-palette-60.png[]
[start=4]
1. You will need to declare the following at the top of the ``BRCustomizer``
class:
-[source,java]
+[source,java,subs="macros"]
----
private Dialog dialog = null;
@@ -483,7 +484,7 @@ private JTextComponent target;
[start=5]
1. Rewrite the ``BRCustomizer`` constructor as follows:
-[source,java]
+[source,java,subs="macros"]
----
public BRCustomizer(BR br, JTextComponent target) {
@@ -498,7 +499,7 @@ public BRCustomizer(BR br, JTextComponent target) {
[start=6]
1. In your ``BRCustomizer`` class, add this method, so that, in the next
steps, you can open the customizer from your ``ActiveEditorDrop``
implementation class:
-[source,java]
+[source,java,subs="macros"]
----
@NbBundle.Messages({
@@ -528,7 +529,7 @@ public boolean showDialog() {
[start=7]
1. Define the ``evaluateInput()`` method, which is called in the
``showDialog()`` method above, as follows:
-[source,java]
+[source,java,subs="macros"]
----
private void evaluateInput() {
@@ -541,7 +542,7 @@ private void evaluateInput() {
[start=8]
1. Hook your customizer into the ``ActiveEditorDrop`` implementation class
as follows (only the lines that are changed are highlighted below):
-[source,java]
+[source,java,subs="verbatim,macros,quotes"]
----
package org.netbeans.modules.newsnippets2;
@@ -549,9 +550,9 @@ package org.netbeans.modules.newsnippets2;
import javax.swing.text.BadLocationException;
import javax.swing.text.JTextComponent;
import org.netbeans.modules.newsnippets2.HTMLPaletteUtilities;
-import
link:https://bits.netbeans.org/dev/javadoc/org-openide-text/org/openide/text/ActiveEditorDrop.html[org.openide.text.ActiveEditorDrop];
+import
link:https://bits.netbeans.org/dev/javadoc/org-openide-text/org/openide/text/ActiveEditorDrop.html[org.openide.text.ActiveEditorDrop];
-public class BR implements
link:https://bits.netbeans.org/dev/javadoc/org-openide-text/org/openide/text/ActiveEditorDrop.html[ActiveEditorDrop]
{
+public class BR implements
link:https://bits.netbeans.org/dev/javadoc/org-openide-text/org/openide/text/ActiveEditorDrop.html[ActiveEditorDrop]
{
*private String comment = "";*
@@ -566,7 +567,7 @@ public class BR implements
link:https://bits.netbeans.org/dev/javadoc/org-openi
}
@Override
- public boolean
link:https://bits.netbeans.org/dev/javadoc/org-openide-text/org/openide/text/ActiveEditorDrop.html#handleTransfer(javax.swing.text.JTextComponent)[handleTransfer(JTextComponent
targetComponent]) {
+ public boolean
link:https://bits.netbeans.org/dev/javadoc/org-openide-text/org/openide/text/ActiveEditorDrop.html#handleTransfer(javax.swing.text.JTextComponent)[handleTransfer(JTextComponent
targetComponent]) {
*BRCustomizer c = new BRCustomizer(this, targetComponent);
boolean accept = c.showDialog();
@@ -602,5 +603,5 @@
link:http://netbeans.apache.org/community/mailing-lists.html[Send Us Your Feedba
For more information about creating and developing NetBeans modules, see the
following resources:
-* link:https://netbeans.apache.org/kb/docs/platform.html[Other Related
Tutorials]
-* link:http://bits.netbeans.org/dev/javadoc/index.html[NetBeans API Javadoc]
+* link:https://netbeans.apache.org/kb/docs/platform.html[Other Related
Tutorials]
+* link:http://bits.netbeans.org/dev/javadoc/index.html[NetBeans API Javadoc]
diff --git
a/netbeans.apache.org/src/content/tutorials/nbm-palette-api2.asciidoc
b/netbeans.apache.org/src/content/tutorials/nbm-palette-api2.asciidoc
index 221fbc105..0476037e0 100644
--- a/netbeans.apache.org/src/content/tutorials/nbm-palette-api2.asciidoc
+++ b/netbeans.apache.org/src/content/tutorials/nbm-palette-api2.asciidoc
@@ -32,22 +32,15 @@
This tutorial demonstrates how to create a component palette that provides
drag-and-drop code snippets for a new file type. Code snippets serve to speed
up coding. The IDE provides a component palette for JSP files, HTML files, and
Form files. In this tutorial, you learn how to create a component palette for
Java source files.
-NOTE: If you are using an earlier version of Apache NetBeans, see
link:74/nbm-palette-api2.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/palette[completed
tutorial source code].
+NOTE: If you are using an earlier version of Apache NetBeans, see
link:74/nbm-palette-api2.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/palette[completed
tutorial source code].
== Introduction to Component Palettes
-In this tutorial, you implement several classes provided by the
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/overview-summary.html[NetBeans
Palette API]. Then you register the new component palette in the
``layer.xml`` file, for the ``text/x-java`` MIME type. The palette that you
create in this way will only be visible if a Java source file is open.
+In this tutorial, you implement several classes provided by the
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/overview-summary.html[NetBeans
Palette API]. Then you register the new component palette in the
``layer.xml`` file, for the ``text/x-java`` MIME type. The palette that you
create in this way will only be visible if a Java source file is open.
-If you do not want to create a new component palette, but only want to add a
code snippet to an existing component palette, see the
link:nbm-palette-api1.html[NetBeans Code Snippet Module Tutorial].
+If you do not want to create a new component palette, but only want to add a
code snippet to an existing component palette, see the
link:nbm-palette-api1.html[NetBeans Code Snippet Module Tutorial].
== Setting up the Module Project
@@ -72,7 +65,7 @@ The IDE creates the ``JavaSourceFilePalette`` project. The
project contains al
=== Specifying the Module's Dependencies
-You will need to subclass several classes that belong to
link:http://bits.netbeans.org/dev/javadoc/index.html[NetBeans APIs]. Each has
to be declared as a module dependency. Use the Project Properties dialog box
for this purpose, as described below.
+You will need to subclass several classes that belong to
link:http://bits.netbeans.org/dev/javadoc/index.html[NetBeans APIs]. Each has
to be declared as a module dependency. Use the Project Properties dialog box
for this purpose, as described below.
[start=1]
@@ -100,7 +93,7 @@ For each of the following APIs, click "Add...", select the
name from the Module
=== Integrating with the Component Palette
-Component Palettes are defined by the
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/overview-summary.html[NetBeans
Component Palette API]. The NetBeans Component Palette API consists of the
following APIs:
+Component Palettes are defined by the
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/overview-summary.html[NetBeans
Component Palette API]. The NetBeans Component Palette API consists of the
following APIs:
|===
|*File* |*Description*
@@ -124,18 +117,18 @@ To use the Palette API to create the palette in this
tutorial, take the followin
[start=2]
1. Replace the default content of the
``JavaSourceFileLayerPaletteFactory.java`` file with the following:
-[source,java]
+[source,java,subs="macros,quotes"]
----
package org.netbeans.modules.javasourcefilepalette;
import java.io.IOException;
import javax.swing.Action;
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-mimelookup/org/netbeans/api/editor/mimelookup/MimeRegistration.html[org.netbeans.api.editor.mimelookup.MimeRegistration];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/DragAndDropHandler.html[org.netbeans.spi.palette.DragAndDropHandler];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteActions.html[org.netbeans.spi.palette.PaletteActions];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteController.html[org.netbeans.spi.palette.PaletteController];
-import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteFactory.html[org.netbeans.spi.palette.PaletteFactory];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-mimelookup/org/netbeans/api/editor/mimelookup/MimeRegistration.html[org.netbeans.api.editor.mimelookup.MimeRegistration];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/DragAndDropHandler.html[org.netbeans.spi.palette.DragAndDropHandler];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteActions.html[org.netbeans.spi.palette.PaletteActions];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteController.html[org.netbeans.spi.palette.PaletteController];
+import
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteFactory.html[org.netbeans.spi.palette.PaletteFactory];
import org.openide.util.Exceptions;
import org.openide.util.Lookup;
import org.openide.util.datatransfer.ExTransferable;
@@ -144,25 +137,25 @@ public class JavaSourceFileLayerPaletteFactory {
private static PaletteController palette = null;
-link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-mimelookup/org/netbeans/api/editor/mimelookup/MimeRegistration.html[@MimeRegistration](mimeType
= "text/x-java", service = PaletteController.class)
- public static
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteController.html[PaletteController]
createPalette() {
+
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-mimelookup/org/netbeans/api/editor/mimelookup/MimeRegistration.html[@MimeRegistration](mimeType
= "text/x-java", service = PaletteController.class)
+ public static
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteController.html[PaletteController]
createPalette() {
try {
if (null == palette) {
- return
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteFactory.html[PaletteFactory].createPalette(
- *//Folder:*
+ return
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteFactory.html[PaletteFactory].createPalette(
+ *//Folder:*
"JavaPalette",
*//Palette Actions:*
- new
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteActions.html[PaletteActions]()
{
+ new
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteActions.html[PaletteActions]()
{
@Override public Action[] getImportActions() {return null;}
@Override public Action[] getCustomPaletteActions()
{return null;}
@Override public Action[] getCustomCategoryActions(Lookup
lkp) {return null;}
@Override public Action[] getCustomItemActions(Lookup lkp)
{return null;}
@Override public Action getPreferredAction(Lookup lkp)
{return null;}
},
- *//Palette Filter:*
+ *//Palette Filter:*
null,
- *//Drag and Drop Handler:*
- new
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/DragAndDropHandler.html[DragAndDropHandler](true)
{
+ *//Drag and Drop Handler:*
+ new
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/DragAndDropHandler.html[DragAndDropHandler](true)
{
@Override public void customize(ExTransferable et, Lookup
lkp) {}
});
}
@@ -202,10 +195,10 @@ After you have created or added the above files to the
NetBeans module, you decl
</folder>
----
-The above can be generated automatically for you if you use the
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteItemRegistration.html[@PaletteItemRegistration]
annotation, as shown below, in a ``package-info.java`` class:
+The above can be generated automatically for you if you use the
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteItemRegistration.html[@PaletteItemRegistration]
annotation, as shown below, in a ``package-info.java`` class:
-[source,java]
+[source,java,subs="macros"]
----
@PaletteItemRegistration(
@@ -222,7 +215,7 @@ package org.netbeans.modules.javasourcefilepalette;
import org.netbeans.spi.palette.PaletteItemRegistration;
----
-For all the details on the information referred to in this subsection, work
through the link:nbm-palette-api1.html[NetBeans Code Snippet Module Tutorial].
+For all the details on the information referred to in this subsection, work
through the link:nbm-palette-api1.html[NetBeans Code Snippet Module Tutorial].
== Building and Installing the Module
@@ -247,5 +240,5 @@
link:http://netbeans.apache.org/community/mailing-lists.html[Send Us Your Feedba
For more information about creating and developing NetBeans modules, see the
following resources:
-* link:https://netbeans.apache.org/kb/docs/platform.html[Other Related
Tutorials]
-* link:http://bits.netbeans.org/dev/javadoc/index.html[NetBeans API Javadoc]
+* link:https://netbeans.apache.org/kb/docs/platform.html[Other Related
Tutorials]
+* link:http://bits.netbeans.org/dev/javadoc/index.html[NetBeans API Javadoc]
diff --git
a/netbeans.apache.org/src/content/tutorials/nbm-porting-basic.asciidoc
b/netbeans.apache.org/src/content/tutorials/nbm-porting-basic.asciidoc
index 555c1edc7..a4fd4a2f9 100644
--- a/netbeans.apache.org/src/content/tutorials/nbm-porting-basic.asciidoc
+++ b/netbeans.apache.org/src/content/tutorials/nbm-porting-basic.asciidoc
@@ -261,7 +261,7 @@ Click OK. Next, add another dependency, this time on the
Utilities API, which pr
1. Now you can annotate your `Action` class as follows:
-[source,java]
+[source,java,subs="macros"]
----
package com.toy.anagrams.core;
@@ -430,7 +430,7 @@ Next, we will create an action that will obtain the content
of a Manifest file,
[start=3]
1. Create a Java class named `SetScrambledAnagramsAction`, in the
`com.toy.anagrams.core` package, and define it as follows:
-[source,java]
+[source,java,subs="macros,quotes"]
----
package com.toy.anagrams.core;
diff --git
a/netbeans.apache.org/src/content/tutorials/nbm-projecttypeant.asciidoc
b/netbeans.apache.org/src/content/tutorials/nbm-projecttypeant.asciidoc
index 8a8eda8d5..7706c9830 100644
--- a/netbeans.apache.org/src/content/tutorials/nbm-projecttypeant.asciidoc
+++ b/netbeans.apache.org/src/content/tutorials/nbm-projecttypeant.asciidoc
@@ -175,7 +175,7 @@ Do the following:
1. Change the default code to the following. Notice that we begin with an
annotation that registers the project as applying to projects that have a
``project.xml`` as defined above.
-[source,java]
+[source,java,subs="macros"]
----
@AntBasedProjectRegistration(type = "org.netbeans.demo.project.DemoProject",
@@ -184,7 +184,7 @@ sharedName = "data",
sharedNamespace = "https://netbeans.org/ns/demo-project/1",
privateName = "project-private",
privateNamespace = "https://netbeans.org/ns/demo-project-private/1")
-public class DemoProject implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectapi/org/netbeans/api/project/Project.html[Project]
{
+public class DemoProject implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectapi/org/netbeans/api/project/Project.html[Project]
{
final AntProjectHelper helper;
@@ -204,7 +204,7 @@ public class DemoProject implements
link:http://bits.netbeans.org/dev/javadoc/o
return helper.getProjectDirectory();
}
- private final class Info implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectapi/org/netbeans/api/project/ProjectInformation.html[ProjectInformation]
{
+ private final class Info implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectapi/org/netbeans/api/project/ProjectInformation.html[ProjectInformation]
{
@Override
public String getName() {
@@ -262,10 +262,10 @@ Do the following:
1. Change the default code to the following:
-[source,java]
+[source,java,subs="macros"]
----
-class DemoProjectLogicalView implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectuiapi/org/netbeans/spi/project/ui/LogicalViewProvider.html[LogicalViewProvider]
{
+class DemoProjectLogicalView implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectuiapi/org/netbeans/spi/project/ui/LogicalViewProvider.html[LogicalViewProvider]
{
private final DemoProject project;
@@ -361,11 +361,11 @@ image::images/projecttypes_demo-2.png[]
Create a new class called ``DemoNodeFactory`` and define it as follows:
-[source,java]
+[source,java,subs="macros"]
----
@NodeFactory.Registration(projectType="org-netbeans-demo-project-DemoProject",
position=200)
-public class DemoNodeFactory implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectuiapi/org/netbeans/spi/project/ui/support/NodeFactory.html[NodeFactory]
{
+public class DemoNodeFactory implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectuiapi/org/netbeans/spi/project/ui/support/NodeFactory.html[NodeFactory]
{
public DemoNodeFactory() {
}
@@ -434,11 +434,11 @@ Do the following:
1. Replace ``DemoNodeFactory`` with the following:
-[source,java]
+[source,java,subs="macros"]
----
@NodeFactory.Registration(projectType="org-netbeans-demo-project-DemoProject",
position=200)
-public class DemoNodeFactory implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectuiapi/org/netbeans/spi/project/ui/support/NodeFactory.html[NodeFactory]
{
+public class DemoNodeFactory implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectuiapi/org/netbeans/spi/project/ui/support/NodeFactory.html[NodeFactory]
{
public DemoNodeFactory() {
}
@@ -465,10 +465,10 @@ public class DemoNodeFactory implements
link:http://bits.netbeans.org/dev/javad
Create a new class called ``DemoFilterNode`` and define it as follows:
-[source,java]
+[source,java,subs="macros"]
----
-public class DemoFilterNode extends
link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/FilterNode.html[FilterNode]
{
+public class DemoFilterNode extends
link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/FilterNode.html[FilterNode]
{
private static Image smallImage =
ImageUtilities.loadImage("org/netbeans/demo/project/icon1.png");
// NOI18N
@@ -526,7 +526,7 @@ Do the following:
1. First, add an ``ActionProvider`` implementation to the project's lookup,
as shown below. Note that included in the ``DemoActionProvider`` is the Build
command:
-[source,java]
+[source,java,subs="macros,quotes"]
----
@AntBasedProjectRegistration(type = "org.netbeans.demo.project.DemoProject",
@@ -535,7 +535,7 @@ sharedName = "data",
sharedNamespace = "https://netbeans.org/ns/demo-project/1",
privateName = "project-private",
privateNamespace = "https://netbeans.org/ns/demo-project-private/1")
-public class DemoProject implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectapi/org/netbeans/api/project/Project.html[Project]
{
+public class DemoProject implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectapi/org/netbeans/api/project/Project.html[Project]
{
final AntProjectHelper helper;
@@ -547,9 +547,9 @@ public class DemoProject implements
link:http://bits.netbeans.org/dev/javadoc/o
public Lookup getLookup() {
return Lookups.fixed(new Object[]{
new Info(),
- new DemoProjectLogicalView(this),*
- new DemoActionProvider(),
- * });
+ new DemoProjectLogicalView(this),
+ #new DemoActionProvider(),#
+ });
}
@Override
@@ -557,7 +557,7 @@ public class DemoProject implements
link:http://bits.netbeans.org/dev/javadoc/o
return helper.getProjectDirectory();
}
- private final class Info implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectapi/org/netbeans/api/project/ProjectInformation.html[ProjectInformation]
{
+ private final class Info implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectapi/org/netbeans/api/project/ProjectInformation.html[ProjectInformation]
{
@Override
public String getName() {
@@ -587,8 +587,8 @@ public class DemoProject implements
link:http://bits.netbeans.org/dev/javadoc/o
return DemoProject.this;
}
}
-*
- private final class DemoActionProvider implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectapi/org/netbeans/spi/project/ActionProvider.html[ActionProvider]
{
+
+ #private final class DemoActionProvider implements
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectapi/org/netbeans/spi/project/ActionProvider.html[ActionProvider]
{
private String[] supported = new String[]{
ActionProvider.COMMAND_DELETE,
@@ -631,8 +631,8 @@ public class DemoProject implements
link:http://bits.netbeans.org/dev/javadoc/o
throw new IllegalArgumentException(command);
}
}
- }
-*
+ }#
+
}
----
diff --git a/netbeans.apache.org/src/content/tutorials/nbm-test.asciidoc
b/netbeans.apache.org/src/content/tutorials/nbm-test.asciidoc
index 169e6651a..270207c86 100644
--- a/netbeans.apache.org/src/content/tutorials/nbm-test.asciidoc
+++ b/netbeans.apache.org/src/content/tutorials/nbm-test.asciidoc
@@ -133,13 +133,13 @@ The NetBeans Platform's extension to JUnit is named "
link:http://bits.netbeans.
An example unit test for the NetBeans Platform Paint sample:
-[source,java]
+[source,java,subs="macros"]
----
import org.netbeans.junit.*;
import org.netbeans.paint.PaintCanvas;
-public class PaintCanvasTest extends
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-nbjunit/org/netbeans/junit/NbTestCase.html[NbTestCase]
{
+public class PaintCanvasTest extends
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-nbjunit/org/netbeans/junit/NbTestCase.html[NbTestCase]
{
public PaintCanvasTest(java.lang.String testName) {
super(testName);
diff --git a/netbeans.apache.org/src/content/tutorials/nbm-wizard.asciidoc
b/netbeans.apache.org/src/content/tutorials/nbm-wizard.asciidoc
index 22e4ecf2f..a91b27d20 100644
--- a/netbeans.apache.org/src/content/tutorials/nbm-wizard.asciidoc
+++ b/netbeans.apache.org/src/content/tutorials/nbm-wizard.asciidoc
@@ -165,11 +165,9 @@ public final class DemoWizardAction implements
ActionListener {
[start=2]
1. At the top of the Action class, notice that some Action annotations have
been commented out. Remove the comments and add a category and a position, so
that the annotations are as follows:
-link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/ActionID.html[@ActionID]
-
-[source,java]
+[source,java,subs="macros"]
----
-
+link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/ActionID.html[@ActionID]
(category="Demo", id="org.demo.wizard.DemoWizardAction")
link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/ActionRegistration.html[@ActionRegistration](displayName="Open
Demo Wizard")
link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/ActionReference.html[@ActionReference](path="Menu/Tools",
position=10)
@@ -305,7 +303,7 @@ public void storeSettings(WizardDescriptor wiz) {
1. Next, use the ``DemoWizardAction.java`` file to retrieve the properties
you have set and do something with them:
-[source,java]
+[source,java,subs="quotes"]
----
if (DialogDisplayer.getDefault().notify(wiz) ==
WizardDescriptor.FINISH_OPTION) {
@@ -391,7 +389,7 @@ public boolean isValid() {
And, when ``validate()`` is called, which is when the "Next" button is
clicked, return false:
-[source,java]
+[source,java,subs="quotes"]
----
@Override
@@ -430,7 +428,7 @@ In this section, you learn how to store the data when the
wizard closes and retr
1. In ``DemoWizardPanel1.java`` , override the ``readSettings`` and the
``storeSettings`` methods as follows:
-[source,java]
+[source,java,subs="quotes"]
----
@Override
@@ -499,7 +497,7 @@ image::images/wizard_70_branding-1.png[]
[source,java]
----
-CTL_NEXT=&Advance >
+CTL_NEXT=&Advance >
----
Other strings you might like to brand are as follows:
diff --git a/netbeans.apache.org/src/content/tutorials/nbm-workflow.asciidoc
b/netbeans.apache.org/src/content/tutorials/nbm-workflow.asciidoc
index e10cfb0b2..7dca76732 100644
--- a/netbeans.apache.org/src/content/tutorials/nbm-workflow.asciidoc
+++ b/netbeans.apache.org/src/content/tutorials/nbm-workflow.asciidoc
@@ -192,18 +192,18 @@ image::images/workflow_72_new-control-3.png[]
[start=4]
1. Create a new Java class named ``Installer`` in the package
``org.prediction.control`` . Define it as follows and click the links for
further information:
-[source,java]
+[source,java,subs="macros"]
----
package org.prediction.control;
-import
link:http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/OnStart.html[org.openide.modules.OnStart];
+import
link:http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/OnStart.html[org.openide.modules.OnStart];
import org.openide.windows.WindowManager;
import org.openide.windows.WindowSystemEvent;
-import
link:http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/WindowSystemListener.html[org.openide.windows.WindowSystemListener];
+import
link:http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/WindowSystemListener.html[org.openide.windows.WindowSystemListener];
link:http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/OnStart.html[@OnStart]
-public class Installer implements Runnable,
link:http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/WindowSystemListener.html[WindowSystemListener]
{
+public class Installer implements Runnable,
link:http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/WindowSystemListener.html[WindowSystemListener]
{
@Override
public void run() {
@@ -212,7 +212,7 @@ public class Installer implements Runnable,
link:http://bits.netbeans.org/dev/j
@Override
public void beforeLoad(WindowSystemEvent wse) {
-link:http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/WindowManager.html#setRole(java.lang.String)[WindowManager.getDefault().setRole("specify")];
+
link:http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/WindowManager.html#setRole(java.lang.String)[WindowManager.getDefault().setRole("specify")];
WindowManager.getDefault().removeWindowSystemListener(this);
}
@@ -243,17 +243,17 @@ In this section, you create new menu items to control
switching between canvases
In each canvas module, create an ActionListener such as the below for
switching between roles. The example below is for the specify role, create the
same class in the other two modules, changing "specify" to "diagnose" and
"forecast" for the other modules.
-[source,java]
+[source,java,subs="macros"]
----
package org.prediction.specify;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
-import
link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/ActionID.html[org.openide.awt.ActionID];
-import
link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/ActionReference.html[org.openide.awt.ActionReference];
-import
link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/ActionRegistration.html[org.openide.awt.ActionRegistration];
-import
link:http://bits.netbeans.org/dev/javadoc/org-openide-util/org/openide/util/NbBundle.Messages.html[org.openide.util.NbBundle.Messages];
+import
link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/ActionID.html[org.openide.awt.ActionID];
+import
link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/ActionReference.html[org.openide.awt.ActionReference];
+import
link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/ActionRegistration.html[org.openide.awt.ActionRegistration];
+import
link:http://bits.netbeans.org/dev/javadoc/org-openide-util/org/openide/util/NbBundle.Messages.html[org.openide.util.NbBundle.Messages];
import org.openide.windows.WindowManager;
link:http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/ActionID.html[@ActionID](
@@ -269,7 +269,7 @@ public final class SwitchToSpecifyRole implements
ActionListener {
@Override
public void actionPerformed(ActionEvent e) {
-link:http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/WindowManager.html#setRole(java.lang.String)[WindowManager.getDefault().setRole("specify")];
+
link:http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/WindowManager.html#setRole(java.lang.String)[WindowManager.getDefault().setRole("specify")];
}
}
diff --git
a/netbeans.apache.org/src/content/wiki/DevFaqAccessSourcesWeb.asciidoc
b/netbeans.apache.org/src/content/wiki/DevFaqAccessSourcesWeb.asciidoc
index 5c5d10f61..9baa00020 100644
--- a/netbeans.apache.org/src/content/wiki/DevFaqAccessSourcesWeb.asciidoc
+++ b/netbeans.apache.org/src/content/wiki/DevFaqAccessSourcesWeb.asciidoc
@@ -33,7 +33,7 @@
1. Go to the nightly build download site:
-[source,java]
+[source,java,subs="macros"]
----
link:http://bits.netbeans.org/dev/nightly/[http://bits.netbeans.org/dev/nightly/]
@@ -51,7 +51,7 @@
[start=4]
. Click the link or add "zip/" to the end of the URL in your browser's
address bar manually and hit enter. In other words, the complete URL might
look like this:
-[source,java]
+[source,java,subs="macros"]
----
link:http://bits.netbeans.org/dev/nightly/2010-06-11_00-01-15/zip/[http://bits.netbeans.org/dev/nightly/2010-06-11_00-01-15/zip/]
diff --git
a/netbeans.apache.org/src/content/wiki/DevFaqDotSettingsFiles.asciidoc
b/netbeans.apache.org/src/content/wiki/DevFaqDotSettingsFiles.asciidoc
index f2d8a8982..cdda518c9 100644
--- a/netbeans.apache.org/src/content/wiki/DevFaqDotSettingsFiles.asciidoc
+++ b/netbeans.apache.org/src/content/wiki/DevFaqDotSettingsFiles.asciidoc
@@ -41,7 +41,7 @@ Settings files are also useful if you are declaring some
objects in a layer file
=== Example
-[source,xml]
+[source,xml,subs="verbatim,macros"]
----
<?xml version="1.0"?>
diff --git a/netbeans.apache.org/src/content/wiki/DevFaqHelpGuidelines.asciidoc
b/netbeans.apache.org/src/content/wiki/DevFaqHelpGuidelines.asciidoc
index 03836e9c9..90f7b6ed8 100644
--- a/netbeans.apache.org/src/content/wiki/DevFaqHelpGuidelines.asciidoc
+++ b/netbeans.apache.org/src/content/wiki/DevFaqHelpGuidelines.asciidoc
@@ -114,7 +114,7 @@ Every help set has a Map file. Every help ID should have a
unique entry in _one
[source,java]
----
-&lt;mapID target="UniqueHelpId"
url="PathFromMapFileToHelpFileInHelpSet"/&gt;
+<mapID target="UniqueHelpId" url="PathFromMapFileToHelpFileInHelpSet"/>
----
=== How do I find unmapped help IDs?
@@ -181,7 +181,7 @@ in the desired category.
For example, say you wanted to list a help file under the Java Project Basics
-> Building Java Applications category. You would
enter the following in your TOC file:
-[source,xml]
+[source,xml,subs="verbatim,macros"]
----
<?xml version='1.0' encoding='ISO-8859-1' ?>
@@ -270,7 +270,7 @@ Use the following syntax to link to the glossary page:
Use the following syntax:
-[source,xml]
+[source,xml,subs="verbatim,macros"]
----
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
diff --git
a/netbeans.apache.org/src/content/wiki/DevFaqHowToChangeUpdateCenterURL.asciidoc
b/netbeans.apache.org/src/content/wiki/DevFaqHowToChangeUpdateCenterURL.asciidoc
index fde7d6598..ce5f0c848 100644
---
a/netbeans.apache.org/src/content/wiki/DevFaqHowToChangeUpdateCenterURL.asciidoc
+++
b/netbeans.apache.org/src/content/wiki/DevFaqHowToChangeUpdateCenterURL.asciidoc
@@ -31,7 +31,7 @@
Use UpdateUnitProviderFactory
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-autoupdate-services/org/netbeans/api/autoupdate/UpdateUnitProviderFactory.html[http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-autoupdate-services/org/netbeans/api/autoupdate/UpdateUnitProviderFactory.html]
-[source,java]
+[source,java,subs="verbatim,macros"]
----
List<UpdateUnitProvider> updateUnitProviders =
UpdateUnitProviderFactory.getDefault().getUpdateUnitProviders(true);
diff --git a/netbeans.apache.org/src/content/wiki/DevFaqMIMEResolver.asciidoc
b/netbeans.apache.org/src/content/wiki/DevFaqMIMEResolver.asciidoc
index c45c647ad..3295e371a 100644
--- a/netbeans.apache.org/src/content/wiki/DevFaqMIMEResolver.asciidoc
+++ b/netbeans.apache.org/src/content/wiki/DevFaqMIMEResolver.asciidoc
@@ -40,7 +40,7 @@ Description of declarative MIME resolve can be found in
link:http://bits.netbean
Applies to: NetBeans 6.1+, pattern and name elements to 6.7+
----
-[source,java]
+[source,java,subs="macros"]
----
Related: link:DevFaqFileRecognition.asciidoc[DevFaqFileRecognition]
diff --git a/netbeans.apache.org/src/content/wiki/DevFaqSignNbm.asciidoc
b/netbeans.apache.org/src/content/wiki/DevFaqSignNbm.asciidoc
index 967d69446..64433d49f 100644
--- a/netbeans.apache.org/src/content/wiki/DevFaqSignNbm.asciidoc
+++ b/netbeans.apache.org/src/content/wiki/DevFaqSignNbm.asciidoc
@@ -222,7 +222,7 @@ Yes.
link:https://github.com/mojohaus/nbm-maven-plugin[nbm-maven-plugin] will si
. Update the `nbm-maven-plugin`-configuration in the pom.xml like this
`
-[source,xml]
+[source,xml,subs="verbatim,macros"]
----
<plugin>
diff --git a/netbeans.apache.org/src/content/wiki/DevFaqWhatIsACluster.asciidoc
b/netbeans.apache.org/src/content/wiki/DevFaqWhatIsACluster.asciidoc
index 8a9c818c9..cfa25ff1a 100644
--- a/netbeans.apache.org/src/content/wiki/DevFaqWhatIsACluster.asciidoc
+++ b/netbeans.apache.org/src/content/wiki/DevFaqWhatIsACluster.asciidoc
@@ -75,33 +75,16 @@ In short, while it is typical for all of the parts of an
application to be under
Here is the structure of the (comparatively small - it contains only one
module) `ergonomics` cluster in a NetBeans 6.9 development build.
-<ul>
+* *ergonomics/* _The cluster directory_
+** .lastModified _An empty file used as a timestamp so NetBeans can cache
information about the cluster for performance, but know if its cache is
out-of-date_
+** *config/* _Contains metadata about module state_
+*** *Modules/* _Contains files which tell NetBeans some things about the
module, mostly relating to if/when it should be enabled_
+**** org-netbeans-modules-ide-ergonomics.xml _Metadata about the Ergonomics
module, whose code-name is org.netbeans.modules.ide.ergonomics_
+** *modules/* _Directory that contains the actual (multiple) module JAR files
and any 3rd-party libraries they include_
+*** org-netbeans-modules-ide-ergonomics.jar _This is the actual JAR file of
the Ergonomics module's classes_
+** *update_tracking/* _Contains metadata about the module which is needed by
Tools > Plugins_
+*** org-netbeans-modules-ide-ergonomics.xml _Contains installation date,
version and CRC checksums of module JAR and enablement data_
-[source,xml]
-----
-
- <li>`*ergonomics/* <font color="gray"><i>The cluster directory</i></font>`
- <ul>
- <li>`.lastModified <font color="gray"><i>An empty file used as a timestamp
so NetBeans can cache information about the cluster for performance, but know
if its cache is out-of-date</i></font>`</li>
- <li>`*config/* <font color="gray"><i>Contains metadata about module
state</i></font>`
- <ul>
- <li>`*Modules/* <font color="gray"><i>Contains files which tell NetBeans
some things about the module, mostly relating to if/when it should be
enabled</i></font>`
- <ul>
- <li>`org-netbeans-modules-ide-ergonomics.xml <font
color="gray"><i>Metadata about the Ergonomics module, whose code-name is
org.netbeans.modules.ide.ergonomics</i></font>`</li>
- </ul></li>
- </ul></li>
- <li>`*modules/* <font color="gray"><i>Directory that contains the actual
(multiple) module JAR files and any 3rd-party libraries they include</i></font>`
- <ul>
- <li>`org-netbeans-modules-ide-ergonomics.jar <font color="gray"><i>This
is the actual JAR file of the Ergonomics module's classes</i></font>`</li>
- </ul></li>
- <li>`*update_tracking/* <font color="gray"><i>Contains metadata about the
module which is needed by Tools > Plugins</i></font>`
- <ul>
- <li>`org-netbeans-modules-ide-ergonomics.xml <font color="gray"><i>
Contains installation date, version and CRC checksums of module JAR and
enablement data</i></font>`</li>
- </ul></li>
- </ul></li>
-----
-
-</ul>
In a larger cluster, all of the child directories described above would
contain one file for each module (i.e. module JAR file, etc.).
@@ -109,18 +92,18 @@ In a larger cluster, all of the child directories
described above would contain
The metadata in `$CLUSTER/config/Modules/$MODULE.xml` is fairly simple and
straightforward - it enables the NetBeans module-system to determine when a
module should be loaded:
-[source,xml]
+[source,xml,subs="verbatim,macros"]
----
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE module PUBLIC "-//NetBeans//DTD Module Status 1.0//EN"
-
"link:http://www.netbeans.org/dtds/module-status-1_0.dtd">[http://www.netbeans.org/dtds/module-status-1_0.dtd&quot;&gt];
-<module name="org.netbeans.modules.ide.ergonomics">
- <param name="autoload">false</param>
- <param name="eager">false</param>
- <param name="enabled">true</param>
- <param
name="jar">modules/org-netbeans-modules-ide-ergonomics.jar</param>
- <param name="reloadable">false</param>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE module PUBLIC "-//NetBeans//DTD Module Status 1.0//EN"
+
"link:http://www.netbeans.org/dtds/module-status-1_0.dtd[http://www.netbeans.org/dtds/module-status-1_0.dtd]">
+<module name="org.netbeans.modules.ide.ergonomics">
+ <param name="autoload">false</param>
+ <param name="eager">false</param>
+ <param name="enabled">true</param>
+ <param name="jar">modules/org-netbeans-modules-ide-ergonomics.jar</param>
+ <param name="reloadable">false</param>
</module>
----
@@ -129,14 +112,14 @@ Similarly, the metadata in
`$CLUSTER/update_tracking/$MODULE.xml` contains data
[source,xml]
----
-<?xml version="1.0" encoding="UTF-8"?>
-<module codename="org.netbeans.modules.ide.ergonomics">
- <module_version install_time="1266357743218"
last="true"
- origin="installer"
specification_version="1.7">
- <file crc="3871934416"
-
name="config/Modules/org-netbeans-modules-ide-ergonomics.xml"/>
- <file crc="1925067367"
-
name="modules/org-netbeans-modules-ide-ergonomics.jar"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<module codename="org.netbeans.modules.ide.ergonomics">
+ <module_version install_time="1266357743218" last="true"
+ origin="installer" specification_version="1.7">
+ <file crc="3871934416"
+ name="config/Modules/org-netbeans-modules-ide-ergonomics.xml"/>
+ <file crc="1925067367"
+ name="modules/org-netbeans-modules-ide-ergonomics.jar"/>
</module_version>
</module>
----
---------------------------------------------------------------------
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