Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EEF] Custom Toolkit Widgets(How to use dynamic templates for a custom property editor widget?)
[EEF] Custom Toolkit Widgets [message #540684] Wed, 16 June 2010 20:57 Go to next message
Eclipse UserFriend
I have created a custom combo viewer control and I would like to use it as a custom toolkit widget for one of my properties. Is it possible to extend the code generator to use my custom widget? I created a custom.toolkit model and added my custom widget to it. I then linked to it from my *.components file. When I generate the EEF architecture the code generator throws an error when I get to the custom widget. I think it is because there is no code template for my custom widget. Is there a way to add a dynamic code generation template so my widget will be generated?

[Updated on: Thu, 17 June 2010 09:24] by Moderator

Re: [EEF] Custom Toolkit Widgets [message #541566 is a reply to message #540684] Mon, 21 June 2010 10:26 Go to previous messageGo to next message
Eclipse UserFriend
Hi mike,

you have done the first part of the job.

We are writing a wiki page that will explain in details what you have to
do.
the difficult part is that you hve to create a new Acceleo generator
project and extends some of the templates with guards that are compliant
with your widget.


Sorry for the delay,

Stephane

Le 17/06/2010 02:57, Mike Morrell a écrit :
> I have created a custom combo viewer control and I would like to use it
> as a custom toolkit widget for one of my properties. Is it possible to
> extend the code generator to use my custom widget? I created a
> custom.toolkit model and added my custom widget to it. I then linked to
> it from my *.components file. When I generate the EEF architecture the
> code generator throws an error when I get to the custom widget. I think
> it is because there is no code template for my custom widget. Is there a
> way to add a dynamic code generation template so my widget will be
> generated?
Re: [EEF] Custom Toolkit Widgets [message #553213 is a reply to message #540684] Mon, 16 August 2010 13:02 Go to previous messageGo to next message
Eclipse UserFriend
I'm also interested in adding some custom widgets. Is this wiki page complete yet? If so, please post a link to it.

Thanks,
Josh
Re: [EEF] Custom Toolkit Widgets [message #553902 is a reply to message #553213] Thu, 19 August 2010 07:36 Go to previous messageGo to next message
Eclipse UserFriend
Hi Josh,

Unfortunately we didn't have time to progress on that tutorial. We hope to make it available very soon.

Florian
Re: [EEF] Custom Toolkit Widgets [message #553945 is a reply to message #540684] Thu, 19 August 2010 09:49 Go to previous messageGo to next message
Eclipse UserFriend
This isn't that hard actually.
You create a plug-in that has the acceleo nature.
You then have to code 4 templates for each widget.
You'll find the templates to override in org.eclipse.emf.eef.codegen.widgets.api.
The best solution is to take as exemple the existing widgets.

Once you've done that you have to use the 'org.eclipse.acceleo.engine.dynamic.templates' extension point on your plug-in and add as templates the path of the templates you defined.

The plug-in has to be loaded to be used at the generation time so you can't have it in the same workspace as your EEF project I guess. Either you have to export it in a jar format or you launch a dynamic eclipse instance and generate your EEF project in this new workspace.
Re: [EEF] Custom Toolkit Widgets [message #554036 is a reply to message #540684] Thu, 19 August 2010 15:16 Go to previous message
Eclipse UserFriend
Great, with that help I was able to get it working.

Thanks!
Previous Topic:Emfatic download
Next Topic:Edapt - Status?
Goto Forum:
  


Current Time: Wed Jul 23 14:45:43 EDT 2025

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

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

Back to the top