在javadocs中包含图像 [英] Including images in javadocs

查看:77
本文介绍了在javadocs中包含图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了大量可视化的示例测试用例。有没有方便的方法将它们包含在我的Java源代码中并将它们链接到Javadocs中,所以我的IDE可以在编码时自动显示它们(通过在我的IDE中调用javadoc渲染器功能?)

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 show them while coding (by invoking a javadoc renderer feature in my IDE?)

我尝试将图像放在Java源代码旁边并使用< img> ,但它没有(我使用了png)。

I tried putting an image next to the Java source and using <img>, but it's not taking (I used a png).

(注意 - 在这种情况下,它在我的测试源中)

(note - it's in my test sources in this case)

推荐答案

正如你所做的那样没有显示任何消息来源,我只能做一个玻璃球猜测...

As you didn't show any sources, I can only do a glass-ball guess ...

对于任何文档需要的文件,应该将它们放在一个子目录中命名 doc-files 您的包目录。然后,这些将由Javadoc简单地复制到输出目录。然后在< img> 元素中使用相对路径。

For any files which are needed for documentation purposes, one should put them in a subdirectory named doc-files of your package directories. These will then be simply copied by Javadoc to the output directory. Then use a relative path in the <img> element.

我不确定您的IDE是否为Javadoc渲染器也会这样做,但值得一试。

I'm not sure if your IDE's Javadoc renderer will do the same, but it is worth a try.

这篇关于在javadocs中包含图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆