use of org.eclipse.n4js.ts.ui.search.LabelledReferenceDescription in project n4js by eclipse.
the class LabellingReferenceFinder method toAcceptor.
@Override
protected Acceptor toAcceptor(IAcceptor<IReferenceDescription> acceptor) {
return new ReferenceAcceptor(acceptor, getResourceServiceProviderRegistry()) {
@Override
public void accept(EObject source, URI sourceURI, EReference eReference, int index, EObject targetOrProxy, URI targetURI) {
// Check if we should ignore named import specifier
if (N4JSReferenceQueryExecutor.ignoreNamedImportSpecifier && source instanceof NamedImportSpecifier)
return;
EObject displayObject = calculateDisplayEObject(source);
String logicallyQualifiedDisplayName = N4JSHierarchicalNameComputerHelper.calculateLogicallyQualifiedDisplayName(displayObject, labelProvider, false);
ICompositeNode srcNode = NodeModelUtils.getNode(source);
int line = srcNode.getStartLine();
LabelledReferenceDescription description = new LabelledReferenceDescription(source, displayObject, sourceURI, targetOrProxy, targetURI, eReference, index, logicallyQualifiedDisplayName, line);
accept(description);
}
};
}
Aggregations