org.eclipse.xtext.findReferences.IReferenceFinder.Acceptor Java Examples
The following examples show how to use
org.eclipse.xtext.findReferences.IReferenceFinder.Acceptor.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LabellingReferenceFinder.java From n4js with Eclipse Public License 1.0 | 6 votes |
@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 .calculateHierarchicalDisplayName(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); } }; }
Example #2
Source File: DelegatingReferenceFinder.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
protected Acceptor toAcceptor(IAcceptor<IReferenceDescription> acceptor) { return new ReferenceAcceptor(acceptor, resourceServiceProviderRegistry); }