Custom IResourceDescriptionStrategy not working as expected [message #1872644] |
Tue, 12 November 2024 12:10 |
Tommaso Fonda Messages: 9 Registered: May 2024 |
Junior Member |
|
|
Hi,
In my project I've implemented my own IResourceDescriptionStrategy, based on DefaultResourceDescriptionStrategy, overriding createEObjectDescriptions() to add an AliasedEObjectDescription for some of the EObjectDescriptions created by the default implementation. The unexpected behaviour is that I can use an AliasedEObjectDescription's QualifiedName to refer to the associated EObject only in a different file than the one that contains the text that, when parsed, creates that EObject.
For example, I have used my IResourceDescriptionStrategy implementation to add an unquoted alias for every EObject that has got a name wrapped in single quotation marks. In my DSL's editor the following does not work:
package a {
item 'z';
}
package b {
reference a::z;
}
and I get the "Couldn't resolve reference to Item a::z" error. If I copy paste the whole "package b {...}" into a different file, the model suddenly becomes valid.
Within the same file, I am forced to write a::'z'.
What am I missing? Is this intended behaviour, and if so, how can I get the aliases to work even within the same file?
Thanks!
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04321 seconds