use of org.eclipse.xtext.ui.editor.findrefs.SimpleLocalResourceAccess in project xtext-eclipse by eclipse.
the class AbstractHierarchyBuilderTest method configureBuilderWith.
protected <T extends AbstractHierarchyBuilder> T configureBuilderWith(final T hierarchyBuilder, final ResourceSet resourceSet) {
SimpleLocalResourceAccess _simpleLocalResourceAccess = new SimpleLocalResourceAccess(resourceSet);
hierarchyBuilder.setResourceAccess(_simpleLocalResourceAccess);
hierarchyBuilder.setIndexData(this.resourceDescriptionsProvider.getResourceDescriptions(resourceSet));
return hierarchyBuilder;
}
use of org.eclipse.xtext.ui.editor.findrefs.SimpleLocalResourceAccess 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();
}
use of org.eclipse.xtext.ui.editor.findrefs.SimpleLocalResourceAccess 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