[Xpand] Long namespaces and editor proposals [message #509085] |
Thu, 21 January 2010 06:06  |
Eclipse User |
|
|
|
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 #509378 is a reply to message #509296] |
Fri, 22 January 2010 04:47  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04245 seconds