Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Serializer seems to be unaware of namespaces
Serializer seems to be unaware of namespaces [message #669262] Mon, 09 May 2011 15:21 Go to next message
Henrik Rentz-Reichert is currently offline Henrik Rentz-ReichertFriend
Messages: 261
Registered: July 2009
Senior Member
Hi,

the eTrice project uses graphical editors for textual models (using Xtext).
When I insert a cross reference to an element from another model and save the diagram then the Serializer generates a fully
qualified name for this element regardless of there already exists an import statement for this namespace or not.

Furthermore, is there an option to influence the behavior of the Serializer in favor of using or even generating import statements
as opposed to the usage of fully qualified names?

Thanks,
Henrik
Re: Serializer seems to be unaware of namespaces [message #669273 is a reply to message #669262] Mon, 09 May 2011 16:51 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Henrik,

which Xtext version do you use? There was a recent fix which will be
available in 2.0RC1 that addressed this issue. It was caused by a faulty
ImportScope-implementation. The serializer uses the name that is
returned from the scope for a given EObject. That is, if you make sure
your scope returns the short name first, it will insert the short name.
If you want to use imports, you'll have to create the import-EObjects in
your model. The serializer will pick these up and use the short name.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 09.05.11 17:21, schrieb Henrik Rentz-Reichert:
> Hi,
>
> the eTrice project uses graphical editors for textual models (using Xtext).
> When I insert a cross reference to an element from another model and save the diagram then the Serializer generates a fully
> qualified name for this element regardless of there already exists an import statement for this namespace or not.
>
> Furthermore, is there an option to influence the behavior of the Serializer in favor of using or even generating import statements
> as opposed to the usage of fully qualified names?
>
> Thanks,
> Henrik
Re: Serializer seems to be unaware of namespaces [message #669370 is a reply to message #669273] Tue, 10 May 2011 05:58 Go to previous message
Henrik Rentz-Reichert is currently offline Henrik Rentz-ReichertFriend
Messages: 261
Registered: July 2009
Senior Member
Hi Sebastian,

yes, I'm using Xtext 2.0M6.

I'll try 2.0RC1 as soon as it is available.

Thanks,
Henrik

Am 09.05.2011 18:51, schrieb Sebastian Zarnekow:
> Hi Henrik,
>
> which Xtext version do you use? There was a recent fix which will be available in 2.0RC1 that addressed this issue. It was caused
> by a faulty ImportScope-implementation. The serializer uses the name that is returned from the scope for a given EObject. That is,
> if you make sure your scope returns the short name first, it will insert the short name. If you want to use imports, you'll have
> to create the import-EObjects in your model. The serializer will pick these up and use the short name.
>
> Regards,
> Sebastian
Previous Topic:Re: Change of IUnitOfWork behaviour in 2.0M7
Next Topic:[MWE2] Error executing workflow file
Goto Forum:
  


Current Time: Thu Sep 26 09:39:50 GMT 2024

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

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

Back to the top