Generate diagram code programmatically [message #235936] |
Fri, 10 July 2009 06:53  |
Eclipse User |
|
|
|
Hi there,
Does anyone can give me a name of a GMF class (if it exists) that can be
used to start my implementation in order to generate the diagram code
programmatically from JAva?
Thanks,
Achilleas
|
|
|
|
|
|
|
|
Re: Generate diagram code programmatically [message #236014 is a reply to message #235981] |
Fri, 10 July 2009 09:52  |
Eclipse User |
|
|
|
Hi again Pupier,
Your tips were very useful and with the Java file that you send me I was
able to modify it and generate the diagram code succesfully from the
created gmfgen file.
I have made some changes to the code as follows:
1. The createGenerator method was changed as follows:
private Generator createGenerator() {
CodegenEmitters emitters = new CodegenEmitters(true, null,
false);
return new Generator(getGenModel(), emitters);
}
2. I have changed the access of the doRun method to protected instead of
private; so that I can call it from my package.
3. I have made an instance of the GenerateDiagramCodeOperation class, set
the gmfgen uri and called the doRun method!!
Thanks for the initial tips,
Achilleas
|
|
|
Powered by
FUDForum. Page generated in 0.09063 seconds