[EEF] Custom Toolkit Widgets [message #622996] |
Wed, 16 June 2010 20:57  |
Eclipse User |
|
|
|
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 #662097 is a reply to message #622996] |
Tue, 29 March 2011 05:44   |
Eclipse User |
|
|
|
Hi all,
I know that this topic is a bit old but I'm facing the same problem, so I hope someone could give a solution 
I'm trying to add a custom SWT Widget in the EEF generation process. So thanks to the previous message, I managed to create a .toolkits model in which I added my widget. Then I loaded this resource in the .components model and I am now able to select my widget in the representation field.
I also coded the 4 templates (xxControl, xxGettersSetters, xxSWTImpl, xxFormImpl), taking example on org.eclipse.emf.eef.codegen.widgets.impl.text templates.
But when I try to generate the project code thanks to my .eefgen model, some errors raise and I am not able to produce what I want.
Error: Problem while Organize Imports : project_path.edit/src-gen/class_using_my_widget.java
In the generated code there are many messages like:
xxPropertiesEditionPart.java :
public //FIXME ERROR INVALID CASE INTO template public toJavaType(view : ViewElement) in common.mtl module for representation EMigPropertyEditor getValue();
public void setValue(//FIXME ERROR INVALID CASE INTO template public toJavaType(view : ViewElement) in common.mtl module for representation EMigPropertyEditor newValue);
xxPropertiesEditionPartForm.java :
//FIXME INVALID CASE INTO template public widgetDeclaration(editor : ElementEditor) in viewFormUtils.mtl module
//FIXME INVALID CASE INTO template public implementation(editor : ViewElement, pec : PropertiesEditionComponent) in viewUtils.mtl module
So if someone has any idea ...
Thanks in advance
[Updated on: Thu, 31 March 2011 10:17] by Moderator
|
|
|
|
|
|
Re: [EEF] Custom Toolkit Widgets [message #672025 is a reply to message #664287] |
Thu, 19 May 2011 11:39  |
Eclipse User |
|
|
|
Hello,
I know the post is kind of old but I really hope to get some answers.
I would like to know if the wiki page that is mentioned above will be available soon. I need to have an editable Combo viewer for my EEF editor and I don't even know where to start.
Mike Morell said "I have created a custom combo viewer control" and "I created a custom.toolkit model and added my custom widget to it", does anyone know which steps to follow to do that?
Thank you.
|
|
|
Powered by
FUDForum. Page generated in 0.08717 seconds