简体   繁体   English

在Eclipse中将模板添加到扩展点

[英]Adding a template to an extension point in Eclipse

I am a fan of adding extension points to my Eclipse RCP applications, as it makes them very modular. 我喜欢在Eclipse RCP应用程序中添加扩展点,因为它使它们成为非常模块化的。

Now, when you write the extension point schema, it is possible to add the documentation that will be shown in the Extension Point Selection wizard. 现在,当您编写扩展点架构时,可以添加将在“扩展点选择”向导中显示的文档。 This wizard contains also an Available Templates section. 该向导还包含“可用模板”部分。 When a template is selected, some code is generated for you. 选择模板后,将为您生成一些代码。 In this case I would like to use some AbstractClass as my base. 在这种情况下,我想使用一些AbstractClass作为基础。

How do I add a template in this section? 如何在本节中添加模板? I couldn't find this in the schema editor. 我在模式编辑器中找不到。

You can have a look at the org.eclipse.pde.ui.templates extension point. 您可以查看org.eclipse.pde.ui.templates扩展点。

With this you need to have a class that implements ITemplateSection, and associate it whit the extension point you want the template to be in. 有了这个,您需要一个实现ITemplateSection的类,并将其与希望模板包含在其中的扩展点相关联。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Eclipse插件中,markerAnnotationSpecification扩展点在程序上是否等效? - In Eclipse plugins, is there a programmatic equivalence to the markerAnnotationSpecification extension point? Spring机制类似于OSGI / Eclipse扩展点 - Spring mechanism similar to OSGI/ Eclipse extension point Eclipse插件开发:未知的扩展点 - Eclipse plugin development: unknown extension point Eclipse插件扩展点和扩展仅在调试环境中工作 - Eclipse Plugin Extension Point and Extension working in only Debug environment 使用没有任何扩展点的Eclipse插件 - Using Eclipse plugin without any extension-point 用于CompletionProposal的eclipse插件扩展点已插入/已使用 - eclipse plug-in extension point for CompletionProposal inserted/used Eclipse RCP-实现扩展点。 在哪里评估? - Eclipse RCP - implementing extension point. Where to evaluate? Eclipse 插件开发:扩展点 org.eclipse.ui.bindings 上的上下文菜单不包含 New -> Key - Eclipse Plugin Development: Context menu on extension point org.eclipse.ui.bindings does not contain New -> Key Eclipse Java Template添加扩展或抛出类名 - Eclipse Java Template adding extends or throws to class name 找不到org.eclipse.wst.server.core.serverTypes扩展点的架构 - No schema found for the org.eclipse.wst.server.core.serverTypes extension point
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM