use of org.eclipse.xtext.ui.editor.findrefs.DelegatingReferenceFinder in project xtext-eclipse by eclipse.
the class DelegatingReferenceFinderTest method setUp.
@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();
}
Aggregations