Reputation: 877
In eclipse , there are standard contexts for editors. For java editors, there are java , java statements, java type members...
Is there anyway to add new context in templates ?
Upvotes: 0
Views: 384
Reputation: 111142
You can add contexts but only by writing an Eclipse plugin. The org.eclipse.ui.editors.templates
is used to do this with the contextType
element.
For example the 'Java' context is defined using:
<extension
point="org.eclipse.ui.editors.templates">
<contextType
name="%templates.java.contextType.name"
class="org.eclipse.jdt.internal.corext.template.java.JavaContextType"
id="java"
registryId="org.eclipse.jdt.ui.CompilationUnitEditor">
</contextType>
Upvotes: 1