| Multiple ecore and one editor [message #160166] |
Wed, 14 November 2007 02:59  |
Eclipse User |
|
|
|
Originally posted by: smjo85.gmail.com
Hi!
I have to create one GMF editor, where the input is two languages (e.g.
UML and ER in Ecore), and I need to map UML to ER. So my problem is, how
can I solve, that one GMF editor creates three XML files (UML, ER, MAP)?
Thanks,
John Smith
|
|
|
|
|
|
| Re: Multiple ecore and one editor [message #161030 is a reply to message #160925] |
Sat, 17 November 2007 02:30   |
Eclipse User |
|
|
|
Originally posted by: smjo85.gmail.com
Hello Alex,
Firstly thanks for your answers. I have found this solution not so general
(e.g., ER instead of RDBMS), so I think:
The GMF standard editor generator is
only capable of generating model editors for a single language.
Therefore, I plan to extend the standard editor generator
of GMF to support the generation of a mapping editor. This
extended generator should take two language definitions (e.g.,
UML and ER) and the mapping language as input and should
produce a mapping editor which is capable of defining domain
models in both languages and also to map the model elements
of the domain model.
So I have er.gmfmap, uml.gmfmap, and finally I need three
XML files: er, uml, map using ONE editor.
How can I solve the finally part of this task?
John Smith
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: Multiple ecore and one editor [message #163911 is a reply to message #163892] |
Mon, 03 December 2007 13:48   |
Eclipse User |
|
|
|
Originally posted by: smjo85.gmail.com
Hello Alex,
The diagram do not contain "save", but I saved it using Eclipse, so the
only one default.mindmap is modified according to the editor, but there is
no default.x
There is no exception in the log.
The method is:
protected EObject doDefaultElementCreation() {
org.eclipse.gmf.examples.mindmap.Top top =
(org.eclipse.gmf.examples.mindmap.Top) getElementToEdit();
X newX = XFactory.eINSTANCE.createX();
URI xResourceURI = URI.createURI("x.xmi");
Resource xResource =
top.eResource().getResourceSet().createResource(xResourceURI );
xResource.getContents().add(newX);
top.getXref().add(newX);
return newX;
}
I use org.eclipse.gmf.examples package - see the method.
Is URI.createURI("x.xmi") what the file will be created? (default.x)
but "org.eclipse.gmf.examples.default.x" do not operate also.
And when I start a new Eclipse, and go to New, Example ask only one name:
default.mindmap and the diagram name. And there is no file for X when I
start
it, only the mindmap. When I click to X, X create in mindmap, not in X.
Thanks,
John
|
|
|
|
|
|
|
|
| Re: Multiple ecore and one editor [message #164235 is a reply to message #164214] |
Tue, 04 December 2007 11:05  |
Eclipse User |
|
|
|
Originally posted by: smjo85.gmail.com
Hello Alex,
I tried everything to reach my destination (multiple serialization), but
it do not want to work. If you have a little time and do a similar editor
and send me (smjo85ATgmailDOTcom) I would be really happy.
Thanks for all the help,
John
|
|
|