Code generation with GEF [message #166163] |
Fri, 28 January 2005 20:37  |
Eclipse User |
|
|
|
Originally posted by: ass4.alu.um.es
Hi everybody,
I'am developing a class diagram editor with GEF. This is a tipical
modeling application in which you can add classes, interfaces, and
relations between classes or interfaces like inherit relation. In addition
I want to generate the code for the diagrams that I do, for example if I
add to the editor a class with to attributes and two methods I want to
generate a class (a file .java) that contains the two attributes and the
two methods.
Please tell me something about this.
Aurelio.
|
|
|
Re: Code generation with GEF [message #166203 is a reply to message #166163] |
Sat, 29 January 2005 13:50  |
Eclipse User |
|
|
|
Aurelio,
GEF really has no inbuilt support for Code Generation, it is a graphical
editing framework after all.
GEF uses MVC so you can simply write methods into your models which output
code based on the properties of your model.
If you want something more advanced, you can look at EMF - the Eclipse
Modeling Framework (http://www.eclipse.org/emf), which has code generation
capabilities as well. You can integrate EMF into your GEF editor; there is
an IBM redbook covering this -
http://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstract s/sg246302.html?Open
Hope this helps,
Brian.
Aurelio Sánchez wrote:
> Hi everybody,
> I'am developing a class diagram editor with GEF. This is a tipical
> modeling application in which you can add classes, interfaces, and
> relations between classes or interfaces like inherit relation. In addition
> I want to generate the code for the diagrams that I do, for example if I
> add to the editor a class with to attributes and two methods I want to
> generate a class (a file .java) that contains the two attributes and the
> two methods.
> Please tell me something about this.
> Aurelio.
|
|
|
Powered by
FUDForum. Page generated in 0.06935 seconds