use of org.eclipse.xtext.ui.resource.IResourceSetProvider in project xtext-eclipse by eclipse.
the class StratumBreakpointAdapterFactory method getClassNamePattern.
protected String getClassNamePattern(IResource res) {
if (!(res instanceof IStorage))
return null;
URI uri = uriMapper.getUri((IStorage) res);
IResourceServiceProvider provider = providerRegistry.getResourceServiceProvider(uri);
if (provider == null)
return null;
IResourceSetProvider resourceSetProvider = provider.get(IResourceSetProvider.class);
ResourceSet set = resourceSetProvider.get(res.getProject());
Resource resource = set.getResource(uri, true);
if (resource instanceof XtextResource) {
return getClassNamePattern((XtextResource) resource);
}
return null;
}
use of org.eclipse.xtext.ui.resource.IResourceSetProvider in project n4js by eclipse.
the class AbstractN4JSContentAssistTest method getResourceSet.
private XtextResourceSet getResourceSet() {
IResourceSetProvider resourceSetProvider = get(IResourceSetProvider.class);
ResourceSet result = resourceSetProvider.get(getJSProject());
return (XtextResourceSet) result;
}
Aggregations