|
|
Re: "Hidden" model elements [message #639608 is a reply to message #639527] |
Wed, 17 November 2010 07:55 |
Fernando Gonz Messages: 13 Registered: October 2010 |
Junior Member |
|
|
Hi Sebastian, thanks for your answer.
I've found no getImportedNamespaceResolvers(EObject) in ImportedNamespaceAwareLocalScopeProvider. Could it be that you mean getImportNormalizer(EObject context)? Indeed I successfully added some ImportNormalizers to achieve a similar goal.
In my concrete case it's not only about imports but also about some data structures my model deals with. I have too possibilities:
1) There are some instances of these structures that are not defined in the user model but in the user interface, and it should be possible to refer to them with no declaration in the user model.
2) I have an array-like structure with no attributes but I want to be able to refer to a "length" attribute.
I can't try (1) yet, but I've been able to create the "length" attribute explained in (2). It seems to work well so far.
What I understand is that, as a general rule, any hidden model element can be added in the scope provider. Please, correct me if I'm wrong.
Concerning (1), I would like to include those structures in a separate resource (I cannot have more than one namespace in a model) in order to avoid name collisions. Is global scope provider the place to add a "hidden" resource?
BTW, is it possible to create a Resource in memory? In my test cases I'm using a file in /tmp for each small model I'm testing...
Best regards,
Fernando.
|
|
|
Powered by
FUDForum. Page generated in 0.03616 seconds