From nlisker at gmail.com Wed Jul 17 01:21:52 2019 From: nlisker at gmail.com (Nir Lisker) Date: Wed, 17 Jul 2019 04:21:52 +0300 Subject: Changing the font in the generated JavaDocs Message-ID: Hi, I noticed that the font of the JDK docs is different than the ones we get at OpenJFX. Compare https://docs.oracle.com/en/java/javase/12/docs/api/index.html with https://openjfx.io/javadoc/12/. I did not find a way to change the font except for messing with the generated stylesheet (and there are a lot of definitions there). Is there some flag I need to specify, or should I take the stylesheet file from OpenJDK somewhere and replace ours? How do does OpenJDK generate its docs? Thanks, Nir -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.gibbons at oracle.com Thu Jul 18 21:45:55 2019 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Thu, 18 Jul 2019 14:45:55 -0700 Subject: RFR: JDK-8222791 Order of evaluation of -link params in Javadoc tool reversed -> regression with split packages Message-ID: <244d9397-92c0-720f-3127-e6a2784006c2@oracle.com> Please review a simple fix and a corresponding test for a regression in the way that a series of -link or -linkoffline? options are processed. When a package appears in multiple APIs, either as different versions, or for a split package, the behavior changed from "first one wins" to "last one wins". The problem and basic solution are given by Uwe in the JBS issue. Thanks, Uwe. The fix here is as outlined in the JBS issue (replace "put" by "putIfAbsent"), together with some localized cosmetic changes. The test creates a couple of libraries and places them in different order on the javadoc command line and verifies that "first one wins". The libraries are created in two variants, using "package-list" and "element-list". As with any good regression test, the test fails on an unmodified JDK. -- Jon JBS: https://bugs.openjdk.java.net/browse/JDK-8222791 Webrev: http://cr.openjdk.java.net/~jjg/8222791/webrev.00/ From jonathan.gibbons at oracle.com Fri Jul 19 14:37:37 2019 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Fri, 19 Jul 2019 07:37:37 -0700 Subject: Changing the font in the generated JavaDocs In-Reply-To: References: Message-ID: <17512483-f562-b908-0900-ee422789a30f@oracle.com> Nir, The only way to change the font is through the stylesheet(s). If you don't want to edit the default stylesheet, you can specify additional stylesheets to be used on the command line. You can also replace the default stylesheet from the command line. Look for the --main-stylesheet and --add-stylesheet options. $ /opt/jdk/11/bin/javadoc --help | grep style ??? --add-stylesheet ????????????????? Additional stylesheet file for the generated documentation ??? --main-stylesheet , -stylesheetfile ????????????????? File to change style of the generated documentation I'm not sure how detailed an answer you want with respect to OpenJDK-generated docs, but the high level answer is that it all happens in make/Docs.gmk. The default stylesheet is in the source for the jdk.javadoc module: src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css Here are the various lines related to the font-family: ??? font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; ??? font-family:'DejaVu Sans Mono', monospace; ??? font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; ??? font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; It's a minor code-style bug-ette that the first line has different whitespace. There should really only be 3 lines in that list, for serif, sans serif and monospace fonts. -- Jon On 7/16/19 6:21 PM, Nir Lisker wrote: > Hi, > > I noticed that the font of the JDK docs is different than the ones we > get at OpenJFX. Compare > https://docs.oracle.com/en/java/javase/12/docs/api/index.html with > https://openjfx.io/javadoc/12/. > > I did not find a way to change the font except for messing with the > generated stylesheet (and there are a lot of definitions there). Is > there some flag I need to specify, or should I take the stylesheet > file from OpenJDK somewhere and replace ours? How do does OpenJDK > generate its docs? > > Thanks, > Nir From hannes.wallnoefer at oracle.com Fri Jul 19 16:30:50 2019 From: hannes.wallnoefer at oracle.com (=?utf-8?Q?Hannes_Walln=C3=B6fer?=) Date: Fri, 19 Jul 2019 18:30:50 +0200 Subject: RFR: JDK-8222791 Order of evaluation of -link params in Javadoc tool reversed -> regression with split packages In-Reply-To: <244d9397-92c0-720f-3127-e6a2784006c2@oracle.com> References: <244d9397-92c0-720f-3127-e6a2784006c2@oracle.com> Message-ID: <6E02CC65-AD37-4966-8737-5EE65B71E859@oracle.com> Hi Jon, Looks good! Hannes > Am 18.07.2019 um 23:45 schrieb Jonathan Gibbons : > > Please review a simple fix and a corresponding test for a regression in the > way that a series of -link or -linkoffline options are processed. When > a package appears in multiple APIs, either as different versions, or for a split > package, the behavior changed from "first one wins" to "last one wins". > > The problem and basic solution are given by Uwe in the JBS issue. Thanks, Uwe. > > The fix here is as outlined in the JBS issue (replace "put" by "putIfAbsent"), > together with some localized cosmetic changes. > > The test creates a couple of libraries and places them in different order > on the javadoc command line and verifies that "first one wins". The libraries > are created in two variants, using "package-list" and "element-list". > > As with any good regression test, the test fails on an unmodified JDK. > > -- Jon > > JBS: https://bugs.openjdk.java.net/browse/JDK-8222791 > Webrev: http://cr.openjdk.java.net/~jjg/8222791/webrev.00/ > > From nlisker at gmail.com Sat Jul 20 20:37:18 2019 From: nlisker at gmail.com (Nir Lisker) Date: Sat, 20 Jul 2019 23:37:18 +0300 Subject: Changing the font in the generated JavaDocs In-Reply-To: <17512483-f562-b908-0900-ee422789a30f@oracle.com> References: <17512483-f562-b908-0900-ee422789a30f@oracle.com> Message-ID: Hi Jon, Thanks for the answer. Iv'e narrowed down the issue to the DejaVu font not being loaded, so it falls back to Georgia. Inside the 'resources' directory where the docs are generated there should be a 'fonts' directory with a 'dejavu.css' file. This exists in OpenJDK, but not in OpenJFX. I tried to manually take that stylesheet and put it there, but then the webpage generates errors about not finding the fonts: Failed to load resource: net::ERR_FILE_NOT_FOUND DejaVuSans-webfont.woff:1 Failed to load resource: net::ERR_FILE_NOT_FOUND DejaVuSans-Bold-webfont.woff:1 etc. Maybe the task for generating the docs in OpenJFX, 'gradle javadoc', is missing some resources. I filed https://bugs.openjdk.java.net/browse/JDK-8227767. Is this something you can help with? - Nir On Fri, Jul 19, 2019 at 5:37 PM Jonathan Gibbons < jonathan.gibbons at oracle.com> wrote: > Nir, > > The only way to change the font is through the stylesheet(s). > > If you don't want to edit the default stylesheet, you can specify > additional stylesheets to be used on the command line. You can also > replace the default stylesheet from the command line. Look for the > --main-stylesheet and --add-stylesheet options. > > $ /opt/jdk/11/bin/javadoc --help | grep style > --add-stylesheet > Additional stylesheet file for the generated > documentation > --main-stylesheet , -stylesheetfile > File to change style of the generated documentation > > I'm not sure how detailed an answer you want with respect to > OpenJDK-generated docs, but the high level answer is that it all happens > in make/Docs.gmk. > > The default stylesheet is in the source for the jdk.javadoc module: > > src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css > > Here are the various lines related to the font-family: > > font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; > font-family:'DejaVu Sans Mono', monospace; > font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; > font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; > > It's a minor code-style bug-ette that the first line has different > whitespace. There should really only be 3 lines in that list, for serif, > sans serif and monospace fonts. > > -- Jon > > > On 7/16/19 6:21 PM, Nir Lisker wrote: > > Hi, > > > > I noticed that the font of the JDK docs is different than the ones we > > get at OpenJFX. Compare > > https://docs.oracle.com/en/java/javase/12/docs/api/index.html with > > https://openjfx.io/javadoc/12/. > > > > I did not find a way to change the font except for messing with the > > generated stylesheet (and there are a lot of definitions there). Is > > there some flag I need to specify, or should I take the stylesheet > > file from OpenJDK somewhere and replace ours? How do does OpenJDK > > generate its docs? > > > > Thanks, > > Nir > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.gibbons at oracle.com Sun Jul 21 14:54:05 2019 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Sun, 21 Jul 2019 07:54:05 -0700 Subject: Changing the font in the generated JavaDocs In-Reply-To: References: <17512483-f562-b908-0900-ee422789a30f@oracle.com> Message-ID: <8b5de9b9-09d8-33ad-ea51-64aff6e2f811@oracle.com> Nir, By default, javadoc references the DejaVu fonts, which are available by defaut on various OSes.? Oracle JDK includes a copy of the fonts in the documentation that it generates and publishes. For more information on DejaVu fonts, see references on the web, such as the wikipedia page: https://en.wikipedia.org/wiki/DejaVu_fonts, which also includes a pointer to a Github project. -- Jon On 7/20/19 1:37 PM, Nir Lisker wrote: > Hi Jon, > > Thanks for the answer. Iv'e narrowed down the issue to the DejaVu font > not being loaded, so it falls back to Georgia. Inside the 'resources' > directory where the docs are generated there should be a 'fonts' > directory with a 'dejavu.css' file. This exists in OpenJDK, but not in > OpenJFX. I tried to manually take that stylesheet and put it there, > but then the webpage generates errors about not finding the fonts: > > Failed to load resource: net::ERR_FILE_NOT_FOUND > ??DejaVuSans-webfont.woff:1 > Failed to load resource: net::ERR_FILE_NOT_FOUND > DejaVuSans-Bold-webfont.woff:1 > etc. > > Maybe the task for generating the docs in OpenJFX, 'gradle javadoc', > is missing some resources. > > I filed https://bugs.openjdk.java.net/browse/JDK-8227767. Is this > something you can help with? > > - Nir > > On Fri, Jul 19, 2019 at 5:37 PM Jonathan Gibbons > > wrote: > > Nir, > > The only way to change the font is through the stylesheet(s). > > If you don't want to edit the default stylesheet, you can specify > additional stylesheets to be used on the command line. You can also > replace the default stylesheet from the command line. Look for the > --main-stylesheet and --add-stylesheet options. > > $ /opt/jdk/11/bin/javadoc --help | grep style > ???? --add-stylesheet > ?????????????????? Additional stylesheet file for the generated > documentation > ???? --main-stylesheet , -stylesheetfile > ?????????????????? File to change style of the generated documentation > > I'm not sure how detailed an answer you want with respect to > OpenJDK-generated docs, but the high level answer is that it all > happens > in make/Docs.gmk. > > The default stylesheet is in the source for the jdk.javadoc module: > src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css > > Here are the various lines related to the font-family: > > ???? font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; > ???? font-family:'DejaVu Sans Mono', monospace; > ???? font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; > ???? font-family:'DejaVu Serif', Georgia, "Times New Roman", > Times, serif; > > It's a minor code-style bug-ette that the first line has different > whitespace. There should really only be 3 lines in that list, for > serif, > sans serif and monospace fonts. > > -- Jon > > > On 7/16/19 6:21 PM, Nir Lisker wrote: > > Hi, > > > > I noticed that the font of the JDK docs is different than the > ones we > > get at OpenJFX. Compare > > https://docs.oracle.com/en/java/javase/12/docs/api/index.html with > > https://openjfx.io/javadoc/12/. > > > > I did not find a way to change the font except for messing with the > > generated stylesheet (and there are a lot of definitions there). Is > > there some flag I need to specify, or should I take the stylesheet > > file from OpenJDK somewhere and replace ours? How do does OpenJDK > > generate its docs? > > > > Thanks, > > Nir > -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.scholte at sourcegrounds.nl Tue Jul 23 19:39:48 2019 From: robert.scholte at sourcegrounds.nl (Robert Scholte) Date: Tue, 23 Jul 2019 21:39:48 +0200 Subject: --add-modules ALL-MODULE-PATH not supported by javadoc tool since Java 13? Message-ID: Recently we've started adding Java 13 to our matrix of Java versions when testing plugins. It seems like something has changed, because a set of integration tests fails with the following message: Exit code: 1 - error: --add-modules ALL-MODULE-PATH can only be used when compiling the unnamed module The set belongs to MJAVADOC-568[1], which handles artifacts that get a name via the Manifest attribute Automatic-Module-Name. When creating JavaDoc for such code, using the '--add-modules ALL-MODULE-PATH' was the way to get the correct JavaDoc. This used to work up to Java 12. My question: is this an intended change and what's the reasoning behind it? And of course in the end: what's the preferred solution? For the integration tests you can have a look at github[3], I can provide the results of the ITs when required. thanks, Robert [1] https://issues.apache.org/jira/browse/MJAVADOC-568 [2] https://github.com/apache/maven-javadoc-plugin/blob/maven-javadoc-plugin-3.1.1/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java#L5085-L5090 [3] https://github.com/apache/maven-javadoc-plugin/tree/maven-javadoc-plugin-3.1.1/src/it/projects From jonathan.gibbons at oracle.com Tue Jul 23 19:55:41 2019 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Tue, 23 Jul 2019 12:55:41 -0700 Subject: --add-modules ALL-MODULE-PATH not supported by javadoc tool since Java 13? In-Reply-To: References: Message-ID: <2c5e77e2-0b1a-b4cd-c0dd-1af1f16409ae@oracle.com> Robert, This is supposed to be allowed. See CSR:??? JDK-8222396: Allow "--add-modules ALL-MODULE-PATH" when compiling in the context of an automatic module https://bugs.openjdk.java.net/browse/JDK-8222396 This was fixed in https://bugs.openjdk.java.net/browse/JDK-8220702 and should be in JDK 13, build11 onwards. From the JDK 13 source code for javac, the error message in the resource file is: compiler.err.addmods.all.module.path.invalid=\ ??? --add-modules ALL-MODULE-PATH can only be used when compiling the unnamed module or \ ??? when compiling in the context of an automatic module So, I'm wondering if you are using a recent build of JDK 13? -- Jon On 07/23/2019 12:39 PM, Robert Scholte wrote: > Recently we've started adding Java 13 to our matrix of Java versions > when testing plugins. > It seems like something has changed, because a set of integration > tests fails with the following message: > > Exit code: 1 - error: --add-modules ALL-MODULE-PATH can only be used > when compiling the unnamed module > > The set belongs to MJAVADOC-568[1], which handles artifacts that get a > name via the Manifest attribute Automatic-Module-Name. > When creating JavaDoc for such code, using the '--add-modules > ALL-MODULE-PATH' was the way to get the correct JavaDoc. This used to > work up to Java 12. > > My question: is this an intended change and what's the reasoning > behind it? > And of course in the end: what's the preferred solution? > > For the integration tests you can have a look at github[3], I can > provide the results of the ITs when required. > > thanks, > Robert > > [1] https://issues.apache.org/jira/browse/MJAVADOC-568 > [2] > https://github.com/apache/maven-javadoc-plugin/blob/maven-javadoc-plugin-3.1.1/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java#L5085-L5090 > [3] > https://github.com/apache/maven-javadoc-plugin/tree/maven-javadoc-plugin-3.1.1/src/it/projects From hannes.wallnoefer at oracle.com Thu Jul 25 17:07:57 2019 From: hannes.wallnoefer at oracle.com (=?utf-8?Q?Hannes_Walln=C3=B6fer?=) Date: Thu, 25 Jul 2019 19:07:57 +0200 Subject: RFR: 8228393: Add an indicator for external links in javadoc Message-ID: Please review: JBS: https://bugs.openjdk.java.net/browse/JDK-8228393 Webrev: http://cr.openjdk.java.net/~hannesw/8228393/webrev.00/ The external-link.svg is just added just for future editing as the CSS-inlined bits can?t be easily modified. This is the smaller superscript version as shown in these examples: http://cr.openjdk.java.net/~hannesw/8228393/demo/v3/IDN.html http://cr.openjdk.java.net/~hannesw/8228393/demo/v3/SignatureMethod.html http://cr.openjdk.java.net/~hannesw/8228393/demo/v3/package-use.html Thanks, Hannes From jonathan.gibbons at oracle.com Mon Jul 29 16:01:58 2019 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Mon, 29 Jul 2019 09:01:58 -0700 Subject: RFR: 8228393: Add an indicator for external links in javadoc In-Reply-To: References: Message-ID: <6f375f56-55d9-0160-d0bc-8b019b631c7e@oracle.com> The XML for the SVG looks questionable since you have both a self-closing opening tag `` and a separate closing tag `` Is it possible to wrap the lines? -- Jon On 7/25/19 10:07 AM, Hannes Walln?fer wrote: > Please review: > > JBS: https://bugs.openjdk.java.net/browse/JDK-8228393 > Webrev: http://cr.openjdk.java.net/~hannesw/8228393/webrev.00/ > > The external-link.svg is just added just for future editing as the CSS-inlined bits can?t be easily modified. > > This is the smaller superscript version as shown in these examples: > > http://cr.openjdk.java.net/~hannesw/8228393/demo/v3/IDN.html > http://cr.openjdk.java.net/~hannesw/8228393/demo/v3/SignatureMethod.html > http://cr.openjdk.java.net/~hannesw/8228393/demo/v3/package-use.html > > Thanks, > Hannes From hannes.wallnoefer at oracle.com Tue Jul 30 10:50:53 2019 From: hannes.wallnoefer at oracle.com (=?utf-8?Q?Hannes_Walln=C3=B6fer?=) Date: Tue, 30 Jul 2019 12:50:53 +0200 Subject: RFR: 8228393: Add an indicator for external links in javadoc In-Reply-To: <6f375f56-55d9-0160-d0bc-8b019b631c7e@oracle.com> References: <6f375f56-55d9-0160-d0bc-8b019b631c7e@oracle.com> Message-ID: <03DD6907-2554-4BEE-899A-FC660C9642FC@oracle.com> The XML structure is actually ok as the empty element is a element inside the outer ... element. But that was indeed hard to read due to the very long line. I uploaded a new webrev with wrapped lines: http://cr.openjdk.java.net/~hannesw/8228393/webrev.01/ Hannes > Am 29.07.2019 um 18:01 schrieb Jonathan Gibbons : > > The XML for the SVG looks questionable since you have both a self-closing opening tag `` and a separate closing tag `` > > Is it possible to wrap the lines? > > -- Jon > > On 7/25/19 10:07 AM, Hannes Walln?fer wrote: >> Please review: >> >> JBS: https://bugs.openjdk.java.net/browse/JDK-8228393 >> Webrev: http://cr.openjdk.java.net/~hannesw/8228393/webrev.00/ >> >> The external-link.svg is just added just for future editing as the CSS-inlined bits can?t be easily modified. >> >> This is the smaller superscript version as shown in these examples: >> >> http://cr.openjdk.java.net/~hannesw/8228393/demo/v3/IDN.html >> http://cr.openjdk.java.net/~hannesw/8228393/demo/v3/SignatureMethod.html >> http://cr.openjdk.java.net/~hannesw/8228393/demo/v3/package-use.html >> >> Thanks, >> Hannes From jonathan.gibbons at oracle.com Tue Jul 30 14:53:12 2019 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Tue, 30 Jul 2019 07:53:12 -0700 Subject: RFR: 8228393: Add an indicator for external links in javadoc In-Reply-To: <03DD6907-2554-4BEE-899A-FC660C9642FC@oracle.com> References: <6f375f56-55d9-0160-d0bc-8b019b631c7e@oracle.com> <03DD6907-2554-4BEE-899A-FC660C9642FC@oracle.com> Message-ID: <856a4f79-d96a-140e-d782-eb0103cad3d0@oracle.com> Thanks for the clarification and the wrapped lines. Looks good to me. -- Jon On 7/30/19 3:50 AM, Hannes Walln?fer wrote: > The XML structure is actually ok as the empty element is a element inside the outer ... element. > > But that was indeed hard to read due to the very long line. I uploaded a new webrev with wrapped lines: > > http://cr.openjdk.java.net/~hannesw/8228393/webrev.01/ > > Hannes > > > >> Am 29.07.2019 um 18:01 schrieb Jonathan Gibbons : >> >> The XML for the SVG looks questionable since you have both a self-closing opening tag `` and a separate closing tag `` >> >> Is it possible to wrap the lines? >> >> -- Jon >> >> On 7/25/19 10:07 AM, Hannes Walln?fer wrote: >>> Please review: >>> >>> JBS: https://bugs.openjdk.java.net/browse/JDK-8228393 >>> Webrev: http://cr.openjdk.java.net/~hannesw/8228393/webrev.00/ >>> >>> The external-link.svg is just added just for future editing as the CSS-inlined bits can?t be easily modified. >>> >>> This is the smaller superscript version as shown in these examples: >>> >>> http://cr.openjdk.java.net/~hannesw/8228393/demo/v3/IDN.html >>> http://cr.openjdk.java.net/~hannesw/8228393/demo/v3/SignatureMethod.html >>> http://cr.openjdk.java.net/~hannesw/8228393/demo/v3/package-use.html >>> >>> Thanks, >>> Hannes