[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-dev] Contributing my own templates to
|
Hello folks,
I am trying the re-written code templates in CDT 3.0 (weekly build from
April 25 - org.eclipse.cdt.sdk-3.0.0-I200504251446-win32.x86.zip,
eclipse is eclipse-SDK-3.1M6-win32.zip).
I would like to contribute some of my own templates to the
org.eclipse.cdt.ui.text.templates.c context type id. From the
documentation I found I thought this would be as simple as
- Adding an extension to the point org.eclipse.ui.editors.templates to
my plugin.xml.
- Adding a template definition to this extension which references
org.eclipse.cdt.ui.text.templates.c as context type id.
- Writing my template as the body of this template element.
Now when I start a runtime workbench without my extension I see the
usual standard templates in Window / Preferences / C/C++ / Editor /
Templates.
When I add my extension the list of templates is compeletely empty.
Has anybody ventured into these lands? What should I do?
For more clarity I am adding a snippet from my plugin.xml
Thanks for any hints,
Norbert Ploett
=====snip========
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin id="de.siemens.rmos.crossdevel" name="RMOS cross development
plug-in" version="1.0.16" provider-name="siemens.com">
<runtime>
<library name="crossdevel.jar">
<export name="*"/>
</library>
</runtime>
<requires>
<import plugin="org.eclipse.cdt.managedbuilder.core"/>
<import plugin="org.eclipse.cdt.ui"/>
<import plugin="org.eclipse.help"/>
<import plugin="org.eclipse.core.variables"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.ui.editors"/>
</requires>...
<extension
id="de.siemens.aud.rmos.templates"
point="org.eclipse.ui.editors.templates">
<template
contextTypeId="org.eclipse.cdt.ui.text.templates.c"
description="How to create a binary semaphore"
id="de.siemens.rmos.crossdevel.templates.RmCreateBinSemaphore"
name="RmCreateBinSemaphore">
/* I'm not sure how to do this :-) */ ${cursor}
</template>
</extension>
</plugin>
=====snap========