在 Eclipse 中插入/更改文件头?

发布于 2024-09-14 15:34:48 字数 121 浏览 0 评论 0原文

我在 Eclipse 中使用源代码的某个文件头(在“代码样式”中定义),现在我更改了它。

有没有一种方法可以将现有文件的标头更改为新的标头,或者更简单且可能的方法是将文件标头插入现有文件?

谢谢。

I was using a certain file header for source code in Eclipse (defined in "Code Style") and now I changed it.

Is there a way to either change an existing file's header to the new one, or more simply and likely, just insert a file header to an existing file?

Thanks.

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

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

发布评论

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

评论(1

淡看悲欢离合 2024-09-21 15:34:48

有一个插件可能可以满足您的需求。我建议您查看 Eclipse Releng 工具,可从此更新站点获取:

The Eclipse Project Updates - http://download.eclipse.org/eclipse/updates/3.6

其中一个工具是修复版权工具。使用此工具,您可以选择一个项目,提供一个模板(包括作者和修订年份等变量)。我认为甚至有一种方法可以让它连接到 CVS 并自动更新模板中最后修改的标记。

许多 Eclipse 项目都使用该插件来保持其标头最新。

该插件本身没有很好的文档记录,但它并不难使用。这里有一些信息:

http://wiki。 eclipse.org/index.php/Platform-releng-faq#How_do_I_use_the_releng_plugin.3F

There is a plugin that probably does what you want. I'd recommend checking out the Eclipse Releng tools, available from this update site:

The Eclipse Project Updates - http://download.eclipse.org/eclipse/updates/3.6

One of the tools is the Fix Copyright tool. Using this tool, you can select a project, provide a template (that includes variables such as author, and year of revision, etc). I think there is even a way to have it connect to CVS and automatically update last modified stamps in the template.

This plugin is what many of the Eclipse projects use to keep their headers up to date.

The plugin itself is not documented too well, but it is not hard to use. There is a bit of information here:

http://wiki.eclipse.org/index.php/Platform-releng-faq#How_do_I_use_the_releng_plugin.3F

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