Merge remote-tracking branch 'upstream/master' into features/platform-tutorials
diff --git a/tutorials-convert/README.md b/tutorials-convert/README.md
index 80bba1b..60aef91 100644
--- a/tutorials-convert/README.md
+++ b/tutorials-convert/README.md
@@ -2,17 +2,18 @@
This tool reads the NetBeans tutorials in HTML format and converts them to AsciiDoc format.
-The NetBeans platform tutorials can be found in https://svn.netbeans.org/svn/platform~platform-content/trunk/tutorials/
-
-The NetBeans platform tutorial images can be found in https://svn.netbeans.org/svn/platform~platform-content/trunk/images/
-
+The NetBeans platform tutorials can be found in https://github.com/wadechandler/netbeans-static-site
## Getting started
-1. Check out the tutorials from SVN above in a directory "X".
-2. Check out the images from SVN above in directory "Y".
-2. Run `mvn package exec:java X Y`, where "X" is the directory in the previous step.
-4. Open the `tutorials-asciidoc` directory to see the results.
-5. See the generated "external-links.txt" file to see referenced external links.
+1. Clone the repository:
+
+Choose a directory of your liking and clone the repo:
+
+ git clone https://github.com/wadechandler/netbeans-static-site.git
+
+2. Run `mvn package exec:java X`, where "X" is the directory in the previous step.
+3. Open the `tutorials-asciidoc` directory to see the results.
+4. See the generated "external-links.txt" file to see referenced external links.
NOTE: This tool is expected to be run once, after that manual revision of generated files should be done.
diff --git a/tutorials-convert/nbactions-dismissed.xml b/tutorials-convert/nbactions-dismissed.xml
new file mode 100644
index 0000000..24261f4
--- /dev/null
+++ b/tutorials-convert/nbactions-dismissed.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<actions>
+ <action>
+ <actionName>run</actionName>
+ <packagings>
+ <packaging>jar</packaging>
+ </packagings>
+ <goals>
+ <goal>process-classes</goal>
+ <goal>exec:java</goal>
+ </goals>
+ <properties>
+ <exec.args>C:\Users\avieiro\Downloads\NETBEANS\</exec.args>
+ <exec.executable>java</exec.executable>
+ </properties>
+ </action>
+ <action>
+ <actionName>debug</actionName>
+ <packagings>
+ <packaging>jar</packaging>
+ </packagings>
+ <goals>
+ <goal>process-classes</goal>
+ <goal>org.codehaus.mojo:exec-maven-plugin:1.5.0:exec</goal>
+ </goals>
+ <properties>
+ <exec.args>-agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath org.netbeans.tools.tutorials.HTMLConverter C:\Users\avieiro\Downloads\NETBEANS</exec.args>
+ <exec.executable>java</exec.executable>
+ <jpda.listen>true</jpda.listen>
+ </properties>
+ </action>
+ <action>
+ <actionName>profile</actionName>
+ <packagings>
+ <packaging>jar</packaging>
+ </packagings>
+ <goals>
+ <goal>process-classes</goal>
+ <goal>org.codehaus.mojo:exec-maven-plugin:1.5.0:exec</goal>
+ </goals>
+ <properties>
+ <exec.args>-classpath %classpath org.netbeans.tools.tutorials.HTMLConverter C:\Users\avieiro\Downloads\NETBEANS</exec.args>
+ <exec.executable>java</exec.executable>
+ </properties>
+ </action>
+ </actions>
diff --git a/tutorials-convert/nbactions.xml b/tutorials-convert/nbactions.xml
index 24261f4..8336f1b 100644
--- a/tutorials-convert/nbactions.xml
+++ b/tutorials-convert/nbactions.xml
@@ -1,24 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
<actions>
<action>
<actionName>run</actionName>
@@ -27,10 +7,10 @@
</packagings>
<goals>
<goal>process-classes</goal>
- <goal>exec:java</goal>
+ <goal>org.codehaus.mojo:exec-maven-plugin:1.5.0:exec</goal>
</goals>
<properties>
- <exec.args>C:\Users\avieiro\Downloads\NETBEANS\</exec.args>
+ <exec.args>-classpath %classpath org.netbeans.tools.tutorials.HTMLConverter /home/antonio/REPOS/netbeans-static-site</exec.args>
<exec.executable>java</exec.executable>
</properties>
</action>
@@ -44,7 +24,7 @@
<goal>org.codehaus.mojo:exec-maven-plugin:1.5.0:exec</goal>
</goals>
<properties>
- <exec.args>-agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath org.netbeans.tools.tutorials.HTMLConverter C:\Users\avieiro\Downloads\NETBEANS</exec.args>
+ <exec.args>-agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath org.netbeans.tools.tutorials.HTMLConverter /home/antonio/REPOS/netbeans-static-site</exec.args>
<exec.executable>java</exec.executable>
<jpda.listen>true</jpda.listen>
</properties>
@@ -59,7 +39,7 @@
<goal>org.codehaus.mojo:exec-maven-plugin:1.5.0:exec</goal>
</goals>
<properties>
- <exec.args>-classpath %classpath org.netbeans.tools.tutorials.HTMLConverter C:\Users\avieiro\Downloads\NETBEANS</exec.args>
+ <exec.args>-classpath %classpath org.netbeans.tools.tutorials.HTMLConverter /home/antonio/REPOS/netbeans-static-site</exec.args>
<exec.executable>java</exec.executable>
</properties>
</action>
diff --git a/tutorials-convert/pom.xml b/tutorials-convert/pom.xml
index 671d209..cf2c67c 100644
--- a/tutorials-convert/pom.xml
+++ b/tutorials-convert/pom.xml
@@ -85,8 +85,11 @@
<configuration>
<mainClass>org.netbeans.tools.tutorials.HTMLConverter</mainClass>
<arguments>
- <argument>/home/antonio/REPOS/netbeans-tutorials</argument>
- <argument>/home/antonio/REPOS/images/</argument>
+ <argument>/home/antonio/REPOS/netbeans-static-site</argument>
+ <!--
+ <argument>/home/antonio/REPOS/platform-tutorials/tutorials</argument>
+ <argument>/home/antonio/REPOS/platform-tutorials/images/</argument>
+ -->
</arguments>
</configuration>
</plugin>
diff --git a/tutorials-convert/src/main/java/org/netbeans/tools/tutorials/AsciidocPostProcessor.java b/tutorials-convert/src/main/java/org/netbeans/tools/tutorials/AsciidocPostProcessor.java
index aa0abc4..5ceae6b 100644
--- a/tutorials-convert/src/main/java/org/netbeans/tools/tutorials/AsciidocPostProcessor.java
+++ b/tutorials-convert/src/main/java/org/netbeans/tools/tutorials/AsciidocPostProcessor.java
@@ -53,6 +53,8 @@
private static Pattern EN_CONTENTS_PATTERN = Pattern.compile("^.*Contents.*");
+ private static Pattern IS_NUMBERED_LINE = Pattern.compile("^[ ]+[0-9]+\\.");
+
private static boolean isContentsHeader(String line) {
return line.contains("*Content")
|| line.contains("目录")
@@ -89,6 +91,13 @@
title = m.group(1);
}
}
+ {
+ Matcher m = IS_NUMBERED_LINE.matcher(line);
+ if (m.matches()) {
+ System.out.format("Numbered line here!!! '%s'%n", line);
+ line = line.trim();
+ }
+ }
switch (state) {
case BEFORE_CONTENT_SECTION:
if (isContentsHeader(line)) {
diff --git a/tutorials-convert/src/main/java/org/netbeans/tools/tutorials/CustomAsciiDocDocumentBuilder.java b/tutorials-convert/src/main/java/org/netbeans/tools/tutorials/CustomAsciiDocDocumentBuilder.java
index f49f291..1f33d72 100644
--- a/tutorials-convert/src/main/java/org/netbeans/tools/tutorials/CustomAsciiDocDocumentBuilder.java
+++ b/tutorials-convert/src/main/java/org/netbeans/tools/tutorials/CustomAsciiDocDocumentBuilder.java
@@ -19,7 +19,6 @@
package org.netbeans.tools.tutorials;
import com.google.common.base.Joiner;
-import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.base.Strings;
import java.io.BufferedWriter;
@@ -30,6 +29,7 @@
import java.nio.file.Files;
import java.util.logging.Level;
import java.util.logging.Logger;
+import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.eclipse.mylyn.wikitext.asciidoc.internal.AsciiDocDocumentBuilder;
@@ -46,499 +46,558 @@
*/
public class CustomAsciiDocDocumentBuilder extends AsciiDocDocumentBuilder {
- /**
- * Base class for asciidoc delimited blocks.
- */
- class AsciiDocContentBlock extends AbstractMarkupDocumentBuilder.NewlineDelimitedBlock {
+ /**
+ * Base class for asciidoc delimited blocks.
+ */
+ class AsciiDocContentBlock extends AbstractMarkupDocumentBuilder.NewlineDelimitedBlock {
- protected String prefix;
- protected String suffix;
+ protected String prefix;
+ protected String suffix;
- AsciiDocContentBlock(DocumentBuilder.BlockType blockType, String prefix, String suffix) {
- this(blockType, prefix, suffix, 1, 1);
- }
+ AsciiDocContentBlock(DocumentBuilder.BlockType blockType, String prefix, String suffix) {
+ this(blockType, prefix, suffix, 1, 1);
+ }
- AsciiDocContentBlock(DocumentBuilder.BlockType blockType, String prefix, String suffix, int leadingNewlines, int trailingNewlines) {
- super(blockType, leadingNewlines, trailingNewlines);
- this.prefix = prefix;
- this.suffix = suffix;
- }
+ AsciiDocContentBlock(DocumentBuilder.BlockType blockType, String prefix, String suffix, int leadingNewlines, int trailingNewlines) {
+ super(blockType, leadingNewlines, trailingNewlines);
+ this.prefix = prefix;
+ this.suffix = suffix;
+ }
- AsciiDocContentBlock(String prefix, String suffix, int leadingNewlines, int trailingNewlines) {
- this(null, prefix, suffix, leadingNewlines, trailingNewlines);
- }
+ AsciiDocContentBlock(String prefix, String suffix, int leadingNewlines, int trailingNewlines) {
+ this(null, prefix, suffix, leadingNewlines, trailingNewlines);
+ }
- @Override
- public void write(int c) throws IOException {
- CustomAsciiDocDocumentBuilder.this.emitContent(c);
- }
+ @Override
+ public void write(int c) throws IOException {
+ if (!enableOutput) {
+ System.out.write(c);
+ } else {
+ CustomAsciiDocDocumentBuilder.this.emitContent(c);
+ }
+ }
- @Override
- public void write(String s) throws IOException {
- CustomAsciiDocDocumentBuilder.this.emitContent(s);
- }
+ @Override
+ public void write(String s) throws IOException {
+ if (!enableOutput) {
+ System.out.print(s);
+ } else {
+ CustomAsciiDocDocumentBuilder.this.emitContent(s);
+ }
+ }
- @Override
- public void open() throws IOException {
- super.open();
- pushWriter(new StringWriter());
- }
+ @Override
+ public void open() throws IOException {
+ super.open();
+ pushWriter(new StringWriter());
+ }
- @Override
- public void close() throws IOException {
- Writer thisContent = popWriter();
- String content = thisContent.toString();
- if (content.length() > 0) {
- emitContent(content);
- }
- super.close();
- }
+ @Override
+ public void close() throws IOException {
+ Writer thisContent = popWriter();
+ String content = thisContent.toString();
+ if (content.length() > 0) {
+ emitContent(content);
+ }
+ super.close();
+ }
- protected void emitContent(final String content) throws IOException {
- CustomAsciiDocDocumentBuilder.this.emitContent(prefix);
- String trimmedContent = content.replaceAll("\\*Note:[ ]\\*\\*", "NOTE: ");
- // String trimmedContent = content.replaceAll("\\*[Nn][Oo][Tt][Ee]:[ ]*\\*", "NOTE: ");
- CustomAsciiDocDocumentBuilder.this.emitContent(trimmedContent);
- CustomAsciiDocDocumentBuilder.this.emitContent(suffix);
- }
+ protected void emitContent(String content) throws IOException {
+ CustomAsciiDocDocumentBuilder.this.emitContent(prefix);
+ CustomAsciiDocDocumentBuilder.this.emitContent(content);
+ CustomAsciiDocDocumentBuilder.this.emitContent(suffix);
+ }
- }
+ }
- /**
- * Handles links. Links with images are handled properly, copying images
- * from the image directory close to the document.
- */
- private class LinkBlock extends AsciiDocContentBlock {
+ /**
+ * Handles links. Links with images are handled properly, copying images
+ * from the image directory close to the document.
+ */
+ private class LinkBlock extends AsciiDocContentBlock {
- final LinkAttributes attributes;
+ final LinkAttributes attributes;
- LinkBlock(LinkAttributes attributes) {
- super("", "", 0, 0);
- this.attributes = attributes;
- }
+ LinkBlock(LinkAttributes attributes) {
+ super("", "", 0, 0);
+ this.attributes = attributes;
+ }
- @Override
- protected void emitContent(String content) throws IOException {
- String href = attributes.getHref();
- if (href == null) {
- if (attributes.getId() != null) {
- super.emitContent("[[" + attributes.getId() + "]]\n");
- return;
- }
- LOG.log(Level.WARNING, "Empty href: {0}", href);
- }
- href = href == null ? "" : href;
- href = copyImageIfRequired(href, false);
+ @Override
+ protected void emitContent(String content) throws IOException {
+ String href = attributes.getHref();
+ if (href == null) {
+ if (attributes.getId() != null) {
+ super.emitContent("\n[[" + attributes.getId() + "]]\n");
+ return;
+ }
+ LOG.log(Level.WARNING, "Empty href: {0}", href);
+ }
+ href = href == null ? "" : href;
+ href = copyImageIfRequired(href, false);
- if (href.startsWith("http")) {
- externalLinks.addExternalLink(href, CustomAsciiDocDocumentBuilder.this.relativePathToTutorialFile);
- }
+ if (href.startsWith("http")) {
+ href = NetBeansTutorialsLinkReviewer.updateHREF(href);
+ externalLinks.addExternalLink(href, CustomAsciiDocDocumentBuilder.this.relativePathToTutorialFile);
+ }
- if (content.contains("image:")) {
- // Hande links with images properly, using a image with a "link" attribute
- // content is something like "image:images/whatever-small.png[]" (small image)
- // href is something like "images/whatever.png" (larger image)
- // This must be transformed (https://stackoverflow.com/questions/34299474/using-an-image-as-a-link-in-asciidoc)
- // to
- // image:whatever-small.png[link="whatever.png"]
- String smallPart = content.substring(6);
- int i = smallPart.indexOf('[');
- smallPart = i == -1 ? smallPart : smallPart.substring(0, i);
- StringBuilder sb = new StringBuilder();
- sb.append("\n[.feature]\n");
- sb.append("--\n");
- sb.append("image");
- sb.append(smallPart);
- sb.append("[role=\"left\", link=\"").append(href).append("\"]\n");
- sb.append("--\n");
- CustomAsciiDocDocumentBuilder.this.emitContent(sb.toString());
- } else {
- // link::http://url.com[label]
- CustomAsciiDocDocumentBuilder.this.emitContent("link:"); //$NON-NLS-1$
- CustomAsciiDocDocumentBuilder.this.emitContent(href);
- CustomAsciiDocDocumentBuilder.this.emitContent("[+");
- if (content != null) {
- CustomAsciiDocDocumentBuilder.this.emitContent(content);
- }
- CustomAsciiDocDocumentBuilder.this.emitContent("+]");
- }
- }
+ if (content.contains("image:")) {
+ // Hande links with images properly, using a image with a "link" attribute
+ // content is something like "image:images/whatever-small.png[]" (small image)
+ // href is something like "images/whatever.png" (larger image)
+ // This must be transformed (https://stackoverflow.com/questions/34299474/using-an-image-as-a-link-in-asciidoc)
+ // to
+ // image:whatever-small.png[link="whatever.png"]
+ String smallPart = content.substring(6);
+ int i = smallPart.indexOf('[');
+ smallPart = i == -1 ? smallPart : smallPart.substring(0, i);
+ StringBuilder sb = new StringBuilder();
+ sb.append("\n[.feature]\n");
+ sb.append("--\n");
+ sb.append("image");
+ sb.append(smallPart);
+ sb.append("[role=\"left\", link=\"").append(href).append("\"]\n");
+ sb.append("--\n");
+ CustomAsciiDocDocumentBuilder.this.emitContent(sb.toString());
+ } else {
+ // link::http://url.com[label]
+ CustomAsciiDocDocumentBuilder.this.emitContent(" link:"); //$NON-NLS-1$
+ CustomAsciiDocDocumentBuilder.this.emitContent(href);
+ CustomAsciiDocDocumentBuilder.this.emitContent("[");
+ if (content != null) {
+ CustomAsciiDocDocumentBuilder.this.emitContent(content);
+ }
+ CustomAsciiDocDocumentBuilder.this.emitContent("]");
+ }
+ }
- }
+ }
- /**
- * A header-1 block.
- */
- class AsciiDocMainHeaderBlock extends AsciiDocContentBlock {
+ /**
+ * A header-1 block.
+ */
+ class AsciiDocMainHeaderBlock extends AsciiDocContentBlock {
- public AsciiDocMainHeaderBlock() {
- super("", "", 2, 2);
- }
+ public AsciiDocMainHeaderBlock() {
+ super("", "", 2, 2);
+ }
- @Override
- protected void emitContent(String content) throws IOException {
- String trimmedContent = content.replaceAll("\n", " ");
- super.emitContent("= " + trimmedContent + "\n");
- super.emitContent(":jbake-type: platform-tutorial\n");
- super.emitContent(":jbake-tags: tutorials \n");
- super.emitContent(":jbake-status: published\n");
- super.emitContent(":syntax: true\n");
- super.emitContent(":source-highlighter: pygments\n");
- super.emitContent(":toc: left\n");
- super.emitContent(":toc-title:\n");
- super.emitContent(":icons: font\n");
- super.emitContent(":experimental:\n");
- super.emitContent(":description: " + trimmedContent + " - Apache NetBeans\n");
- super.emitContent(":keywords: Apache NetBeans Platform, Platform Tutorials, " + trimmedContent + "");
- super.emitContent("\n");
- }
+ @Override
+ protected void emitContent(String content) throws IOException {
+ String trimmedContent = content.replaceAll("\n", " ");
+ super.emitContent("= " + trimmedContent + "\n");
+ super.emitContent(":jbake-type: platform-tutorial\n");
+ super.emitContent(":jbake-tags: tutorials \n");
+ super.emitContent(":jbake-status: published\n");
+ super.emitContent(":syntax: true\n");
+ super.emitContent(":source-highlighter: pygments\n");
+ super.emitContent(":toc: left\n");
+ super.emitContent(":toc-title:\n");
+ super.emitContent(":icons: font\n");
+ super.emitContent(":experimental:\n");
+ super.emitContent(":description: " + trimmedContent + " - Apache NetBeans\n");
+ super.emitContent(":keywords: Apache NetBeans Platform, Platform Tutorials, " + trimmedContent + "");
+ super.emitContent("\n");
+ }
- }
+ }
- private static final String headerPrefix(int level) {
- StringBuilder sb = new StringBuilder();
- for (int i = 0; i < level; i++) {
- sb.append("=");
- }
- sb.append(" ");
- return sb.toString();
- }
+ private static final String headerPrefix(int level) {
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < level; i++) {
+ sb.append("=");
+ }
+ sb.append(" ");
+ return sb.toString();
+ }
- class NumberedListItemBlock extends AsciiDocContentBlock {
+ class NumberedListItemBlock extends AsciiDocContentBlock {
- private int count = 0;
-
- private NumberedListItemBlock(String prefix) {
- super(BlockType.LIST_ITEM, prefix, "", 1, 1);
- }
+ private int count = 0;
- @Override
- public void open() throws IOException {
- super.open();
- if (getPreviousBlock() instanceof AsciiDocListBlock) {
- AsciiDocListBlock list = (AsciiDocListBlock) getPreviousBlock();
- list.addListItem(this);
- count = list.getCount();
- }
- }
+ private NumberedListItemBlock(String prefix) {
+ super(BlockType.LIST_ITEM, prefix, "", 1, 1);
+ }
- @Override
- protected void emitContent(String content) throws IOException {
- if (getPreviousBlock().getBlockType() == BlockType.NUMERIC_LIST) {
- prefix = String.format("%n[start=%d]%n%d. ", count, count);
- }
- super.emitContent(content);
- }
+ @Override
+ public void open() throws IOException {
+ super.open();
+ if (getPreviousBlock() instanceof AsciiDocListBlock) {
+ AsciiDocListBlock list = (AsciiDocListBlock) getPreviousBlock();
+ list.addListItem(this);
+ count = list.getCount();
+ }
+ }
- }
+ @Override
+ protected void emitContent(String content) throws IOException {
+ if (getPreviousBlock().getBlockType() == BlockType.NUMERIC_LIST) {
+ prefix = String.format("%n[start=%d]%n1. ", count);
+ }
+ super.emitContent(content);
+ }
- class AsciiDocListBlock extends AsciiDocContentBlock {
+ }
- private int count = 0;
+ class AsciiDocListBlock extends AsciiDocContentBlock {
- private AsciiDocListBlock(BlockType type, int leadingNewLines) {
- super(type, "", "", leadingNewLines, 1);
- }
+ private int count = 0;
- @Override
- protected void emitContent(String content) throws IOException {
- super.emitContent(prefix);
- super.emitContent(content);
- if (!content.endsWith("\n\n")) {
- super.emitContent(suffix);
- }
- }
+ private AsciiDocListBlock(BlockType type, int leadingNewLines) {
+ super(type, "", "", leadingNewLines, 1);
+ }
- protected void addListItem(NumberedListItemBlock item) {
- count++;
- }
+ @Override
+ protected void emitContent(String content) throws IOException {
+ super.emitContent(prefix);
+ super.emitContent(content);
+ if (!content.endsWith("\n\n")) {
+ super.emitContent(suffix);
+ }
+ }
- protected int getCount() {
- return count;
- }
- }
+ protected void addListItem(NumberedListItemBlock item) {
+ count++;
+ }
- class AsciiDocHeaderBlock extends AsciiDocContentBlock {
+ protected int getCount() {
+ return count;
+ }
+ }
- private Attributes attributes;
- private int level;
+ class AsciiDocHeaderBlock extends AsciiDocContentBlock {
- public AsciiDocHeaderBlock(int level, Attributes attributes) {
- super("", "", 2, 2);
- this.attributes = attributes;
- this.level = level;
- }
+ private Attributes attributes;
+ private int level;
- @Override
- protected void emitContent(String content) throws IOException {
- super.emitContent("\n");
- if (attributes != null && attributes.getId() != null) {
- super.emitContent("[[" + attributes.getId() + "]]\n");
- }
- StringBuilder sb = new StringBuilder();
- for (int i = 0; i < level; i++) {
- sb.append("=");
- }
- sb.append(" ");
- sb.append(content.replaceAll("\n", " "));
- sb.append("\n\n");
- super.emitContent(sb.toString());
- }
- }
+ public AsciiDocHeaderBlock(int level, Attributes attributes) {
+ super("", "", 2, 2);
+ this.attributes = attributes;
+ this.level = level;
+ }
- /**
- * An inline code block.
- */
- class AsciiDocInlinePreformatted extends AsciiDocContentBlock {
+ @Override
+ protected void emitContent(String content) throws IOException {
+ super.emitContent("\n");
+ if (attributes != null && attributes.getId() != null) {
+ super.emitContent("[[" + attributes.getId() + "]]\n");
+ }
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < level; i++) {
+ sb.append("=");
+ }
+ sb.append(" ");
+ sb.append(content.replaceAll("\n", " "));
+ sb.append("\n\n");
+ super.emitContent(sb.toString());
+ }
+ }
- String language;
+ /**
+ * An inline code block.
+ */
+ class AsciiDocInlinePreformatted extends AsciiDocContentBlock {
- AsciiDocInlinePreformatted(String language, CustomAsciiDocDocumentBuilder documentBuilder) {
- super(BlockType.CODE, " ``", "`` ", 0, 0);
- this.language = language;
- }
+ String language;
- }
+ AsciiDocInlinePreformatted(String language, CustomAsciiDocDocumentBuilder documentBuilder) {
+ super(BlockType.CODE, " ``", "`` ", 0, 0);
+ this.language = language;
+ }
- private static final Pattern RUBY_PATTERN = Pattern.compile("^require '.*", Pattern.MULTILINE);
- private static final Pattern C_PATTERN = Pattern.compile("^#include.*", Pattern.MULTILINE);
- private static final Pattern SHELL_PATTERN = Pattern.compile("^\\$ ", Pattern.MULTILINE);
+ }
- /**
- * Generates a
- * <pre> block.
- */
- class AsciiDocPreformatted extends AsciiDocContentBlock {
+ private static final Pattern RUBY_PATTERN = Pattern.compile("^require '.*", Pattern.MULTILINE);
+ private static final Pattern C_PATTERN = Pattern.compile("^#include.*", Pattern.MULTILINE);
+ private static final Pattern SHELL_PATTERN = Pattern.compile("^\\$ ", Pattern.MULTILINE);
- String language;
+ class AsciiDocQuote extends AsciiDocContentBlock {
- AsciiDocPreformatted(String language) {
- super(BlockType.PREFORMATTED, "", "", 1, 1);
- this.language = language;
- }
+ public AsciiDocQuote() {
+ super("\n[NOTE]\n====\n", "====\n", 1, 1);
+ }
- @Override
- protected void emitContent(String content) throws IOException {
- if (language == null) {
- // Use "java" as a default language for tutorials
- language = "java";
- if (content.contains("<?xml") || content.contains("</")) {
- language = "xml";
- }
- if (content.contains("<div") || content.contains("<p>")) {
- language = "html";
- }
- if (C_PATTERN.matcher(content).find()) {
- language = "c";
- }
- if (RUBY_PATTERN.matcher(content).find()) {
- language = "ruby";
- }
- if (SHELL_PATTERN.matcher(content).find()) {
- language = "shell";
- }
- if (content.contains("<?php")) {
- language = "php";
- }
- if (content.contains("$.") || content.contains("function (")) {
- language = "javascript";
- }
- }
- // [label](http://url.com) or
- // [label](http://url.com "title")
- CustomAsciiDocDocumentBuilder.this.emitContent("\n[source," + language + "]\n");
- CustomAsciiDocDocumentBuilder.this.emitContent("----\n");
- CustomAsciiDocDocumentBuilder.this.emitContent(content.startsWith("\n") ? content : "\n" + content);
- CustomAsciiDocDocumentBuilder.this.emitContent("\n----\n\n");
- }
- }
+ }
- private static Logger LOG = Logger.getLogger(CustomAsciiDocDocumentBuilder.class.getName());
+ /**
+ * Generates a
+ * <pre> block.
+ */
+ class AsciiDocPreformatted extends AsciiDocContentBlock {
- private File topDirectory;
- private File imageDirectory;
- private File outputDirectory;
- private File imageDestDirectory;
- private ExternalLinksMap externalLinks;
- private Language language;
- private String relativePathToTutorialsRoot;
- private File outputFile;
- private String relativePathToTutorialFile;
+ String language;
- public CustomAsciiDocDocumentBuilder(File topDirectory, File imageDirectory, File outputFile, BufferedWriter output, ExternalLinksMap externalLinks) {
- super(output);
- this.topDirectory = topDirectory;
- this.imageDirectory = imageDirectory;
- this.outputFile = outputFile;
- this.outputDirectory = outputFile.getParentFile();
- this.language = Language.getLanguage(outputFile);
- imageDestDirectory = new File(outputDirectory, "images");
- imageDestDirectory.mkdirs();
- this.externalLinks = externalLinks;
- relativePathToTutorialsRoot = outputDirectory.toURI().relativize(topDirectory.toURI()).getPath();
- relativePathToTutorialFile = topDirectory.toURI().relativize(outputFile.toURI()).getPath();
+ AsciiDocPreformatted(String language) {
+ super(BlockType.PREFORMATTED, "", "", 1, 1);
+ this.language = language;
+ }
- }
+ @Override
+ protected void emitContent(String content) throws IOException {
+ if (language == null) {
+ // Use "java" as a default language for tutorials
+ language = "java";
+ if (content.contains("<?xml") || content.contains("</")) {
+ language = "xml";
+ }
+ if (content.contains("<div") || content.contains("<p>") || content.contains("<body") || content.contains("<script")) {
+ language = "html";
+ }
+ if (C_PATTERN.matcher(content).find()) {
+ language = "c";
+ }
+ if (RUBY_PATTERN.matcher(content).find()) {
+ language = "ruby";
+ }
+ if (SHELL_PATTERN.matcher(content).find()) {
+ language = "shell";
+ }
+ if (content.contains("<?php") ) {
+ language = "php";
+ }
+ if (content.contains("$.") || content.contains("function (")) {
+ language = "javascript";
+ }
+ }
+ // [label](http://url.com) or
+ // [label](http://url.com "title")
+ CustomAsciiDocDocumentBuilder.this.emitContent("\n[source," + language + "]\n");
+ CustomAsciiDocDocumentBuilder.this.emitContent("----\n");
+ CustomAsciiDocDocumentBuilder.this.emitContent(content.startsWith("\n") ? content : "\n" + content);
+ CustomAsciiDocDocumentBuilder.this.emitContent("\n----\n\n");
+ }
+ }
- /**
- * Responsible for handling headers.
- *
- * @param level
- * @param attributes
- * @return
- */
- @Override
- protected Block computeHeading(int level, Attributes attributes) {
- if (level == 1) {
- return new AsciiDocMainHeaderBlock();
- }
- //return super.computeHeading(level, attributes);
- return new AsciiDocHeaderBlock(level, attributes);
- }
+ private static Logger LOG = Logger.getLogger(CustomAsciiDocDocumentBuilder.class.getName());
- @Override
- protected Block computeSpan(SpanType type, Attributes attributes) {
- switch (type) {
- case MARK:
- throw new IllegalStateException("Mark");
- case MONOSPACE:
- return new AsciiDocInlinePreformatted(null, this);
- case LINK:
- if (attributes instanceof LinkAttributes) {
- LinkAttributes linkAttributes = (LinkAttributes) attributes;
- if (linkAttributes.getHref() != null) {
- if (linkAttributes.getHref().startsWith("#")) {
- return new AsciiDocContentBlock("<<" + linkAttributes.getHref().substring(1) + ",", ">>", 0, 0);
- /* This is an internal link */
- }
- return new LinkBlock((LinkAttributes) attributes);
- } else if (linkAttributes.getId() != null) {
- return new AsciiDocContentBlock("[[", "]]", 0, 1);
- }
- }
- return new AsciiDocContentBlock("", "", 0, 0);
- case DELETED:
- return new AsciiDocContentBlock("[.line-through]#", "#", 0, 0);
- case UNDERLINED:
- return new AsciiDocContentBlock("[.underline]#", "#", 0, 0);
- default:
- return super.computeSpan(type, attributes);
- }
- }
+ private File topDirectory;
+ private File imageDirectory;
+ private File outputDirectory;
+ private File imageDestDirectory;
+ private ExternalLinksMap externalLinks;
+ private Language language;
+ private String relativePathToTutorialsRoot;
+ private File outputFile;
+ private String relativePathToTutorialFile;
+ private boolean enableOutput;
- @Override
- public void link(Attributes attributes, String hrefOrHashName, String text) {
- super.link(attributes, hrefOrHashName, text);
- }
+ private int lastHeadingLevel;
- @Override
- public void entityReference(String entity) {
- super.entityReference(entity);
- }
+ public CustomAsciiDocDocumentBuilder(File topDirectory, File imageDirectory, File outputFile, BufferedWriter output, ExternalLinksMap externalLinks) {
+ super(output);
+ this.topDirectory = topDirectory;
+ this.imageDirectory = imageDirectory;
+ this.outputFile = outputFile;
+ this.outputDirectory = outputFile.getParentFile();
+ this.language = Language.getLanguage(outputFile);
+ imageDestDirectory = new File(outputDirectory, "images");
+ imageDestDirectory.mkdirs();
+ this.externalLinks = externalLinks;
+ relativePathToTutorialsRoot = outputDirectory.toURI().relativize(topDirectory.toURI()).getPath();
+ relativePathToTutorialFile = topDirectory.toURI().relativize(outputFile.toURI()).getPath();
+ lastHeadingLevel = 1;
+ enableOutput = false;
+ }
- @Override
- protected Block
- computeBlock(BlockType type, Attributes attributes) {
- switch (type) {
- case CODE:
- case PREFORMATTED:
- String language = null;
+ /**
+ * Responsible for handling headers.
+ *
+ * @param level
+ * @param attributes
+ * @return
+ */
+ @Override
+ protected Block computeHeading(int level, Attributes attributes) {
- if (attributes.getCssClass() != null) {
- if (attributes.getCssClass().equals("source-java")) {
- language = "java";
+ if (level > lastHeadingLevel + 1) {
+ LOG.log(Level.WARNING, "Level {1} reduced to {2}", new Object[]{level, lastHeadingLevel + 1});
+ level = lastHeadingLevel + 1;
+ }
+ lastHeadingLevel = level;
- } else if (attributes.getCssClass().equals("source-xml")) {
- language = "xml";
+ if (level == 1) {
+ enableOutput = true;
+ return new AsciiDocMainHeaderBlock();
+ }
+ //return super.computeHeading(level, attributes);
+ return new AsciiDocHeaderBlock(level, attributes);
+ }
- } else if (attributes.getCssClass().equals("source-properties")) {
- language = "yaml";
+ @Override
+ protected Block computeSpan(SpanType type, Attributes attributes) {
+ switch (type) {
+ case MARK:
+ throw new IllegalStateException("Mark");
+ case MONOSPACE:
+ return new AsciiDocInlinePreformatted(null, this);
+ case LINK:
+ if (attributes instanceof LinkAttributes) {
+ LinkAttributes linkAttributes = (LinkAttributes) attributes;
+ if (linkAttributes.getHref() != null) {
+ if (linkAttributes.getHref().startsWith("#")) {
+ return new AsciiDocContentBlock("<<" + linkAttributes.getHref().substring(1) + ",", ">>", 0, 0);
+ /* This is an internal link */
+ }
+ return new LinkBlock((LinkAttributes) attributes);
+ } else if (linkAttributes.getId() != null) {
+ return new AsciiDocContentBlock("[[", "]]", 0, 1);
+ }
+ }
+ return new AsciiDocContentBlock("", "", 0, 0);
+ case DELETED:
+ return new AsciiDocContentBlock("[.line-through]#", "#", 0, 0);
+ case UNDERLINED:
+ return new AsciiDocContentBlock("[.underline]#", "#", 0, 0);
+ default:
+ return super.computeSpan(type, attributes);
+ }
+ }
- }
- }
- return new AsciiDocPreformatted(language);
- case NUMERIC_LIST:
- if (currentBlock != null) {
- BlockType currentBlockType = currentBlock.getBlockType();
- if (currentBlockType == BlockType.LIST_ITEM || currentBlockType == BlockType.DEFINITION_ITEM
- || currentBlockType == BlockType.DEFINITION_TERM) {
- return new AsciiDocListBlock(type, 1);
- }
- }
- return new AsciiDocListBlock(type, 2);
- case LIST_ITEM:
- if (computeCurrentListType() == BlockType.NUMERIC_LIST) {
- return new NumberedListItemBlock(""); //$NON-NLS-1$
- }
- return super.computeBlock(type, attributes);
- default:
- return super.computeBlock(type, attributes);
- }
- }
+ @Override
+ public void link(Attributes attributes, String hrefOrHashName, String text) {
+ if (hrefOrHashName.indexOf("http") != -1) {
+ hrefOrHashName = NetBeansTutorialsLinkReviewer.updateHREF(hrefOrHashName);
+ }
+ super.link(attributes, hrefOrHashName, text);
+ }
- @Override
- public void image(Attributes attributes, String url) {
- url = copyImageIfRequired(url, true);
+ @Override
+ public void entityReference(String entity) {
+ super.entityReference(entity);
+ }
- assertOpenBlock();
- try {
- currentBlock.write(computeImage(attributes, url, false));
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
+ @Override
+ protected void emitContent(String str) throws IOException {
+ if (!enableOutput) {
+ System.out.println("BEFORE CONTENT DISCARDED: " + str);
+ } else {
+ str = removeNotes(str);
+ super.emitContent(str);
+ }
+ }
- private String computeImage(Attributes attributes, String url, boolean inline) {
- // image:/path/to/img.jpg[] or
- // image:path/to/img.jpg[alt text]
- String altText = null;
- String title = null;
- if (attributes instanceof ImageAttributes) {
- ImageAttributes imageAttr = (ImageAttributes) attributes;
- altText = imageAttr.getAlt();
- }
- if (!Strings.isNullOrEmpty(attributes.getTitle())) {
- title = "title=\"" + attributes.getTitle().replaceAll("\n", " ").replaceAll("\r", " ") + '"'; //$NON-NLS-1$
- }
+ private static final Pattern[] NOTE_PATTERNS = {
+ Pattern.compile("\\*[Nn][Oo][Tt][EeAa]:[ ]*\\*(.*)$"),
+ Pattern.compile("\\*提示[ ]*:[ ]*\\*(.*)$"),
+ Pattern.compile("\\*注:[ ]*\\*(.*)$"),
+ Pattern.compile("\\*Observaçao:[ ]*\\*(.*)$"),
+ Pattern.compile("\\*Примечание[:\\.]?[ ]*\\*(.*)$"),};
- StringBuilder sb = new StringBuilder();
- sb.append(inline ? "image:" : "image::"); //$NON-NLS-1$
- sb.append(Strings.nullToEmpty(url));
- sb.append("["); //$NON-NLS-1$
- sb.append(Joiner.on(", ").skipNulls().join(altText, title)); //$NON-NLS-1$
- sb.append("]"); //$NON-NLS-1$
- return sb.toString();
- }
+ private static final String removeNotes(String text) {
+ for (Pattern p : NOTE_PATTERNS) {
+ Matcher m = p.matcher(text);
+ if (m.matches()) {
+ return "NOTE: " + m.group(1);
+ }
+ }
+ return text;
+ }
- private String copyImageIfRequired(String url, boolean warnMissingImages) {
- if (url.startsWith("http://") || url.startsWith("https://")) {
- // System.err.format("Image url '%s'%n", url);
- return url;
- }
- if (url.startsWith("../../images/")) {
- url = url.replace("../../images/", "/");
- }
- if (url.startsWith("../images/")) {
- url = url.replace("../images/", "/");
- }
- File imageFile = new File(imageDirectory, url);
- File copiedImageFile = new File(imageDestDirectory, imageFile.getName());
- if (imageFile.exists()) {
- if (!copiedImageFile.exists()) {
- try {
- Files.copy(imageFile.toPath(), copiedImageFile.toPath());
- url = imageDestDirectory.getName() + "/" + imageFile.getName();
- } catch (IOException ex) {
- Logger.getLogger(CustomAsciiDocDocumentBuilder.class.getName()).log(Level.SEVERE, null, ex);
- }
- } else {
- url = imageDestDirectory.getName() + "/" + imageFile.getName();
- }
- } else if (warnMissingImages) {
- LOG.log(Level.WARNING, "Image not found: {0}\n in file {1}\n for file {2}", new Object[]{url,
- imageFile.getAbsolutePath(),
- CustomAsciiDocDocumentBuilder.this.outputFile.getAbsolutePath()});
- }
- return url;
- }
+ @Override
+ protected Block
+ computeBlock(BlockType type, Attributes attributes) {
+ switch (type) {
+ case QUOTE:
+ return new AsciiDocQuote();
+ case CODE:
+ case PREFORMATTED:
+ String language = null;
+
+ if (attributes.getCssClass() != null) {
+ if (attributes.getCssClass().equals("source-java")) {
+ language = "java";
+
+ } else if (attributes.getCssClass().equals("source-xml")) {
+ language = "xml";
+
+ } else if (attributes.getCssClass().equals("source-properties")) {
+ language = "yaml";
+
+ }
+ }
+ return new AsciiDocPreformatted(language);
+ case NUMERIC_LIST:
+ if (currentBlock != null) {
+ BlockType currentBlockType = currentBlock.getBlockType();
+ if (currentBlockType == BlockType.LIST_ITEM || currentBlockType == BlockType.DEFINITION_ITEM
+ || currentBlockType == BlockType.DEFINITION_TERM) {
+ return new AsciiDocListBlock(type, 1);
+ }
+ }
+ return new AsciiDocListBlock(type, 2);
+ case LIST_ITEM:
+ if (computeCurrentListType() == BlockType.NUMERIC_LIST) {
+ return new NumberedListItemBlock(""); //$NON-NLS-1$
+ }
+ return super.computeBlock(type, attributes);
+ default:
+ return super.computeBlock(type, attributes);
+ }
+ }
+
+ @Override
+ public void image(Attributes attributes, String url) {
+ url = copyImageIfRequired(url, true);
+
+ assertOpenBlock();
+ try {
+ currentBlock.write(computeImage(attributes, url, false));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ private String computeImage(Attributes attributes, String url, boolean inline) {
+ // image:/path/to/img.jpg[] or
+ // image:path/to/img.jpg[alt text]
+ String altText = null;
+ String title = null;
+ if (attributes instanceof ImageAttributes) {
+ ImageAttributes imageAttr = (ImageAttributes) attributes;
+ altText = imageAttr.getAlt();
+ }
+ if (!Strings.isNullOrEmpty(attributes.getTitle())) {
+ title = "title=\"" + attributes.getTitle().replaceAll("\n", " ").replaceAll("\r", " ") + '"'; //$NON-NLS-1$
+ }
+
+ StringBuilder sb = new StringBuilder();
+ sb.append(inline ? "image:" : "\nimage::"); //$NON-NLS-1$
+ sb.append(Strings.nullToEmpty(url));
+ sb.append("["); //$NON-NLS-1$
+ sb.append(Joiner.on(", ").skipNulls().join(altText, title)); //$NON-NLS-1$
+ sb.append("]"); //$NON-NLS-1$
+ return sb.toString();
+ }
+
+ private String copyImageIfRequired(String url, boolean warnMissingImages) {
+ if (url.startsWith("http://") || url.startsWith("https://")) {
+ // System.err.format("Image url '%s'%n", url);
+ return url;
+ }
+ if (url.startsWith("../../images/")) {
+ url = url.replace("../../images/", "/");
+ }
+ if (url.startsWith("../images/")) {
+ url = url.replace("../images/", "/");
+ }
+ File imageFile = new File(imageDirectory, url);
+ File copiedImageFile = new File(imageDestDirectory, imageFile.getName());
+ if (imageFile.exists()) {
+ if (!copiedImageFile.exists()) {
+ try {
+ Files.copy(imageFile.toPath(), copiedImageFile.toPath());
+ url = imageDestDirectory.getName() + "/" + imageFile.getName();
+ } catch (IOException ex) {
+ Logger.getLogger(CustomAsciiDocDocumentBuilder.class.getName()).log(Level.SEVERE, null, ex);
+ }
+ } else {
+ url = imageDestDirectory.getName() + "/" + imageFile.getName();
+ }
+ } else if (warnMissingImages) {
+ LOG.log(Level.WARNING, "Image not found: {0}\n in file {1}\n for file {2}", new Object[]{url,
+ imageFile.getAbsolutePath(),
+ CustomAsciiDocDocumentBuilder.this.outputFile.getAbsolutePath()});
+ }
+ return url;
+ }
}
diff --git a/tutorials-convert/src/main/java/org/netbeans/tools/tutorials/HTMLConverter.java b/tutorials-convert/src/main/java/org/netbeans/tools/tutorials/HTMLConverter.java
index 9954675..9cd6c65 100644
--- a/tutorials-convert/src/main/java/org/netbeans/tools/tutorials/HTMLConverter.java
+++ b/tutorials-convert/src/main/java/org/netbeans/tools/tutorials/HTMLConverter.java
@@ -41,6 +41,12 @@
*/
public class HTMLConverter {
+ /**
+ * Depth of directory nesting.
+ * Set to 1 for debugging purposes, big number otherwise.
+ */
+ private final static int DEPTH = 9999;
+
private static final String APACHE_LICENSE_HEADER = ""
+ "\n"
+ " Licensed to the Apache Software Foundation (ASF) under one\n"
@@ -67,7 +73,8 @@
private static void convert(File docsTutorialsDocs, File docsTutorialsImages, File dest, ExternalLinksMap externalLinks) throws Exception {
LOG.log(Level.INFO, "Converting tutorials from {0} to {1}", new Object[]{docsTutorialsDocs.getAbsolutePath(), dest.getAbsolutePath()});
- List<File> html_files = Files.find(docsTutorialsDocs.toPath(), 999,
+
+ List<File> html_files = Files.find(docsTutorialsDocs.toPath(), DEPTH,
(p, bfa) -> bfa.isRegularFile()).map(Path::toFile).filter((f) -> f.getName().endsWith(".html")).collect(Collectors.toList());
URI baseDirectory = docsTutorialsDocs.toURI();
@@ -90,7 +97,7 @@
private static void convertTrails(File docsTutorialsTrailsDirectory, File docsTutorialsImages, File dest, ExternalLinksMap externalLinks) throws Exception {
LOG.log(Level.INFO, "Converting trails {0} to {1}", new Object[]{docsTutorialsTrailsDirectory.getAbsolutePath(), dest.getAbsolutePath()});
- List<File> html_files = Files.find(docsTutorialsTrailsDirectory.toPath(), 999,
+ List<File> html_files = Files.find(docsTutorialsTrailsDirectory.toPath(), DEPTH,
(p, bfa) -> bfa.isRegularFile()).map(Path::toFile).filter((f) -> f.getName().endsWith(".html")).collect(Collectors.toList());
URI baseDirectory = docsTutorialsTrailsDirectory.toURI();
@@ -205,22 +212,33 @@
private static void usage() {
System.err.println("Use: java " + HTMLConverter.class
- .getName() + " tutorials-directory images-directory");
- System.err.println(" See README.md for instructions on how to prepare those directories.");
+ .getName() + " directory");
+ System.err.println(" Where directory is the directory were you've clone:");
+ System.err.println(" https://github.com/wadechandler/netbeans-static-site.git");
+ System.err.println("See README.md for details.");
System.exit(1);
}
public static void main(String[] args) throws Exception {
- if (args.length != 2) {
+ if (args.length != 1) {
usage();
}
- File tutorialsDirectory = new File(args[0]);
- checkDirectoryExists("Incorrect tutorials directory ", tutorialsDirectory);
-
- File docsTutorialsImagesDirectory = new File(args[1]);
- checkDirectoryExists("Incorrect images directory ", docsTutorialsImagesDirectory);
+ File cloneDirectory = new File(args[0]);
+ checkDirectoryExists("Incorrect clone directory ", cloneDirectory);
+ File srcContent = new File(new File(cloneDirectory, "src"), "content");
+ checkDirectoryExists("Incorrect clone/src/content directory ", srcContent);
+
+ File platform = new File(srcContent, "platform");
+ checkDirectoryExists("Incorrect clone/src/content/platform directory ", srcContent);
+
+ File platformTutorials = new File(platform, "tutorials");
+ checkDirectoryExists("Incorrect clone/src/content/platform/tutorials directory ", srcContent);
+
+ File platformImages = new File(platform, "images");
+ checkDirectoryExists("Incorrect clone/src/content/platform/images directory ", srcContent);
+
File currentDirectory = new File(System.getProperty("user.dir"));
File dest = new File(currentDirectory, "tutorials-asciidoc");
@@ -237,9 +255,9 @@
ExternalLinksMap externalLinks = new ExternalLinksMap();
- convert(tutorialsDirectory, docsTutorialsImagesDirectory, dest, externalLinks);
-
- convertTrails(tutorialsDirectory, docsTutorialsImagesDirectory, dest, externalLinks);
+ convert(platformTutorials, platformImages, dest, externalLinks);
+
+ // convertTrails(cloneDirectory, docsTutorialsImagesDirectory, dest, externalLinks);
LOG.info("Generating 'external-links.txt' with list of external links...");
diff --git a/tutorials-convert/src/main/java/org/netbeans/tools/tutorials/NetBeansTutorialsLinkReviewer.java b/tutorials-convert/src/main/java/org/netbeans/tools/tutorials/NetBeansTutorialsLinkReviewer.java
new file mode 100644
index 0000000..5e36160
--- /dev/null
+++ b/tutorials-convert/src/main/java/org/netbeans/tools/tutorials/NetBeansTutorialsLinkReviewer.java
@@ -0,0 +1,341 @@
+/*
+ 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.
+ */
+package org.netbeans.tools.tutorials;
+
+import java.util.regex.Pattern;
+
+/**
+ * Modifies some hrefs in links to the new Apache infrastructure.
+ */
+public final class NetBeansTutorialsLinkReviewer {
+
+ private static final String EXACT = "exact";
+
+ private static final String[][] PREFIXES = {
+ {
+ "http://java.sun.com/j2se/1.4.2/download.html",
+ "https://www.oracle.com/technetwork/java/javase/downloads/index.html"
+ },
+ {
+ "http://java.sun.com/j2se/1.4.2/ja/download.html",
+ "https://www.oracle.com/technetwork/java/javase/downloads/index.html"
+ },
+ {
+ "http://java.sun.com/j2se/1.4.2/jadownload.html",
+ "https://www.oracle.com/technetwork/java/javase/downloads/index.html"
+ },
+ {
+ "http://java.sun.com/j2se/1.5.0/download.jsp",
+ "https://www.oracle.com/technetwork/java/javase/downloads/index.html"
+ },
+ {
+ "http://java.sun.com/j2se/1.5.0/ja/download.html",
+ "https://www.oracle.com/technetwork/java/javase/downloads/index.html"
+ },
+ {
+ "http://netbeans.org/kb/docs",
+ "https://netbeans.apache.org/kb/docs"
+ },
+ {
+ "http://Platform.netbeans.org/tutorials",
+ "https://netbeans.apache.org/tutorials"
+ },
+ {
+ "http://bits.nbextras.org",
+ "https://bits.netbeans.org"
+ },
+ {
+ "http://blogs.sun.com",
+ "https://blogs.oracle.com"
+ },
+ {
+ "https://code.google.com/p/openmap/downloads/list",
+ "https://github.com/OpenMap-java/openmap/releases"
+ },
+ {
+ "http://core.netbeans.org/source/browse/*checkout*/core/swing/plaf/src/org/netbeans/swing/plaf/util/RelativeColor.java",
+ "https://github.com/apache/netbeans/blob/master/platform/o.n.swing.plaf/src/org/netbeans/swing/plaf/util/RelativeColor.java"
+ },
+ {
+ "http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/nbms/extra/org-netbeans-modules-uihandler-interactive.nbm",
+ "https://builds.apache.org/view/M-R/view/NetBeans/job/netbeans-linux/lastSuccessfulBuild/artifact/nbbuild/nbms/platform/org-netbeans-modules-uihandler.nbm"
+ },
+ {
+ "http://www.netbeans.info/downloads/",
+ "https://netbeans.apache.org/download/index.html",
+ EXACT
+ },
+ {
+ "http://download.netbeans.org",
+ "https://netbeans.apache.org/download/index.html",
+ EXACT
+ },
+ {
+ "https://netbeans.org/downloads",
+ "https://netbeans.apache.org/download/index.html",
+ EXACT
+ },
+ {
+ "http://graph.netbeans.org",
+ "https://netbeans.apache.org/graph"
+ },
+ {
+ "https://hg.netbeans.org/main/file/bdb88f1fa043/html",
+ "https://github.com/apache/netbeans/tree/master/ide/html"
+ },
+ {
+ "http://hg.netbeans.org/main/file/bdb88f1fa043/html/src/org/netbeans/modules/html/palette/items",
+ "https://github.com/apache/netbeans/tree/master/ide/html/src/org/netbeans/modules/html/palette/items"
+ },
+ {
+ "http://hg.netbeans.org/main/file/",
+ "https://github.com/apache/netbeans/"
+ },
+ {
+ "http://javacc.java.net",
+ "https://javacc.github.io/javacc/"
+ },
+ {
+ "http://java.net/projects/colorchooser/sources/svn/show/trunk/www/release?rev=82",
+ "http://web.archive.org/web/20120107130444/http://java.net:80/projects/colorchooser/sources/svn/show/trunk/www/release?rev=82"
+ },
+ {
+ "http://java.net/projects/javacc",
+ "http://web.archive.org/web/20170410180215/https://java.net/projects/javacc/"
+ },
+ {
+ "http://java.net/projects/javacc/downloads",
+ "http://web.archive.org/web/20170130015602/https://java.net/projects/javacc/downloads"
+ },
+ {
+ "http://java.net/projects/javacc",
+ "https://javacc.github.io/javacc/"
+ },
+ {
+ "http://java.net/projects/javafxbrowser",
+ "http://web.archive.org/web/20150927002527/https://java.net/projects/javafxbrowser"
+ },
+ {
+ "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.2/tutorials/CustomerProjectType",
+ "http://web.archive.org/web/20130305120247/http://java.net:80/projects/nb-api-samples/sources/api-samples/show/versions/7.2/tutorials/CustomerProjectType"
+ },
+ {
+ "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.3/tutorials/GoogleToolbar",
+ "http://web.archive.org/web/20150523015116/https://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.3/tutorials/GoogleToolbar"
+ },
+ {
+ "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.3/tutorials/PaintApp",
+ "http://web.archive.org/web/20130131034823/http://java.net:80/projects/nb-api-samples/sources/api-samples/show/versions/7.3/tutorials/PaintApp"
+ },
+ {
+ "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.3/tutorials/selection-management/3-of-4/EventManager",
+ "http://web.archive.org/web/20130320045006/http://java.net:80/projects/nb-api-samples/sources/api-samples/show/versions/7.3/tutorials/selection-management/3-of-4/EventManager"
+ },
+ {
+ "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.3/tutorials/WordProcessor",
+ "http://web.archive.org/web/20130405002940/http://java.net:80/projects/nb-api-samples/sources/api-samples/show/versions/7.3/tutorials/WordProcessor"
+ },
+ {
+ "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/CountryCodeCompleter",
+ "http://web.archive.org/web/20150927111721/https://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/CountryCodeCompleter"
+ },
+ {
+ "http://java.net/projects/nb-api-samples/sources/api-samples/",
+ "http://web.archive.org/web/20170409072842/http://java.net/projects/nb-api-samples/"
+ },
+ {
+ "http://java.net/projects/nbribbonbar/",
+ "http://web.archive.org/web/20161103225925/https://java.net/projects/nbribbonbar"
+ },
+ {
+ "http://java.net/projects/netbeans",
+ "http://web.archive.org/web/20170410015153/https://java.net/projects/netbeans"
+ },
+ {
+ "https://colorchooser.dev.java.net/",
+ "http://web.archive.org/web/20081119053233/http://colorchooser.dev.java.net/"
+ },
+ {
+ "http://www.netbeans.org/project/www/download/dev/javadoc/",
+ "https://bits.netbeans.org/dev/javadoc/"
+ },
+ {
+ "http://java.sun.com/j2se/1.3/docs/guide/",
+ "https://docs.oracle.com/javase/8/docs/technotes/guides/"
+ },
+ {
+ "http://www.netbeans.org/download/dev/javadoc/",
+ "https://bits.netbeans.org/dev/javadoc"
+ },
+ {
+ "http://netbeans.org/download/dev/javadoc",
+ "https://bits.netbeans.org/dev/javadoc"
+ },
+ {
+ "https://netbeans.org/download/dev/javadoc",
+ "https://bits.netbeans.org/dev/javadoc"
+ },
+ {
+ "https://netbeans.org/project/www/download/dev/javadoc/",
+ "https://bits.netbeans.org/dev/javadoc/"
+ },
+ {
+ "http://java.sun.com/j2se/1.4.2/docs/api/",
+ "https://docs.oracle.com/javase/8/docs/api/"
+ },
+ {
+ "http://docs.oracle.com/javase/1.4.2/docs/api/",
+ "https://docs.oracle.com/javase/8/docs/api/"
+ },
+ {
+ "http://java.sun.com/j2ee/1.4/docs/api/",
+ "https://docs.oracle.com/javaee/1.4/api/"
+ },
+ {
+ "http://java.sun.com/j2ee/",
+ "https://docs.oracle.com/javaee/"
+ },
+ {
+ "http://java.sun.com/j2se",
+ "https://docs.oracle.com/javase"
+ },
+ {
+ "http://java.sun.com/javase/downloads/index.jsp",
+ "https://www.oracle.com/technetwork/java/javase/downloads/index.html"
+ },
+ {
+ "http://java.sun.com/javase/downloads/index.jsp",
+ "https://www.oracle.com/technetwork/java/javase/downloads/index.html"
+ },
+ {
+ "https://jemmy.dev.java.net",
+ "https://hg.openjdk.java.net/code-tools/jemmy/v2/file/7f1077e65e78"
+ },
+ {
+ "http://jsourcery.com/output/sourceforge/g4j/0.3.12/siuying/gm/structure/GMThread.html",
+ "http://g4j.sourceforge.net/"
+ },
+ {
+ "http://mojo.codehaus.org/nbm-maven-plugin/",
+ "http://bits.netbeans.org/mavenutilities/nbm-maven-plugin/"
+ },
+ {
+ "https://netbeans.org/about/contact_form.html",
+ "http://netbeans.apache.org/community/mailing-lists.html",
+ EXACT
+ },
+ {
+ "https://netbeans.org/kb/trails",
+ "https://netbeans.apache.org/kb/docs",
+ },
+ {
+ "https://netbeans.org/issues/show_bug.cgi",
+ "https://bz.apache.org/netbeans/show_bug.cgi"
+ },
+ {
+ "https://netbeans.org/bugzilla/show_bug.cgi",
+ "https://bz.apache.org/netbeans/show_bug.cgi"
+ },
+ {
+ "https://netbeans.org/kb/docs",
+ "https://netbeans.apache.org/kb/docs"
+ },
+ {
+ "http://platform.netbeans.org/tutorials",
+ "https://netbeans.apache.org/tutorials"
+ },
+ {
+ "https://platform.netbeans.org/tutorials",
+ "https://netbeans.apache.org/tutorials"
+ },
+ {
+ "https://platform.netbeans.org",
+ "https://netbeans.apache.org/platform"
+ },
+ {
+ "http://www.sun.com/books/catalog/rich_client_programming.xml",
+ "https://www.amazon.com/Rich-Client-Programming-Plugging-NetBeans/dp/0132354802"
+ },
+ {
+ "http://www.oracle.com/technetwork/java/javafx/overview/index.html",
+ "https://www.oracle.com/technetwork/java/javase/overview/javafx-overview-2158620.html"
+ }
+ };
+
+ public static final String updateHREF(String href) {
+
+ String originalHREF = href;
+
+ if (href.indexOf("download") != -1) {
+ // System.out.println("Breakpoint! " + href); // Breakpoint
+ }
+
+ for (String[] prefixSet : PREFIXES) {
+ if (href.startsWith(prefixSet[0])) {
+ if (prefixSet.length == 3 && EXACT.equals(prefixSet[2])) {
+ href = prefixSet[1];
+ } else {
+ href = prefixSet[1] + href.substring(prefixSet[0].length());
+ }
+ break;
+ }
+ }
+
+ return href;
+ }
+
+ /**
+ * Quick & dirty tests.
+ *
+ * @param args
+ */
+ public static void main(String[] args) {
+
+ final String[][] tests = {
+ {
+ "http://netbeans.org/kb/docs/a/b/c",
+ "https://netbeans.apache.org/kb/docs/a/b/c"
+ },
+ {
+ "http://Platform.netbeans.org/tutorials/nbm-windowsapi.html",
+ "https://netbeans.apache.org/tutorials/nbm-windowsapi.html"
+ },
+ {
+ "http://bits.nbextras.org/dev/javadoc/org-openide-dialogs/org/openide/NotifyDescriptor.html",
+ "https://bits.netbeans.org/dev/javadoc/org-openide-dialogs/org/openide/NotifyDescriptor.html"
+ },
+ {
+ "http://blogs.sun.com/geertjan/entry/creating_a_better_java_class",
+ "https://blogs.oracle.com/geertjan/entry/creating_a_better_java_class"
+
+ }
+ };
+
+ for (String[] test : tests) {
+ String result = updateHREF(test[0]);
+ if (!result.equals(test[1])) {
+ throw new IllegalArgumentException(String.format("%s is wrong: expected %s got %s",
+ test[0],
+ test[1],
+ result));
+ }
+ }
+ }
+
+}
diff --git a/tutorials-convert/web-archive.yml b/tutorials-convert/web-archive.yml
new file mode 100644
index 0000000..dfd0fc3
--- /dev/null
+++ b/tutorials-convert/web-archive.yml
@@ -0,0 +1,287 @@
+- domain: "colorchooser.dev.java.net"
+ links:
+ link: "https://colorchooser.dev.java.net/"
+ used-at:
+ - "60/nbm-paintapp.asciidoc"
+ - "60/nbm-paintapp_ja.asciidoc"
+ - "60/nbm-paintapp_pt_BR.asciidoc"
+ - "60/nbm-paintapp_ru.asciidoc"
+ - "60/nbm-paintapp_zh_CN.asciidoc"
+ - "67/nbm-paintapp.asciidoc"
+ - "67/nbm-paintapp_ja.asciidoc"
+ - "67/nbm-paintapp_pt_BR.asciidoc"
+ - "67/nbm-paintapp_zh_CN.asciidoc"
+ - "68/nbm-paintapp.asciidoc"
+ - "68/nbm-paintapp_ja.asciidoc"
+ - "68/nbm-paintapp_pt_BR.asciidoc"
+ - "68/nbm-paintapp_ru.asciidoc"
+ - "68/nbm-paintapp_zh_CN.asciidoc"
+ - "69/nbm-paintapp.asciidoc"
+ - "69/nbm-paintapp_ja.asciidoc"
+ - "69/nbm-paintapp_pt_BR.asciidoc"
+ - "69/nbm-paintapp_ru.asciidoc"
+ - "69/nbm-paintapp_zh_CN.asciidoc"
+ - "691/nbm-paintapp.asciidoc"
+ - "691/nbm-paintapp_ja.asciidoc"
+ - "691/nbm-paintapp_pt_BR.asciidoc"
+ - "691/nbm-paintapp_ru.asciidoc"
+ - "691/nbm-paintapp_zh_CN.asciidoc"
+ - "70/nbm-paintapp_ja.asciidoc"
+ - "70/nbm-paintapp_pt_BR.asciidoc"
+ - "70/nbm-paintapp_ru.asciidoc"
+ - "70/nbm-paintapp_zh_CN.asciidoc"
+ - "71/nbm-paintapp_ja.asciidoc"
+ - "71/nbm-paintapp_pt_BR.asciidoc"
+ - "71/nbm-paintapp_ru.asciidoc"
+ - "71/nbm-paintapp_zh_CN.asciidoc"
+ - "72/nbm-paintapp_ja.asciidoc"
+ - "72/nbm-paintapp_pt_BR.asciidoc"
+ - "72/nbm-paintapp_ru.asciidoc"
+ - "72/nbm-paintapp_zh_CN.asciidoc"
+ - "73/nbm-paintapp_ja.asciidoc"
+ - "73/nbm-paintapp_pt_BR.asciidoc"
+ - "73/nbm-paintapp_ru.asciidoc"
+ - "73/nbm-paintapp_zh_CN.asciidoc"
+ - "74/nbm-paintapp_ja.asciidoc"
+ - "74/nbm-paintapp_pt_BR.asciidoc"
+ - "74/nbm-paintapp_ru.asciidoc"
+ - "74/nbm-paintapp_zh_CN.asciidoc"
+ - "80/nbm-paintapp_ja.asciidoc"
+ - "80/nbm-paintapp_pt_BR.asciidoc"
+ - "80/nbm-paintapp_ru.asciidoc"
+ - "80/nbm-paintapp_zh_CN.asciidoc"
+ - "nbm-paintapp_ja.asciidoc"
+ - "nbm-paintapp_pt_BR.asciidoc"
+ - "nbm-paintapp_ru.asciidoc"
+ - "nbm-paintapp_zh_CN.asciidoc"
+- domain: "java.net"
+ links:
+ link: "http://java.net/projects/colorchooser/sources/svn/show/trunk/www/release?rev=82"
+ used-at:
+ - "70/nbm-paintapp.asciidoc"
+ - "71/nbm-paintapp.asciidoc"
+ - "72/nbm-paintapp.asciidoc"
+ link: "http://java.net/projects/javacc"
+ used-at:
+ - "73/nbm-javacc-lexer.asciidoc"
+ - "74/nbm-javacc-lexer.asciidoc"
+ - "80/nbm-javacc-lexer.asciidoc"
+ - "nbm-javacc-lexer.asciidoc"
+ link: "http://java.net/projects/javacc/downloads"
+ used-at:
+ - "73/nbm-javacc-lexer.asciidoc"
+ - "74/nbm-javacc-lexer.asciidoc"
+ - "80/nbm-javacc-lexer.asciidoc"
+ - "nbm-javacc-lexer.asciidoc"
+ link: "http://java.net/projects/javafxbrowser"
+ used-at:
+ - "73/nbm-feedreader.asciidoc"
+ - "74/nbm-feedreader.asciidoc"
+ - "80/nbm-feedreader.asciidoc"
+ - "nbm-feedreader.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.1/tutorials/PovSuite"
+ used-at:
+ - "71/nbm-povray-1.asciidoc"
+ - "72/nbm-povray-1.asciidoc"
+ - "73/nbm-povray-1.asciidoc"
+ - "74/nbm-povray-1.asciidoc"
+ - "80/nbm-povray-1.asciidoc"
+ - "nbm-povray-1.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.2/tutorials/CustomerProjectType"
+ used-at:
+ - "73/nbm-projecttype.asciidoc"
+ - "74/nbm-projecttype.asciidoc"
+ - "80/nbm-projecttype.asciidoc"
+ - "nbm-projecttype.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.2/tutorials/SimpleJava"
+ used-at:
+ - "73/nbm-javacc-lexer.asciidoc"
+ - "74/nbm-javacc-lexer.asciidoc"
+ - "80/nbm-javacc-lexer.asciidoc"
+ - "nbm-javacc-lexer.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.2/tutorials/SimpleJava2"
+ used-at:
+ - "74/nbm-javacc-parser.asciidoc"
+ - "80/nbm-javacc-parser.asciidoc"
+ - "nbm-javacc-parser.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.3/tutorials/FeedReader"
+ used-at:
+ - "73/nbm-feedreader.asciidoc"
+ - "74/nbm-feedreader.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.3/tutorials/GoogleToolbar"
+ used-at:
+ - "73/nbm-google.asciidoc"
+ - "74/nbm-google.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.3/tutorials/PaintApp"
+ used-at:
+ - "73/nbm-paintapp.asciidoc"
+ - "74/nbm-paintapp.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.3/tutorials/WordProcessor"
+ used-at:
+ - "74/nbm-quick-start.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.3/tutorials/selection-management/1-of-4/EventManager"
+ used-at:
+ - "73/nbm-selection-1.asciidoc"
+ - "74/nbm-selection-1.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.3/tutorials/selection-management/2-of-4/EventManager"
+ used-at:
+ - "73/nbm-selection-2.asciidoc"
+ - "74/nbm-selection-2.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.3/tutorials/selection-management/3-of-4/EventManager"
+ used-at:
+ - "73/nbm-nodesapi2.asciidoc"
+ - "74/nbm-nodesapi2.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.3/tutorials/selection-management/4-of-4/EventManager"
+ used-at:
+ - "73/nbm-property-editors.asciidoc"
+ - "74/nbm-property-editors.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/ABC"
+ used-at:
+ - "80/nbm-ant.asciidoc"
+ - "nbm-ant.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/AbcFileType"
+ used-at:
+ - "80/nbm-filetype.asciidoc"
+ - "nbm-filetype.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/AdditionalFileTemplates"
+ used-at:
+ - "80/nbm-filetemplates.asciidoc"
+ - "nbm-filetemplates.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/CoolOptions"
+ used-at:
+ - "80/nbm-options.asciidoc"
+ - "nbm-options.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/CopyFQN"
+ used-at:
+ - "80/nbm-copyfqn.asciidoc"
+ - "nbm-copyfqn.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/CountryCodeCompleter"
+ used-at:
+ - "80/nbm-code-completion.asciidoc"
+ - "nbm-code-completion.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/DBManager"
+ used-at:
+ - "80/nbm-crud.asciidoc"
+ - "nbm-crud.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/DemoCodeGenerator"
+ used-at:
+ - "80/nbm-code-generator.asciidoc"
+ - "nbm-code-generator.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/DemoWizard"
+ used-at:
+ - "80/nbm-wizard.asciidoc"
+ - "nbm-wizard.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/FeedReader"
+ used-at:
+ - "80/nbm-feedreader.asciidoc"
+ - "nbm-feedreader.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/GoogleToolbar"
+ used-at:
+ - "80/nbm-google.asciidoc"
+ - "nbm-google.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/HTMLCodeTemplates"
+ used-at:
+ - "80/nbm-code-template.asciidoc"
+ - "nbm-code-template.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/HTMLEditor"
+ used-at:
+ - "80/nbm-htmleditor.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/MarkHTMLOccurrences"
+ used-at:
+ - "80/nbm-mark-occurrences.asciidoc"
+ - "nbm-mark-occurrences.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/MyCustomHints"
+ used-at:
+ - "80/nbm-java-hint.asciidoc"
+ - "nbm-java-hint.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/MyIDE"
+ used-at:
+ - "80/nbm-ide.asciidoc"
+ - "nbm-ide.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/MySpecialHyperlink"
+ used-at:
+ - "80/nbm-hyperlink.asciidoc"
+ - "nbm-hyperlink.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/NetBeansZoneSearch"
+ used-at:
+ - "80/nbm-quick-search.asciidoc"
+ - "nbm-quick-search.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/PaintApp"
+ used-at:
+ - "80/nbm-paintapp.asciidoc"
+ - "nbm-paintapp.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/PredictionSystem"
+ used-at:
+ - "80/nbm-workflow.asciidoc"
+ - "nbm-workflow.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/ShowXMLStructure"
+ used-at:
+ - "80/nbm-xmleditor.asciidoc"
+ - "nbm-xmleditor.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/SystemProperties"
+ used-at:
+ - "80/nbm-nodesapi.asciidoc"
+ - "nbm-nodesapi.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/WordProcessor"
+ used-at:
+ - "80/nbm-quick-start.asciidoc"
+ - "nbm-quick-start.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/container"
+ used-at:
+ - "80/nbm-runtime-container.asciidoc"
+ - "nbm-runtime-container.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/geospatial"
+ used-at:
+ - "80/nbm-geospatial.asciidoc"
+ - "nbm-geospatial.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/javafx"
+ used-at:
+ - "80/nbm-javafx.asciidoc"
+ - "nbm-javafx.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/palette"
+ used-at:
+ - "80/nbm-palette-api1.asciidoc"
+ - "80/nbm-palette-api2.asciidoc"
+ - "nbm-palette-api1.asciidoc"
+ - "nbm-palette-api2.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/porting-basic"
+ used-at:
+ - "80/nbm-porting-basic.asciidoc"
+ - "nbm-porting-basic.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/selection-management/1-of-4/EventManager"
+ used-at:
+ - "80/nbm-selection-1.asciidoc"
+ - "nbm-selection-1.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/selection-management/2-of-4/EventManager"
+ used-at:
+ - "80/nbm-selection-2.asciidoc"
+ - "nbm-selection-2.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/selection-management/3-of-4/EventManager"
+ used-at:
+ - "80/nbm-nodesapi2.asciidoc"
+ - "nbm-nodesapi2.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/selection-management/4-of-4/EventManager"
+ used-at:
+ - "80/nbm-property-editors.asciidoc"
+ - "nbm-property-editors.asciidoc"
+ link: "http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.1/tutorials/HTMLEditor"
+ used-at:
+ - "nbm-htmleditor.asciidoc"
+ link: "http://java.net/projects/nbribbonbar/"
+ used-at:
+ - "70/nbm-ribbonbar.asciidoc"
+ - "71/nbm-ribbonbar.asciidoc"
+ - "72/nbm-ribbonbar.asciidoc"
+ - "73/nbm-ribbonbar.asciidoc"
+ - "74/nbm-ribbonbar.asciidoc"
+ - "80/nbm-ribbonbar.asciidoc"
+ - "nbm-ribbonbar.asciidoc"
+ link: "http://java.net/projects/netbeans"
+ used-at:
+ - "71/nbm-povray-10.asciidoc"
+ - "72/nbm-povray-10.asciidoc"
+ - "73/nbm-povray-10.asciidoc"
+ - "74/nbm-povray-10.asciidoc"
+ - "80/nbm-povray-10.asciidoc"
+ - "nbm-povray-10.asciidoc"
+