如何使javadoc.jar优先于sources.jar中的javadoc?

发布于 2024-12-29 00:54:00 字数 457 浏览 4 评论 0原文

我将有限的原始源代码选择覆盖到源 jar 中的反编译代码上。

这很棒,因为它使我能够在调试时轻松深入了解代码,但是它似乎有一个副作用,即禁用关联 javadoc.jar 中的 javadoc 在 Eclipse 中工作,尽管我有一个单独的 javadoc.jar 文件,其中包含javadoc在里面。

我假设发生这种情况是因为 eclipse 正在查找“源代码”并假设所有 javadoc 都在源代码中,因此无需检查 javadoc.jar 文件。

我希望能够告诉 Eclipse(最好使用 maven)不要使用 javadoc 的sources.jar,而只使用 javadoc.jar。我仍然想使用sources.jar作为源代码。

我假设 eclipse 更喜欢从源显示 javadoc,并且可能是错误的,所以如果是这种情况请纠正我。

另外,我可能只是以错误的方式做了一些简单的事情,所以如果是这种情况,请告诉我。

I have a limited selection of original source code overlayed onto decompiled code in a sources jar.

This is great as it gives me easy ability to drill down into the code when debugging however it seems to have a side effect of disabling the javadoc from the associated javadoc.jar from working in eclipse despite me having a separate javadoc.jar file with the javadoc in it.

I assume this happening because eclipse is finding the 'source code' and assumes that all the javadoc is in the source and therefore there is no need to check the javadoc.jar file.

I'd like to be able to tell eclipse (preferably using maven) to not use the sources.jar for javadoc and only use the javadoc.jar. I would still like to use the sources.jar for source code.

I have assumed that eclipse is preferring to display javadoc from sources and may be wrong so please correct me if that is the case.

Also, I may just be doing something simple the wrong way so please let me know if that is the case.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

冷…雨湿花 2025-01-05 00:54:00

我正在寻找同样的东西。我有一些用 jad 创建的源 jar(并且由于它们是反编译的,因此其中没有 JavaDoc)并作为源附件附加​​。我还附上了 JavaDoc。看来这是 Eclipse 的限制。它将从源中抓取 JavaDoc 并显示它(即使它是空的),而不是查看 JavaDoc。我希望它会注意到源中缺少 JavaDoc,并尝试改用 JavaDoc 位置。如果我找不到解决方案,我将在 Eclipse 站点上发布问题和/或功能请求。

一种解决方法可能是将检查源代码和 javadoc 的能力集成到 java 反编译器(如 jad)中,并将 javadoc 放回到源代码中。然后它也会有可用方法的参数名称,这样它就可以把它们放回去。很多人都建议这样做,但我找不到任何人这样做过。

有几点需要注意。首先,jad已经很久没有维护了。 JD-Core/JD-Eclips 网站已消失。而且我还没有找到比jad更好的Java反编译器。所有伟大的 Java 反编译大师和解决方案都怎么了?其次,“调试对齐”功能可能会很棘手,以确保 JavaDoc 注释不会占用比可用空间更多的空间。

I am hunting for the same thing. I have some source jars I created with jad (and since they are decompiled, they have no JavaDoc in them) and attached as source attachments. I also have the JavaDoc attached. It seems like it is a limitation of Eclipse. It will scrape the JavaDoc from the sources and display it (even if its empty) rather than looking to the JavaDoc. I wish it would notice that the JavaDoc was missing from the source and try the JavaDoc location instead. If I don't find a solution, I'm going to post the question and/or feature request over at the Eclipse site.

One workaround might be to integrate into the java decompiler (like jad) the ability to examine both the source an the javadoc, and put the javadoc back into the source. It would also then have parameter names for methods available too so it could put those back in. Lots of people have suggested this, but I cannot find anyone who has done it.

A couple of caveats. First, jad hasn't been maintained in a long time. The JD-Core/JD-Eclips website has vanished. And I have not found a better Java decompiler than jad. What happened to all the great Java decompiling gurus and solutions? Second, it might be tricky with the "align for debugging" feature to make sure the JavaDoc comments don't take up more room than is available.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文