Including images in javadocs

后端 未结 7 1955
北海茫月
北海茫月 2020-12-14 16:26

I work with a lot of sample test cases that are visual. Is there any convenient way to include them in my Java source and link them in Javadocs, so my IDE can automatically

7条回答
  •  星月不相逢
    2020-12-14 16:56

    With Eclipse Luna the following works for me.

    • com
      • company
        • somepackage
          • doc-files
            • image.png
          • Test.java

    Now in Test.java's javadoc:

    /**
     * 
     */
    

    And Eclipse shows the image both in popup help, when you hover the mouse, and in the Javadoc View.

    You can even add style="width: 100%;" to the img tag, so the image adjusts to the view/popup size.

提交回复
热议问题