use of org.eclipse.xtext.ui.editor.findrefs.DefaultReferenceFinder in project xtext-eclipse by eclipse.
the class DefaultReferenceFinderTest 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 DefaultReferenceFinder(resourceDescriptions, get(IResourceServiceProvider.Registry.class), get(TargetURIConverter.class));
localResourceAccess = new SimpleLocalResourceAccess(resourceSet);
acceptor = new CheckingAcceptor();
}
Aggregations