问题描述
我正在使用textmate进行所有开发工作多年的Eclipse蚀刻。我在eclipse中遇到什么,我找不到任何解决方案是某种通用模板:
I'm currently evaluating eclipse after using textmate for all my development for many years. what i miss in eclipse and what I can't find any solution for are some kind of generic templates:
我正在使用PDT进行JavaScript和PHP开发,它支持代码模板。然而,在我的项目中,我也在编写大量的shell脚本,yml配置文件,xml文件,gnu make脚本等。我正在使用通用语法(类似于robodoc)为所有这些脚本编写源文档,并且可以节省很多时间,当您可以使用模板插入文档块时。然而,除了PDT之外,并不是所有的编辑器插件都支持模板。
I'm using PDT for my JavaScript and PHP development, and it supports code-templates. however , in my projects I'm writing large amounts of shell-scripts, yml-configuration-files, xml-files, gnu make scripts, etc., too. I'm writing source-documentation for all these scripts using a generic syntax (similar to robodoc) and you can save much time, when you can insert the doc-blocks using templates. however, besides PDT not all of the editor-plugins support templates.
是否有一些通用的方法在eclipse中存储代码片段/模板,这将在所有编辑器-plugins?我认为应该可以实现这种使用eclipse的猴子 - 但是,似乎猴子的发展似乎已经停止了?
Is there some generic way of storing code-snippets/templates in eclipse, which will work across all editor-plugins? I think it should be possible to implement such using eclipse monkey -- however, it seems development of monkey was stopped?
我使用的是Eclipse 3.4.0。 p>
I'm using Eclipse 3.4.0.
推荐答案
如果您安装了Web工具(WTP)插件,您应该有一个Snippets视图,它是一个编辑器独立的地方,用于收集可重用的代码片段您可以创建并放置您的片段,并使用抽屉分隔。双击或拖动代码段将会将其插入活动编辑器。
If you have the web tools (WTP) plugins installed you should have a Snippets view which is an editor-independent place for collecting reusable code snippets. You can create and place your snippets in there and can separate them using 'drawers'. Double clicking or dragging a snippet item will insert it in the active editor.
网页工具用户指南。
这篇关于eclipse中的通用代码片段/模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!