Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » MyDSL Templates(Separate the MyDSL Templates default list (XtextTemplatePreferencePage) into three categories (Code, Comments and Files).)
MyDSL Templates [message #1766188] Sat, 17 June 2017 07:45
Yves LEDUC is currently offline Yves LEDUCFriend
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
Previous Topic:Bundle can not be resolved
Next Topic:Generic Attribute rule
Goto Forum:
  


Current Time: Fri Apr 26 23:21:03 GMT 2024

Powered by FUDForum. Page generated in 0.02844 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top