|
Re: [Xcore] Copying content from one Xcore model to another programmatically [message #1336842 is a reply to message #1336042] |
Tue, 06 May 2014 15:48 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Sabine,
Comments below.
On 06/05/2014 3:45 PM, Sabine Mising name wrote:
> Hello everybody,
>
> I am copying parts of one Xcore-file into another programmatically.
Hmmm. Via the node model? Unless you do it textually, it's likely to
lose information, like formatting (and the formatter is quite bad)
> While copying Xcore works well, xbase implemented operations seem to
> cause some problems. Some "words" are changed during the copy-process:
> var x = AProjectsFactory.eINSTANCE.create(...)
> x.EReferences() //as required by my Xcore-Version with a capital
> letter...
>
> becomes
>
> var x = super.eINSTANCE}.create(...)
That seems quite wrong... Where was this code located?
> x.eReferences() // ...and a nice error marker
>
> Seems like Xcore is keeping track of what xbase-references?!?
The bodies are Xbase expressions, so yes, we depend on Xbase also doing
the right thing.
> Has anybody an idea how to avoid this? Or can tell me what am I doing
> wrong?
>
> Second thing I observed is: Xbase references to the Ecore MM must
> start with a capital letter (x.EReferences(),x.EOperations() ) - so: why?
They purely follow the Bean specification; it's a little annoying.
> Any other reference works fine with non capital letter...
It's more of an Xbase question, best asked on the TMF forum.
> I would like to have a consistent concrete Syntax - so am I doing
> something wrong? And what?
>
> (I am using Xcore Version 1.1.1.v20130903-0948)
I'm not sure the approach you've taken is a good one. I think for a
textual language one should focus on transferring the full text,
comments and all...
>
> Thanks in advance!
> Sabine
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02566 seconds