From d6fdd744ee5709c17e367452f4297d1dabc72445 Mon Sep 17 00:00:00 2001 From: Eric Barboni Date: Thu, 22 Sep 2022 10:51:47 +0200 Subject: [PATCH] use unmodified code --- .../content/tutorials/nbm-copyfqn.asciidoc | 8 ++-- .../src/content/tutorials/nbm-crud.asciidoc | 2 +- .../src/content/tutorials/nbm-emf.asciidoc | 10 ++--- .../tutorials/nbm-javacc-parser.asciidoc | 6 +-- .../content/tutorials/nbm-nodesapi3.asciidoc | 14 +++---- .../tutorials/nbm-palette-api1.asciidoc | 40 +++++++++---------- .../src/content/tutorials/nbm-wizard.asciidoc | 2 +- .../wiki/DevFaqDotSettingsFiles.asciidoc | 22 +++++----- .../wiki/DevFaqHelpGuidelines.asciidoc | 40 +++++++++---------- .../DevFaqHowToChangeUpdateCenterURL.asciidoc | 2 +- .../src/content/wiki/DevFaqSignNbm.asciidoc | 36 ++++++++--------- .../wiki/DevFaqWhatIsACluster.asciidoc | 22 +++++----- 12 files changed, 102 insertions(+), 102 deletions(-) diff --git a/netbeans.apache.org/src/content/tutorials/nbm-copyfqn.asciidoc b/netbeans.apache.org/src/content/tutorials/nbm-copyfqn.asciidoc index 071527a7e7..d468b426e1 100644 --- a/netbeans.apache.org/src/content/tutorials/nbm-copyfqn.asciidoc +++ b/netbeans.apache.org/src/content/tutorials/nbm-copyfqn.asciidoc @@ -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: @@ -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) { @@ -292,7 +292,7 @@ public void actionPerformed(ActionEvent ev) { } else { *try { - javaSource.runUserActionTask(new Task<CompilationController>() { + javaSource.runUserActionTask(new Task() { public void run(CompilationController arg0) throws Exception { throw new UnsupportedOperationException("Not supported yet."); } diff --git a/netbeans.apache.org/src/content/tutorials/nbm-crud.asciidoc b/netbeans.apache.org/src/content/tutorials/nbm-crud.asciidoc index 27be946455..60aaf7accf 100644 --- a/netbeans.apache.org/src/content/tutorials/nbm-crud.asciidoc +++ b/netbeans.apache.org/src/content/tutorials/nbm-crud.asciidoc @@ -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 diff --git a/netbeans.apache.org/src/content/tutorials/nbm-emf.asciidoc b/netbeans.apache.org/src/content/tutorials/nbm-emf.asciidoc index e0571cec20..ebe8989b47 100644 --- a/netbeans.apache.org/src/content/tutorials/nbm-emf.asciidoc +++ b/netbeans.apache.org/src/content/tutorials/nbm-emf.asciidoc @@ -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] { @@ -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]<Object> { + private static class BookOrBorrowerChildFactory extends link:http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/ChildFactory.html[ChildFactory] { private final Library library; @@ -358,7 +358,7 @@ public class LibraryNode extends link:http://bits.netbeans.org/dev/javadoc/org-o @Override protected boolean createKeys(List list) { - EList<Book> books = library.getBooks(); + EList books = library.getBooks(); for (Book book : books) { list.add(book); } @@ -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] { @Override - protected boolean createKeys(List<Library> list) { + protected boolean createKeys(List list) { EXTLibraryFactory factory = EXTLibraryFactory.eINSTANCE; 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 21d242915c..e02e1c3eaf 100644 --- a/netbeans.apache.org/src/content/tutorials/nbm-javacc-parser.asciidoc +++ b/netbeans.apache.org/src/content/tutorials/nbm-javacc-parser.asciidoc @@ -305,7 +305,7 @@ 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); } ---- @@ -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; @@ -937,7 +937,7 @@ public class SJFoldManager implements link:http://bits.netbeans.org/dev/javadoc/ offset = ts.offset(); Token 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 { diff --git a/netbeans.apache.org/src/content/tutorials/nbm-nodesapi3.asciidoc b/netbeans.apache.org/src/content/tutorials/nbm-nodesapi3.asciidoc index c59d7849f0..6c3b28b4fa 100644 --- a/netbeans.apache.org/src/content/tutorials/nbm-nodesapi3.asciidoc +++ b/netbeans.apache.org/src/content/tutorials/nbm-nodesapi3.asciidoc @@ -271,13 +271,13 @@ 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)] { @@ -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; @@ -415,9 +415,9 @@ public class MovieChildren extends link:https://bits.netbeans.org/dev/javadoc/or 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 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])); 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 a948e32e7b..83ff9f5586 100644 --- a/netbeans.apache.org/src/content/tutorials/nbm-palette-api1.asciidoc +++ b/netbeans.apache.org/src/content/tutorials/nbm-palette-api1.asciidoc @@ -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] @@ -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 = "<br>", + body = "
", name = "New Line", - tooltip = "<br>") + tooltip = "
") package org.netbeans.modules.newsnippets1; import org.netbeans.spi.palette.PaletteItemRegistration; @@ -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; @@ -228,7 +228,7 @@ public class BR implements link:http://bits.netbeans.org/dev/javadoc/org-openide } private String createBody() { - String Br = "<br>"; + String Br = "
"; return Br; } @@ -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"] ---- -<?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*"> + + -<editor_palette_item version="1.0"> + - <class name="org.netbeans.modules.newsnippets2.BR" /> + - <icon16 urlvalue="org/netbeans/modules/newsnippets2/resources/BR16.png" /> - <icon32 urlvalue="org/netbeans/modules/newsnippets2/resources/BR32.png" /> + + - *<inline-description> - <display-name>New Line</display-name> - <tooltip> <![CDATA[ <br> ]]></tooltip> - </inline-description>* + * + New Line + ]]> + * -</editor_palette_item> + ---- NOTE: You can choose either of the two approaches above, depending on your requirements. @@ -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; @@ -562,7 +562,7 @@ public class BR implements link:https://bits.netbeans.org/dev/javadoc/org-openid private String createBody() { *comment = getComment(); String Br = "" - + "\n <br>";* + + "\n
";* return Br; } diff --git a/netbeans.apache.org/src/content/tutorials/nbm-wizard.asciidoc b/netbeans.apache.org/src/content/tutorials/nbm-wizard.asciidoc index bc49c748c3..a91b27d205 100644 --- a/netbeans.apache.org/src/content/tutorials/nbm-wizard.asciidoc +++ b/netbeans.apache.org/src/content/tutorials/nbm-wizard.asciidoc @@ -497,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/wiki/DevFaqDotSettingsFiles.asciidoc b/netbeans.apache.org/src/content/wiki/DevFaqDotSettingsFiles.asciidoc index f50240c561..cdda518c92 100644 --- a/netbeans.apache.org/src/content/wiki/DevFaqDotSettingsFiles.asciidoc +++ b/netbeans.apache.org/src/content/wiki/DevFaqDotSettingsFiles.asciidoc @@ -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"] ---- -<?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... - </serialdata> -</settings> + + ---- == Apache Migration Information diff --git a/netbeans.apache.org/src/content/wiki/DevFaqHelpGuidelines.asciidoc b/netbeans.apache.org/src/content/wiki/DevFaqHelpGuidelines.asciidoc index 5d48456572..90f7b6ed80 100644 --- a/netbeans.apache.org/src/content/wiki/DevFaqHelpGuidelines.asciidoc +++ b/netbeans.apache.org/src/content/wiki/DevFaqHelpGuidelines.asciidoc @@ -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"] ---- -<?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. @@ -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"] ---- -<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 ??? diff --git a/netbeans.apache.org/src/content/wiki/DevFaqHowToChangeUpdateCenterURL.asciidoc b/netbeans.apache.org/src/content/wiki/DevFaqHowToChangeUpdateCenterURL.asciidoc index 4a87b149b0..ce5f0c8487 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,subs="macros"] +[source,java,subs="verbatim,macros"] ---- List updateUnitProviders = UpdateUnitProviderFactory.getDefault().getUpdateUnitProviders(true); diff --git a/netbeans.apache.org/src/content/wiki/DevFaqSignNbm.asciidoc b/netbeans.apache.org/src/content/wiki/DevFaqSignNbm.asciidoc index 0a74a650bf..64433d49fc 100644 --- a/netbeans.apache.org/src/content/wiki/DevFaqSignNbm.asciidoc +++ b/netbeans.apache.org/src/content/wiki/DevFaqSignNbm.asciidoc @@ -222,26 +222,26 @@ 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,subs="macros"] +[source,xml,subs="verbatim,macros"] ---- - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>nbm-maven-plugin</artifactId> - <version>3.11.1</version> - <extensions>true</extensions> - <configuration> - <!-- keep it for backwards compatibility to previous versions--> - <codeNameBase>com.johndoe.netbeans.myplugin</codeNameBase> - <author>JohnDoe (john.doe@mail.foo)</author> - <homePageUrl>link:https://github.com/johndoe/myplugin[https://github.com/johndoe/myplugin]</homePageUrl> - <!-- keystore: only required, if you don't want to pass the path to the keystore file via cmdline--> - <keystore>nbproject/private/keystore</keystore> - <keystorealias>myself</keystorealias> - <licenseName>Apache 2.0</licenseName> - <licenseFile>LICENSE-2.0.txt</licenseFile> - </configuration> - </plugin> + + org.codehaus.mojo + nbm-maven-plugin + 3.11.1 + true + + + com.johndoe.netbeans.myplugin + JohnDoe (john.doe@mail.foo) + link:https://github.com/johndoe/myplugin[https://github.com/johndoe/myplugin] + + nbproject/private/keystore + myself + Apache 2.0 + LICENSE-2.0.txt + + ---- ` diff --git a/netbeans.apache.org/src/content/wiki/DevFaqWhatIsACluster.asciidoc b/netbeans.apache.org/src/content/wiki/DevFaqWhatIsACluster.asciidoc index f20c790ade..cfa25ff1ab 100644 --- a/netbeans.apache.org/src/content/wiki/DevFaqWhatIsACluster.asciidoc +++ b/netbeans.apache.org/src/content/wiki/DevFaqWhatIsACluster.asciidoc @@ -92,19 +92,19 @@ 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,subs="macros"] +[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]"> -<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> + + + + false + false + true + modules/org-netbeans-modules-ide-ergonomics.jar + false + ---- Similarly, the metadata in `$CLUSTER/update_tracking/$MODULE.xml` contains data about the module generated when it is installed: