Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Importing old version XSD model to new emf .ecore
Importing old version XSD model to new emf .ecore [message #73233] Tue, 30 October 2007 09:02 Go to next message
paolo russian is currently offline paolo russianFriend
Messages: 81
Registered: July 2009
Member
Hi, I got to migrate a whole gui designer based on emf/gmf to the latest
versions of these plugins and eclipse. What are the correct steps to
import my very very large XSD model to my up-to date eclipse environment?
I'm behind porting an application with several custom palette items and
views and a lot of distributed code all nested into my model, and I got
big troubles in generating a new ecore-genmodel from the XSD i have.

Basically, what I believe I've got to do is this (just to let you see if
I'm doin noob mistakes):
a) start a new gmf project under an up-to-date eclipse environment;
b) create an emf project loading old version xsd file;
c) try to import/migrate the gmftool & gmfgraph friends hoping I won't
have to rebulid by hand all the nesting child/nodes stuff.
d) "combine" them in the .gmfmap (via gmf dashboard) and generate the
final .diagram code.

The problem is that as soon as I try to import my old version xsd and I
let eclipse "generate all" from .genmodel, what I get is only
mistake-filled projects parts. Missing references, missing classes, wrong
visibilities.. all on the generated part of the code so I really don't
have a clue on what to do.
This make me ask you what I am doing wrong, and if is this the correct way
to migrate my project in order to use/implement the new features of latest
gmf.
I'm trying to avoid to rewrite everything by hand starting from scratch...
besides our develeopement teams need to keep working around this xsd
import thing (new widgets we will develop etc).
Thanks for your help!
Re: Importing old version XSD model to new emf .ecore [message #73251 is a reply to message #73233] Tue, 30 October 2007 12:19 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Paolo,

This is more an EMF question and it includes GMF aspects I might not be
able to answer.

Paolo RUssian wrote:
> Hi, I got to migrate a whole gui designer based on emf/gmf to the
> latest versions of these plugins and eclipse. What are the correct
> steps to import my very very large XSD model to my up-to date eclipse
> environment?
In terms of EMF, there should be no need to repeat the import steps
unless the XSD itself has changed. In that case, right clicking on the
..genmodel file invoking "Reload..." or opening it and doing the same
things from via "Generator->Reload..." on the menubar will allow you to
repeat the import steps again. This will preserve all your existing
GenModel's settings.
> I'm behind porting an application with several custom palette items
> and views and a lot of distributed code all nested into my model, and
> I got big troubles in generating a new ecore-genmodel from the XSD i
> have.
>
> Basically, what I believe I've got to do is this (just to let you see
> if I'm doin noob mistakes):
> a) start a new gmf project under an up-to-date eclipse environment;
Gosh, I would hope you don't need to start any new projects if you have
existing projects.
> b) create an emf project loading old version xsd file;
If you have an existing EMF project with a .genmodel file, you can
simply reload it and regenerate it in place.
> c) try to import/migrate the gmftool & gmfgraph friends hoping I won't
> have to rebulid by hand all the nesting child/nodes stuff.
I'm not so familiar with what you need to do with GMF, but I imagine it
has similar reloading support.
> d) "combine" them in the .gmfmap (via gmf dashboard) and generate the
> final .diagram code.
>
> The problem is that as soon as I try to import my old version xsd and
> I let eclipse "generate all" from .genmodel, what I get is only
> mistake-filled projects parts. Missing references, missing classes,
> wrong visibilities.. all on the generated part of the code so I really
> don't have a clue on what to do.
I would expect that only parts of the model that have changed will
regenerate. Perhaps you didn't use Reload... but rather created a new
GenModel? Are you migrating from EMF 2.2 to 2.3? Are you trying to
take advantage of Java 5.0 support? By default with EMF 2.3, I would
expect your existing GenModel to continue to generate code that works
with the 2.2 runtime.
> This make me ask you what I am doing wrong, and if is this the correct
> way to migrate my project in order to use/implement the new features
> of latest gmf.
> I'm trying to avoid to rewrite everything by hand starting from
> scratch... besides our develeopement teams need to keep working around
> this xsd import thing (new widgets we will develop etc).
Yes, having to repeat the steps of hand written code would be
unacceptable. Now however that I can only answer the EMF parts of the
questions and that using the GMF newsgroup for the GMF parts would be
better. news://news.eclipse.org/eclipse.modeling.gmf

> Thanks for your help!
>
Re: Importing old version XSD model to new emf .ecore [message #602681 is a reply to message #73233] Tue, 30 October 2007 12:19 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Paolo,

This is more an EMF question and it includes GMF aspects I might not be
able to answer.

Paolo RUssian wrote:
> Hi, I got to migrate a whole gui designer based on emf/gmf to the
> latest versions of these plugins and eclipse. What are the correct
> steps to import my very very large XSD model to my up-to date eclipse
> environment?
In terms of EMF, there should be no need to repeat the import steps
unless the XSD itself has changed. In that case, right clicking on the
..genmodel file invoking "Reload..." or opening it and doing the same
things from via "Generator->Reload..." on the menubar will allow you to
repeat the import steps again. This will preserve all your existing
GenModel's settings.
> I'm behind porting an application with several custom palette items
> and views and a lot of distributed code all nested into my model, and
> I got big troubles in generating a new ecore-genmodel from the XSD i
> have.
>
> Basically, what I believe I've got to do is this (just to let you see
> if I'm doin noob mistakes):
> a) start a new gmf project under an up-to-date eclipse environment;
Gosh, I would hope you don't need to start any new projects if you have
existing projects.
> b) create an emf project loading old version xsd file;
If you have an existing EMF project with a .genmodel file, you can
simply reload it and regenerate it in place.
> c) try to import/migrate the gmftool & gmfgraph friends hoping I won't
> have to rebulid by hand all the nesting child/nodes stuff.
I'm not so familiar with what you need to do with GMF, but I imagine it
has similar reloading support.
> d) "combine" them in the .gmfmap (via gmf dashboard) and generate the
> final .diagram code.
>
> The problem is that as soon as I try to import my old version xsd and
> I let eclipse "generate all" from .genmodel, what I get is only
> mistake-filled projects parts. Missing references, missing classes,
> wrong visibilities.. all on the generated part of the code so I really
> don't have a clue on what to do.
I would expect that only parts of the model that have changed will
regenerate. Perhaps you didn't use Reload... but rather created a new
GenModel? Are you migrating from EMF 2.2 to 2.3? Are you trying to
take advantage of Java 5.0 support? By default with EMF 2.3, I would
expect your existing GenModel to continue to generate code that works
with the 2.2 runtime.
> This make me ask you what I am doing wrong, and if is this the correct
> way to migrate my project in order to use/implement the new features
> of latest gmf.
> I'm trying to avoid to rewrite everything by hand starting from
> scratch... besides our develeopement teams need to keep working around
> this xsd import thing (new widgets we will develop etc).
Yes, having to repeat the steps of hand written code would be
unacceptable. Now however that I can only answer the EMF parts of the
questions and that using the GMF newsgroup for the GMF parts would be
better. news://news.eclipse.org/eclipse.modeling.gmf

> Thanks for your help!
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Importing old version XSD model to new emf .ecore
Next Topic:Generate Java classes from XSD
Goto Forum:
  


Current Time: Fri Apr 26 07:15:00 GMT 2024

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

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

Back to the top