Home » Modeling » TMF (Xtext) » Add Xtext content to toolbar
| | | | |
Re: Add Xtext content to toolbar [message #1816059 is a reply to message #1816027] |
Fri, 18 October 2019 06:52   |
Eclipse User |
|
|
|
Sorry, I was unclear beforehand... Let me rephrase the question:
I have added fileWizard and projectWizard {generate=true} to the mwe2 file of my language.
This generated org.eclipse.xtext.mydsl.ui.wizard package with MyDslFileTemplateProvider and MyDslProjectTemplateProvider in it (implementing IFileTemplateProvider and IProjectTemplateProvider respectively).
This is working fine, if I select the New -> Other... option, then I can select MyDsl -> MyDsl File and MyDsl Project in it. The files and projects are created properly after selection.
I want to create dedicated buttons on the toolbar for these two selections (wizards).
My question is: How can I do this?
-My first idea was to create a package, where I invoke the MyDslFileTemplateProvider. This is the point, where I have no idea how to do this.
-Afterwards, I have followed the idea of @Tamas and created a parametrized command, Here, I have replaced the org.eclipse.xtext.example.fowlerdsl.ui.wizard.StatemachineNewProjectWizard with org.eclipse.xtext.mydsl.ui.wizard.MyDslFileTemplateProvider, but this unfortunately resulted Eclipse error ("Unable to generate parametrized command..."). However, the icon is on the toolbar, but it is deactivated.
My guess would be that the parametrized command also expects to invoke somehow MyDslFileTemplateProvider. Am I correct here? (I guess this leads to my previous point.)
[Updated on: Fri, 18 October 2019 06:54] by Moderator
|
|
| | | | |
Goto Forum:
Current Time: Wed Apr 23 13:08:39 EDT 2025
Powered by FUDForum. Page generated in 0.04847 seconds
|