|
|
|
|
Re: Getting IEObjectDescription from JvmTypeRefence without proxy resolution [message #1805511 is a reply to message #1805504] |
Tue, 16 April 2019 13:41 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Didier Didos![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=didos_fr%40yahoo.fr) Messages: 14 Registered: April 2016 |
Junior Member |
|
|
Basically, I want to get IObjectDescription from a proxy. I will explain a use case in CreateLazyUserData of the ResourceDescriptionStrategy which is, I hope, possible (because it is lazy evaluated, so whole indexing should be done).
I have a xtext model type like that:
Mapper from=JvmTypeReference to=JvmTypeReference
I'm writting my own ResourceDescriptionStrategy, and in the createUserData method, I would like to index qualified name of "from & to" JvmTypeReference in order to be able to do duplicate detection for exemple.
As recommended, I dont want to do 'mapper.from.type' to resolve JvmType contained in JvmTypeReference, but I want to get ObjectDescription in order to get qualifiedname.
Currently I'm trying with something very close to LazyLinker:
Quote:
@Inject private IScopeProvider scopeProvider
@Inject IQualifiedNameConverter qualifiedNameConverter;
@Inject IQualifiedNameProvider nameProvider;
createUserData(..) {
val fromNode = NodeModelUtils.getNode(mapper.from)
val qualifiedLinkName = qualifiedNameConverter.toQualifiedName(fromNode.text);
val scope = scopeProvider.getScope(mapper,TypesPackage.Literals.JVM_PARAMETERIZED_TYPE_REFERENCE__TYPE);
val eObjectDescription = scope.getSingleElement(qualifiedLinkName);
....
}
but eObjectDescription is null, when imports are in the game its seems.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04535 seconds