MyDSL Templates [message #1766188] |
Sat, 17 June 2017 07:45 |
Yves LEDUC Messages: 56 Registered: May 2015 |
Member |
|
|
On the MyDSL> Templates preference page of my DSL project by default I get:
Preferences
-----------
MyDSL
Compile
Refactoring
Syntax Coloring
Templates
Templates
------------------------------------
Create, edit or remove templates
Name Context Description Auto-Insert
...
The list of all my templates.
...
What I want to get:
Preferences
-----------
MyDSL
Compile
Refactoring
Syntax Coloring
Templates
Code
Comments
Files
> Code
------------------------------------
Create, edit or remove templates
Name Context Description Auto-Insert
...
Only the list of templates of my code
...
> Comments
------------------------------------
Create, edit or remove templates
Name Context Description Auto-Insert
...
Only the list of templates of my comments.
...
> Files
------------------------------------
Create, edit or remove templates
Name Context Description Auto-Insert
...
Only the list of file templates.
...
I managed to create my three categories (Code, Comments and Files).
Example for comments (based on the default Xtext preference page):
Class WorkbenchPreferencePageAlgoComments extends XtextTemplatePreferencePage {
@Inject
New (IPreferenceStore preferenceStore, ContextTypeRegistry registry, TemplateStore templateStore) {
Super (preferenceStore, registry, templateStore)
}
}
How to access the list of all the templates to filter it according to category for example here: it is a comment?
Regards Yves
|
|
|
Powered by
FUDForum. Page generated in 0.01702 seconds