org.eclipse.xtext.ui.editor.findrefs.IReferenceFinder Java Examples
The following examples show how to use
org.eclipse.xtext.ui.editor.findrefs.IReferenceFinder.
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: DelegatingReferenceFinderTest.java From xtext-eclipse with Eclipse Public License 2.0 | 6 votes |
@Override public void setUp() throws Exception { super.setUp(); with(RefactoringTestLanguageStandaloneSetup.class); resourceSet = get(XtextResourceSet.class); resource = loadResource("test.refactoringtestlanguage", "A { B { ref A } } C"); elementA = resource.getContents().get(0).eContents().get(0); elementB = elementA.eContents().get(0); elementC = resource.getContents().get(0).eContents().get(1); resourceSet.getResources().add(resource); ResourceSetBasedResourceDescriptions resourceDescriptions = get(ResourceSetBasedResourceDescriptions.class); resourceDescriptions.setContext(resourceSet); referenceFinder = new DelegatingReferenceFinder(); referenceFinder.setIndexData(resourceDescriptions); referenceFinder.setConverter(get(TargetURIConverter.class)); referenceFinder.setDelegate(get(org.eclipse.xtext.findReferences.IReferenceFinder.class)); referenceFinder.setResourceServiceProviderRegistry(get(IResourceServiceProvider.Registry.class)); localResourceAccess = new SimpleLocalResourceAccess(resourceSet); acceptor = new CheckingAcceptor(); }
Example #2
Source File: DefaultReferenceFinderTest.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
protected void findAllRefs(EObject target, IReferenceFinder.ILocalResourceAccess localResourceAccess) { referenceFinder.findAllReferences(singleton(EcoreUtil2.getPlatformResourceOrNormalizedURI(target)), localResourceAccess, acceptor, null); }
Example #3
Source File: DefaultReferenceFinderTest.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
protected void findRefs(EObject target, Resource sourceResource, IReferenceFinder.ILocalResourceAccess localResourceAccess) { referenceFinder.findReferences(singleton(EcoreUtil2.getPlatformResourceOrNormalizedURI(target)), singleton(sourceResource.getURI()), localResourceAccess, acceptor, null); }
Example #4
Source File: DelegatingReferenceFinderTest.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
protected void findAllRefs(EObject target, IReferenceFinder.ILocalResourceAccess localResourceAccess) { referenceFinder.findAllReferences(singleton(EcoreUtil2.getPlatformResourceOrNormalizedURI(target)), localResourceAccess, acceptor, null); }
Example #5
Source File: DelegatingReferenceFinderTest.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
protected void findRefs(EObject target, Resource sourceResource, IReferenceFinder.ILocalResourceAccess localResourceAccess) { referenceFinder.findReferences(singleton(EcoreUtil2.getPlatformResourceOrNormalizedURI(target)), singleton(sourceResource.getURI()), localResourceAccess, acceptor, null); }
Example #6
Source File: DotUiModule.java From gef with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IReferenceFinder> bindIReferenceFinder() { return DotUiReferenceFinder.class; }
Example #7
Source File: XtendUiModule.java From xtext-xtend with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IReferenceFinder> bindIReferenceFinder() { return DelegatingReferenceFinder.class; }