Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Xpand] Long namespaces and editor proposals
[Xpand] Long namespaces and editor proposals [message #509085] Thu, 21 January 2010 11:06 Go to next message
Ilyas Keser is currently offline Ilyas KeserFriend
Messages: 85
Registered: July 2009
Member
Hi,

I created a new Xtext project and run the GenerateMyDsl.mwe to generate the artifacts. After that, I opened the generated Template.xpt, tried to define a new DEFINE for the type Entity. After the keyword "FOR", if I select the proposal for the type Entity (without typing a prefix) the full qualified name of the type (myDsl::Entity) is inserted. At this point I would expect only the simple name of the type because the corresponding namespace of the type is already imported (IMPORT mydsl).

«IMPORT myDsl»

«DEFINE main FOR myDsl::Entity-»


Additionally, if I type a prefix (e.g. "Ent") and then select the proposal Xpand editor reacts as expected and inserts only the simple name of the type:

«IMPORT myDsl»

«DEFINE main FOR Entity-»

This behaviour of the editor is not so "beautiful" if you use long namespaces:

«DEFINE main FOR de::foo::server::types::con::MyType-»
....
«ENDDEFINE»

Is this a known issue or am I doing something wrong.

Thanks
ILyas
Re: [Xpand] Long namespaces and editor proposals [message #509296 is a reply to message #509085] Thu, 21 January 2010 21:27 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14720
Registered: July 2009
Senior Member
I guess this is meant as a feature and not a "issue". the alternative would be an "auto-import" feature or something like that. don't know if this would be a better solution specially if you work with more than one metamodel / metamodels with name clashes

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: [Xpand] Long namespaces and editor proposals [message #509378 is a reply to message #509296] Fri, 22 January 2010 09:47 Go to previous message
Ilyas Keser is currently offline Ilyas KeserFriend
Messages: 85
Registered: July 2009
Member
Hi,

what I mean is that a proposal (in Xpand editor!) should insert the simple name of the type if the corresponding namespace is imported. This is not always the case if you use code completion in DEFINE blocks (see my previous email).

Regards,
ILyas

Am 21.01.2010 22:27, schrieb Christian Dietrich:
> I guess this is meant as a feature and not a "issue". the alternative
> would be an "auto-import" feature or something like that. don't know if
> this would be a better solution specially if you work with more than one
> metamodel / metamodels with name clashes
Previous Topic:[Acceleo] Exception in template query
Next Topic:[XPand/GMF] templates import statements
Goto Forum:
  


Current Time: Thu Oct 03 20:59:55 GMT 2024

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

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

Back to the top