|
Re: Cross-referencing challenges [message #1831166 is a reply to message #1831165] |
Wed, 12 August 2020 19:01 |
|
yes you can use the QualifiedNameConverter. you could also use the IValueConverter.
see org.eclipse.xtext.linking.impl.LinkingHelper.getCrossRefNodeAsString(INode, boolean)
and org.eclipse.xtext.linking.impl.DefaultLinkingService.getLinkedObjects(EObject, EReference, INode)
for binding: IQualifiedNameConverter != IQualifiedNameProvider
you add a bindIQualifiedNameConverter if you need.
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
Re: Cross-referencing challenges [message #1831177 is a reply to message #1831168] |
Thu, 13 August 2020 05:14 |
|
you can either do the scope manually or index the element twice (customize org.eclipse.xtext.resource.impl.DefaultResourceDescriptionStrategy.createEObjectDescriptions(EObject, IAcceptor<IEObjectDescription>) and/or org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider.internalGetAllDescriptions(Resource)
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
Re: Cross-referencing challenges [message #1831216 is a reply to message #1831198] |
Fri, 14 August 2020 01:11 |
Waqas Ilyas Messages: 80 Registered: July 2009 |
Member |
|
|
Some updates... So i added a IQualifiedNameProvider in addition to qualified name converter, so that when we calculate qualified name for a Label, we strip the leading qualifiers added because of its parents. This gives it that "global" matching ability. With this I don't need to create my scope from scratch.
The next thing is to limit the scope of other resources in project based on "inclusion". I will look at the options you mentioned. Thank you for that.
[Updated on: Fri, 14 August 2020 04:55] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04394 seconds