在 Eclipse 中插入/更改文件头?
我在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有一个插件可能可以满足您的需求。我建议您查看 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