|QVTo editor with changing input model [message #917610]
||Thu, 20 September 2012 08:47
in my project, the input and output models (EMF Ecore and EMF XSD) are
changing quite frequently. Every time I open the QVTo editor I must
ensure that it knows the correct model version. So far I've solved this
by creating a launch configuration "QVT Editor" that contains the
generated EMF model code and loads the current XSD model on startup.
However this is a bit sub-optimal. It is a major extra step for each
developer to construct such a run-time eclipse. Opening QVTo scripts in
the normal development eclipse just blows you away with error markers as
it doesn't know any of the input/output models. That and the extra QVT
learning curve makes my client having 2nd thoughts about using the QVT
Long story short: is there a way to make the regular QVT editor aware of
changing models? Ideally, the editor would load the .ecore everytime
when opened. How can I archieve this?
|Re: QVTo editor with changing input model [message #918722 is a reply to message #918597]
||Fri, 21 September 2012 09:28
| Ed Willink
Registered: July 2009
Needing to close Eclipse is definitely unacceptable and certainly a bug.
Generally this only occurs with applications that abuse the global
registries; hopefully not QVTo.
Needing to close the editor is a pain but in principle EMF does not
support meta-model mutation, so this should only occur in model rather
than meta-model editors. Xtext is very good at spotting *.ecore changes.
Other tools seem to be patchy; hence I suspect that QVTo is imperfect here.
If you can provide a repro, please submit a Bugzilla.
On 21/09/2012 07:50, Marius Gröger wrote:
> On 20.09.2012 17:04, Ed Willink wrote:
>> I don't use XSD much, but my understanding is that you create an Ecore
>> metamodel from your XSD, so that your XSD files are loadable as EMF
>> If you have particular serialisation concerns you customize the
>> ExtendedMetaData so that your XSD round-trips via an Ecore Resource to
>> your satisfaction.
>> That done, you then have a registration so that whenever a *.yourxsd
>> file is opened, it uses your XSD configuration to provide the EMF
>> resource for use by a variety of Ecore-based tools of which the Sample
>> Ecore Editor is the simplest test that *.yourxsd is indeed correctly
> Well, so far I've loaded XSD as dynamic Ecore at runtime. A while ago I
> tried the "offline" approach you mentioned and the roundtrip was broken.
> The bug should have been fixed by now though. But anyway roundtrip would
> be an extra gimmick which I don't necessarily need right now. Having a
> fairly simple process from XSD -> .ecore would be ok. I'll try that
> again when I have some time.
> I'm not sure if I got you right regarding another point: if I change the
> ..ecore file in anyway, would the QVT editor pick that up, even if I need
> to close it once? Or even more explicitly: will I not(!) have to restart
> eclipse? That would be really my #1 requirement. I tried it yesterday
> and after the change the editor somehow totally forgot about that (just
> changed) model and even the "modeltype ..." was squiggled with an error
Powered by FUDForum
. Page generated in 0.02412 seconds