sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1791494 - in /sis/branches/JDK9: ./ core/sis-build-helper/ core/sis-build-helper/src/main/java/ core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/ core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/
Date Sat, 15 Apr 2017 11:31:00 GMT
Author: desruisseaux
Date: Sat Apr 15 11:31:00 2017
New Revision: 1791494

URL: http://svn.apache.org/viewvc?rev=1791494&view=rev
Log:
Update for API change in jdk.javadoc module. Also remove module-info.java since Maven dependencies
are not yet modularized.

Removed:
    sis/branches/JDK9/core/sis-build-helper/src/main/java/module-info.java
Modified:
    sis/branches/JDK9/core/sis-build-helper/pom.xml
    sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/Doclet.java
    sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Include.java
    sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/InlineTaglet.java
    sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Module.java
    sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Preformat.java
    sis/branches/JDK9/pom.xml

Modified: sis/branches/JDK9/core/sis-build-helper/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-build-helper/pom.xml?rev=1791494&r1=1791493&r2=1791494&view=diff
==============================================================================
--- sis/branches/JDK9/core/sis-build-helper/pom.xml (original)
+++ sis/branches/JDK9/core/sis-build-helper/pom.xml Sat Apr 15 11:31:00 2017
@@ -87,6 +87,14 @@ Define Maven Mojos and Javadoc taglets f
   <build>
     <plugins>
       <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <compilerArgs>
+            <arg>--add-modules</arg> <arg>jdk.javadoc</arg>
+          </compilerArgs>
+        </configuration>
+      </plugin>
+      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-plugin-plugin</artifactId>
         <version>3.5</version>
@@ -108,12 +116,12 @@ Define Maven Mojos and Javadoc taglets f
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-core</artifactId>
-      <version>3.3.9</version>
+      <version>3.5.0</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
-      <version>3.3.9</version>
+      <version>3.5.0</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>

Modified: sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/Doclet.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/Doclet.java?rev=1791494&r1=1791493&r2=1791494&view=diff
==============================================================================
--- sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/Doclet.java
[UTF-8] (original)
+++ sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/Doclet.java
[UTF-8] Sat Apr 15 11:31:00 2017
@@ -37,7 +37,7 @@ import javax.tools.Diagnostic;
 import jdk.javadoc.doclet.Reporter;
 import jdk.javadoc.doclet.Doclet.Option;
 import jdk.javadoc.doclet.DocletEnvironment;
-import jdk.javadoc.doclets.StandardDoclet;
+import jdk.javadoc.doclet.StandardDoclet;
 import org.apache.sis.internal.taglet.InlineTaglet;
 
 

Modified: sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Include.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Include.java?rev=1791494&r1=1791493&r2=1791494&view=diff
==============================================================================
--- sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Include.java
[UTF-8] (original)
+++ sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Include.java
[UTF-8] Sat Apr 15 11:31:00 2017
@@ -72,7 +72,7 @@ public final class Include extends Inlin
      * @return a string representation of the given tag.
      */
     @Override
-    public String toString(final DocTree tag) {
+    protected String toString(final DocTree tag) {
         final String reference = text(tag);
         final int sep = reference.indexOf('#');
         if (sep < 0) {

Modified: sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/InlineTaglet.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/InlineTaglet.java?rev=1791494&r1=1791493&r2=1791494&view=diff
==============================================================================
--- sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/InlineTaglet.java
[UTF-8] (original)
+++ sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/InlineTaglet.java
[UTF-8] Sat Apr 15 11:31:00 2017
@@ -21,8 +21,9 @@ import java.util.Set;
 import java.util.EnumSet;
 import java.util.List;
 import javax.tools.Diagnostic;
+import javax.lang.model.element.Element;
 import jdk.javadoc.doclet.Reporter;
-import jdk.javadoc.doclet.taglet.Taglet;
+import jdk.javadoc.doclet.Taglet;
 import com.sun.source.doctree.DocTree;
 import com.sun.source.doctree.TextTree;
 import com.sun.source.doctree.UnknownInlineTagTree;
@@ -91,12 +92,14 @@ public abstract class InlineTaglet imple
 
     /**
      * Given a list of {@code DocTree}s representing this custom tag, returns its string
representation.
+     * This method will be invoked once for each instance of the tag in parsed Javadoc.
      *
-     * @param  tags  the tags to format.
+     * @param  tags     the tags to format.
+     * @param  element  the element to which the enclosing comment belongs.
      * @return a string representation of the given tags.
      */
     @Override
-    public final String toString(final List<? extends DocTree> tags) {
+    public final String toString(final List<? extends DocTree> tags, final Element
element) {
         final StringBuilder buffer = new StringBuilder(64);
         for (final DocTree tag : tags) {
             buffer.append(toString(tag));
@@ -105,6 +108,15 @@ public abstract class InlineTaglet imple
     }
 
     /**
+     * Given a single {@code DocTree}s representing this custom tag, returns its string representation.
+     * This method will be invoked once for each instance of the tag in parsed Javadoc.
+     *
+     * @param  tag  the tag to format.
+     * @return a string representation of the given tag.
+     */
+    protected abstract String toString(DocTree tag);
+
+    /**
      * Prints a warning message.
      */
     static void printWarning(final DocTree tag, final String message) {

Modified: sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Module.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Module.java?rev=1791494&r1=1791493&r2=1791494&view=diff
==============================================================================
--- sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Module.java
[UTF-8] (original)
+++ sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Module.java
[UTF-8] Sat Apr 15 11:31:00 2017
@@ -20,9 +20,9 @@ import java.io.File;
 import java.util.List;
 import java.util.Set;
 import java.util.EnumSet;
-import java.util.Collections;
-import jdk.javadoc.doclet.taglet.Taglet;
+import jdk.javadoc.doclet.Taglet;
 import com.sun.source.doctree.DocTree;
+import javax.lang.model.element.Element;
 
 
 /**
@@ -78,25 +78,14 @@ public final class Module implements Tag
     }
 
     /**
-     * Given the <code>DocTree</code> representation of this custom tag, return
its string representation.
-     * The default implementation invokes the list variant of this method.
-     *
-     * @param  tag  the tag to format.
-     * @return a string representation of the given tag.
-     */
-    @Override
-    public String toString(final DocTree tag) {
-        return toString(Collections.singletonList(tag));
-    }
-
-    /**
      * Given a list of {@code DocTree}s representing this custom tag, returns its string
representation.
      *
-     * @param  tags  the tags to format.
+     * @param  tags     the tags to format.
+     * @param  element  the element to which the enclosing comment belongs.
      * @return a string representation of the given tags.
      */
     @Override
-    public String toString(final List<? extends DocTree> tags) {
+    public String toString(final List<? extends DocTree> tags, final Element element)
{
         if (tags == null || tags.isEmpty()) {
             return "";
         }

Modified: sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Preformat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Preformat.java?rev=1791494&r1=1791493&r2=1791494&view=diff
==============================================================================
--- sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Preformat.java
[UTF-8] (original)
+++ sis/branches/JDK9/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Preformat.java
[UTF-8] Sat Apr 15 11:31:00 2017
@@ -80,7 +80,7 @@ public final class Preformat extends Inl
      * @return a string representation of the given tag.
      */
     @Override
-    public String toString(final DocTree tag) {
+    protected String toString(final DocTree tag) {
         String text = text(tag).replace("\r\n", "\n").replace('\r', '\n');
         String format = "<unspecified>";
         /*

Modified: sis/branches/JDK9/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK9/pom.xml?rev=1791494&r1=1791493&r2=1791494&view=diff
==============================================================================
--- sis/branches/JDK9/pom.xml (original)
+++ sis/branches/JDK9/pom.xml Sat Apr 15 11:31:00 2017
@@ -25,7 +25,7 @@
                                http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <prerequisites>
-    <maven>3.2.2</maven>
+    <maven>3.5.0</maven>
   </prerequisites>
 
   <parent>



Mime
View raw message