external snippets

Anna Kozlova anna.kozlova at jetbrains.com
Wed Feb 23 12:03:29 UTC 2022


Hi folks,

I try to support external snippets in IntelliJ. As far as I understand this
part of JEP 413

The location of the external code can be specified either by class name,
using the class attribute, or by a short relative file path, using the file
attribute. In either case the file can be placed in a package hierarchy
rooted in a snippet-files subdirectory of the directory containing the
source code with the {@snippet ...} tag.


I should be able to put snippet files somewhere near my code and the
javadoc tool would find them. Unfortunately, I failed to generate javadoc
unless I specify explicitly `--snippet-path`.

I tried e.g. the following structure

└── src
    └── main
        ├── java
        │   └── p
        │       └── Main.java
        └── snippet-files
            ├── p
            │   └── Snippet.java

Is this structure correct? Or should this `snippet-files` directory be
explicitly added as `--snippet-path ` by the IDE/build tool and I just
misread the JEP?

Thank you,
Anna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/javadoc-dev/attachments/20220223/c9bb0498/attachment.htm>


More information about the javadoc-dev mailing list