|Re: Getting IEObjectDescription from JvmTypeRefence without proxy resolution [message #1805511 is a reply to message #1805504]
||Tue, 16 April 2019 13:41
| Didier Didos
Registered: April 2016
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:
@Inject private IScopeProvider scopeProvider
@Inject IQualifiedNameConverter qualifiedNameConverter;
@Inject IQualifiedNameProvider nameProvider;
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.01486 seconds