Skip to content

Commit

Permalink
use unmodified code
Browse files Browse the repository at this point in the history
  • Loading branch information
ebarboni committed Sep 22, 2022
1 parent 82143e9 commit d6fdd74
Show file tree
Hide file tree
Showing 12 changed files with 102 additions and 102 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,subs="macros,quotes"]
[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:
Expand All @@ -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,subs="quotes"]
[source,java,subs="verbatim,quotes"]
----
public void actionPerformed(ActionEvent ev) {
Expand All @@ -292,7 +292,7 @@ public void actionPerformed(ActionEvent ev) {
} else {
*try {
javaSource.runUserActionTask(new Task&lt;CompilationController&gt;() {
javaSource.runUserActionTask(new Task<CompilationController>() {
public void run(CompilationController arg0) throws Exception {
throw new UnsupportedOperationException("Not supported yet.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,subs="quotes"]
[source,java,subs="verbatim,quotes"]
----
@Override
Expand Down
10 changes: 5 additions & 5 deletions netbeans.apache.org/src/content/tutorials/nbm-emf.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ 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,subs="macros"]
[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] {
Expand All @@ -348,7 +348,7 @@ public class LibraryNode extends link:http://bits.netbeans.org/dev/javadoc/org-o
setDisplayName(library.getName());
}
private static class BookOrBorrowerChildFactory extends link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/ChildFactory.html[ChildFactory]&lt;Object&gt; {
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;
Expand All @@ -358,7 +358,7 @@ public class LibraryNode extends link:http://bits.netbeans.org/dev/javadoc/org-o
@Override
protected boolean createKeys(List list) {
EList&lt;Book&gt; books = library.getBooks();
EList<Book> books = library.getBooks();
for (Book book : books) {
list.add(book);
}
Expand Down Expand Up @@ -399,13 +399,13 @@ public class LibraryNode extends link:http://bits.netbeans.org/dev/javadoc/org-o
1. Create a new Java class named `LibraryChildFactory`, which is a factory class for creating new `LibraryNode`s:


[source,java,subs="macros"]
[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> {
@Override
protected boolean createKeys(List&lt;Library&gt; list) {
protected boolean createKeys(List<Library> list) {
EXTLibraryFactory factory = EXTLibraryFactory.eINSTANCE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ void recover (ParseException ex, int recoveryPoint) {
Token t;
do {
t = getNextToken ();
} while (t.kind != EOF &amp;&amp; t.kind != recoveryPoint);
} while (t.kind != EOF && t.kind != recoveryPoint);
}
----

Expand Down Expand Up @@ -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,subs="macros"]
[source,java,subs="verbatim,macros"]
----
package org.simplejava.parser;
Expand Down Expand Up @@ -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") &amp;&amp; type == null) {
if (id.name().equals("FORMAL_COMMENT") && type == null) {
type = COMMENT_FOLD_TYPE;
start = offset;
try {
Expand Down
14 changes: 7 additions & 7 deletions netbeans.apache.org/src/content/tutorials/nbm-nodesapi3.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -271,25 +271,25 @@ Note that in the code above, we create a node called ``CategoryNode`` . We will
[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)] {
final Node dropNode = NodeTransfer.node( t,
DnDConstants.ACTION_COPY_OR_MOVE+NodeTransfer.CLIPBOARD_CUT );
if( null != dropNode ) {
final Movie movie = (Movie)dropNode.getLookup().lookup( Movie.class );
if( null != movie &amp;&amp; !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 &amp; DnDConstants.ACTION_MOVE) != 0 ) {
if( (action & DnDConstants.ACTION_MOVE) != 0 ) {
dropNode.getParentNode().getChildren().remove( new Node[] {dropNode} );
}
return null;
Expand Down Expand Up @@ -415,9 +415,9 @@ public class MovieChildren extends link:https://bits.netbeans.org/dev/javadoc/or
this.category = Category;
}
protected java.util.List&lt;Node&gt; 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 &lt; 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]));
Expand Down
40 changes: 20 additions & 20 deletions netbeans.apache.org/src/content/tutorials/nbm-palette-api1.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ You need to create an XML file that defines the code snippet, together with a re
[start=3]
1. Define the ``package-info.java`` class as follows.

[source,java,subs="macros"]
[source,java,subs="verbatim,macros"]
----
link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/spi/palette/PaletteItemRegistration.html[@PaletteItemRegistration]
Expand All @@ -104,9 +104,9 @@ link:http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-palette/org/netbeans/
itemid = "BR",
icon32 = "org/netbeans/modules/newsnippets1/BR32.png",
icon16 = "org/netbeans/modules/newsnippets1/BR16.png",
body = "&lt;br&gt;",
body = "<br>",
name = "New Line",
tooltip = "&lt;br&gt;")
tooltip = "<br>")
package org.netbeans.modules.newsnippets1;
import org.netbeans.spi.palette.PaletteItemRegistration;
Expand Down Expand Up @@ -212,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,subs="macros"]
[source,java,subs="verbatim,macros"]
----
package org.netbeans.modules.newsnippets2;
Expand All @@ -228,7 +228,7 @@ public class BR implements link:http://bits.netbeans.org/dev/javadoc/org-openide
}
private String createBody() {
String Br = "&lt;br&gt;";
String Br = "<br>";
return Br;
}
Expand Down Expand Up @@ -358,26 +358,26 @@ 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,subs="quotes"]
[source,xml,subs="verbatim,quotes"]
----
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE editor_palette_item PUBLIC "*-//NetBeans//Editor Palette Item 1.1//EN*"
"https://netbeans.org/dtds/*editor-palette-item-1_1.dtd*"&gt;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE editor_palette_item PUBLIC "*-//NetBeans//Editor Palette Item 1.1//EN*"
"https://netbeans.org/dtds/*editor-palette-item-1_1.dtd*">
&lt;editor_palette_item version="1.0"&gt;
<editor_palette_item version="1.0">
&lt;class name="org.netbeans.modules.newsnippets2.BR" /&gt;
<class name="org.netbeans.modules.newsnippets2.BR" />
&lt;icon16 urlvalue="org/netbeans/modules/newsnippets2/resources/BR16.png" /&gt;
&lt;icon32 urlvalue="org/netbeans/modules/newsnippets2/resources/BR32.png" /&gt;
<icon16 urlvalue="org/netbeans/modules/newsnippets2/resources/BR16.png" />
<icon32 urlvalue="org/netbeans/modules/newsnippets2/resources/BR32.png" />
*&lt;inline-description&gt;
&lt;display-name&gt;New Line&lt;/display-name&gt;
&lt;tooltip&gt; &lt;![CDATA[ &lt;br&gt; ]]&gt;&lt;/tooltip&gt;
&lt;/inline-description&gt;*
*<inline-description>
<display-name>New Line</display-name>
<tooltip> <![CDATA[ <br> ]]></tooltip>
</inline-description>*
&lt;/editor_palette_item>
</editor_palette_item>
----

NOTE: You can choose either of the two approaches above, depending on your requirements.
Expand Down Expand Up @@ -542,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,subs="macros,quotes"]
[source,java,subs="verbatim,macros,quotes"]
----
package org.netbeans.modules.newsnippets2;
Expand All @@ -562,7 +562,7 @@ public class BR implements link:https://bits.netbeans.org/dev/javadoc/org-openid
private String createBody() {
*comment = getComment();
String Br = "<!-- " + comment + " -->"
+ "\n &lt;br&gt;";*
+ "\n <br>";*
return Br;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ image::images/wizard_70_branding-1.png[]
[source,java]
----
CTL_NEXT=&amp;Advance >
CTL_NEXT=&Advance >
----

Other strings you might like to brand are as follows:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ Settings files are also useful if you are declaring some objects in a layer file

=== Example

[source,xml,subs="macros"]
[source,xml,subs="verbatim,macros"]
----
&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE settings PUBLIC "-//NetBeans//DTD Session settings 1.0//EN"
"link:http://www.netbeans.org/dtds/sessionsettings-1_0.dtd[http://www.netbeans.org/dtds/sessionsettings-1_0.dtd]"&gt;
&lt;settings version="1.0"&gt;
&lt;module name="org.netbeans.core.io.ui/1" spec="1.6"/&gt;
&lt;instanceof class="org.openide.windows.TopComponent"/&gt;
&lt;instanceof class="org.netbeans.core.io.ui.IOWindow$IOWindowImpl"/&gt;
&lt;serialdata class="org.netbeans.core.io.ui.IOWindow$IOWindowImpl"&gt;
<?xml version="1.0"?>
<!DOCTYPE settings PUBLIC "-//NetBeans//DTD Session settings 1.0//EN"
"link:http://www.netbeans.org/dtds/sessionsettings-1_0.dtd[http://www.netbeans.org/dtds/sessionsettings-1_0.dtd]">
<settings version="1.0">
<module name="org.netbeans.core.io.ui/1" spec="1.6"/>
<instanceof class="org.openide.windows.TopComponent"/>
<instanceof class="org.netbeans.core.io.ui.IOWindow$IOWindowImpl"/>
<serialdata class="org.netbeans.core.io.ui.IOWindow$IOWindowImpl">
ACED0005737200296F72672E6F70656E6964652E7...
&lt;/serialdata&gt;
&lt;/settings&gt;
</serialdata>
</settings>
----

== Apache Migration Information
Expand Down
40 changes: 20 additions & 20 deletions netbeans.apache.org/src/content/wiki/DevFaqHelpGuidelines.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -181,19 +181,19 @@ 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,subs="macros"]
[source,xml,subs="verbatim,macros"]
----
&lt;?xml version='1.0' encoding='ISO-8859-1' ?&gt;
&lt;!DOCTYPE toc PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp TOC Version 2.0//EN"
"link:http://java.sun.com/products/javahelp/toc_2_0.dtd[http://java.sun.com/products/javahelp/toc_2_0.dtd]"&gt;
&lt;toc version="2.0"&gt;
&lt;tocitem text="Java Project Basics"&gt;
&lt;tocitem text="Building Java Applications"&gt;
&lt;tocitem text="My Help File" target="my_target"/&gt;
&lt;/tocitem&gt;
&lt;/tocitem&gt;
&lt;/toc&gt;
<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE toc PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp TOC Version 2.0//EN"
"link:http://java.sun.com/products/javahelp/toc_2_0.dtd[http://java.sun.com/products/javahelp/toc_2_0.dtd]">
<toc version="2.0">
<tocitem text="Java Project Basics">
<tocitem text="Building Java Applications">
<tocitem text="My Help File" target="my_target"/>
</tocitem>
</tocitem>
</toc>
----

"My Help File" would get merged in at the end of the topics in the category.
Expand Down Expand Up @@ -270,17 +270,17 @@ Use the following syntax to link to the glossary page:

Use the following syntax:

[source,xml,subs="macros"]
[source,xml,subs="verbatim,macros"]
----
&lt;object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"&gt;
&lt;!-- Enter the URL below --&gt;
&lt;param name="content" value="link:http://www.netbeans.org/kb/41/freeform-config.html[http://www.netbeans.org/kb/41/freeform-config.html]"&gt;
&lt;!-- Enter the display text below. The &lt;html&gt; and &lt;u&gt; make the text look like a link. --&gt;
&lt;param name="text" value="&lt;html&gt;&lt;u&gt;link:http://www.netbeans.org/kb/41/freeform-config.html[http://www.netbeans.org/kb/41/freeform-config.html]&lt;/u&gt;&lt;/html&gt;"&gt;
&lt;param name="textFontSize" value="medium"&gt;
&lt;param name="textColor" value="blue"&gt;
&lt;/object&gt;
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<!-- Enter the URL below -->
<param name="content" value="link:http://www.netbeans.org/kb/41/freeform-config.html[http://www.netbeans.org/kb/41/freeform-config.html]">
<!-- Enter the display text below. The <html> and <u> make the text look like a link. -->
<param name="text" value="<html><u>link:http://www.netbeans.org/kb/41/freeform-config.html[http://www.netbeans.org/kb/41/freeform-config.html]</u></html>">
<param name="textFontSize" value="medium">
<param name="textColor" value="blue">
</object>
----

*Note* When you view the page outside of !NetBeans, this link will not display or will display as a ???
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,subs="macros"]
[source,java,subs="verbatim,macros"]
----
List<UpdateUnitProvider> updateUnitProviders = UpdateUnitProviderFactory.getDefault().getUpdateUnitProviders(true);
Expand Down
Loading

0 comments on commit d6fdd74

Please sign in to comment.