QVTo editor with changing input model [message #917610] |
Thu, 20 September 2012 04:47  |
Eclipse User |
|
|
|
Hello,
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
technology.
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?
Thanks
Marius
|
|
|
|
|
|
|
|
|
Re: QVTo editor with changing input model [message #918722 is a reply to message #918597] |
Fri, 21 September 2012 05:28   |
Eclipse User |
|
|
|
Hi
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.
Regards
Ed Willink
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
>> resources.
>>
>> 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
>> registered.
> 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
> marker.
>
> Thanks
> Marius
>
|
|
|
|
|
|
|
|
Re: QVTo editor with changing input model [message #922007 is a reply to message #921911] |
Mon, 24 September 2012 12:40  |
Eclipse User |
|
|
|
Hi
The same as why do you need a Java builder. If you only edit you never
need to compile.
Since QVTo doesn't currently persist compiled artefacts, the only
benefit is probably refreshing of problem markers on closed files.
Regards
Ed Willink
On 24/09/2012 15:46, Marius Gröger wrote:
> On 24.09.2012 14:22, Marius Gröger wrote:
>> On 24.09.2012 11:34, Ed Willink wrote:
>>> I'm afraid that I see EMF Facet in the stack trace.
>> Just for completeness, I've taken the issue over to the EMF news group:
>> http://www.eclipse.org/forums/index.php/m/921753/
>>
>> Summary thus far: I've been able to locate an issue with the order of
>> initialization of the various Aggregate*Packages.
> One more question: it seems like a silly question, but for what purpose
> do I actually need the QVT builder? I noticed that if I uncheck it in
> the properties, I still get a working QVT editor with syntax coloring
> and completion?!
>
> Marius
>
|
|
|
Powered by
FUDForum. Page generated in 0.06330 seconds