为什么 Eclipse RCP 会显示包含某些源文件的警告消息?

发布于 2024-12-21 02:58:26 字数 548 浏览 0 评论 0原文

Eclipse bug 286808 添加了包含某些文件的警告消息(例如 插件的 src.includes 中的 .classpath.projectplugin.xml)。

这些文件对于源版本似乎非常重要,假设您希望接收该版本的人不仅能够针对您的插件进行编码,而且还可能对其进行更改。 (我想您可以纯粹进行源代码发布,以便人们可以对其进行调试,但是为什么您会通过删除这些对开发很重要的文件来阻止对插件的修改?)

我很难理解为什么要进行此更改。有谁能给出一个合理的解释吗?

编辑:警告消息示例:“'plugin.xml'不应添加到 src.includes 列表,因为源构建中不需要它”

编辑 2: 作为从答案可以看出,我想我问错了问题。应该是:RCP 插件“Source Build”的预期目的是什么......

Eclipse bug 286808 adds warning messages for including certain files (like .classpath, .project, plugin.xml) in the src.includes for a plugin.

Those files seem pretty important for a source release, assuming that you want someone who receives the release to be able to not only code against your plugin but potentially change it. (I guess you could do a source release purely so people can debug against it, but then why would you discourage modification of the plugin by removing these files that are important for development?)

I'm struggling to understand why this change was made. Can anyone provide a reasonable explanation for it?

Edit: Example of the warning message: "'plugin.xml' should not be added to src.includes list as it is not required in source build"

Edit 2: As can be seen from the answers, I think I asked the wrong question. Should have been: what is the intended purpose of an RCP plugin "Source Build"...

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

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

发布评论

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

评论(2

流年已逝 2024-12-28 02:58:26

据我了解,您不应该修改源插件。它们为二进制对应物提供了附带插件,以提供源代码(用于调试,并且通常使针对这些插件的开发变得更容易),并且更重要的是提供 Javadoc。

如果您希望其他人能够修改您的插件,您应该只提供您的压缩项目目录。

一般来说,Jar 文件 - 对我来说 - 是具有特定版本的库,您应该按原样使用。可能有一些罕见的原因导致您可能必须为了自己的目的而修改别人的库,但这不应该成为常态。

From my understanding you're not supposed to modify source plug-ins. They are accompanying plug-ins for their binary counterparts to provide the source code (for debugging and generally to make development against these plug-ins easier) and - more importantly - to provide the Javadoc.

If you want others to be able to modify your plug-in you should just offer your zipped project directory.

Jar files in general - to me - are libraries with specific versions that you should take as is. There may be rare reasons why you might have to modify someone else's library for your own purposes but that shouldn't be the norm.

避讳 2024-12-28 02:58:26

答案是不需要包含它们:

  1. plugin.xml:已经集成在二进制构建中。

  2. .classpath
    所有类路径首选项都可以(更好:必须)从 MANIFEST.MF 中读取。 (在运行时您也没有任何 .classpath 文件)

  3. .project
    始终相同(PDE + Java Nature/Builder)

The answer is that there is no need to include them:

  1. plugin.xml: Already integrated in the binary-build.

  2. .classpath:
    All classpath preferences can (better: must) be read from the MANIFEST.MF. (at runtime you also don't have any .classpath file)

  3. .project:
    is always the same (PDE + Java Nature/Builder)

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