Java 类org.eclipse.xtext.ui.resource.XtextResourceSetProvider 实例源码

项目:dsl-devkit    文件:CheckMarkerUpdateJob.java   
/**
 * Gets the resource set. Note that not all sources must be part of the same resource set.
 * 
 * @param storage2UriMapper
 *          the storage2 uri mapper
 * @param uri
 *          the uri
 * @return the resource set
 */
private ResourceSet getResourceSet(final IStorage2UriMapper storage2UriMapper, final URI uri) {
  Iterable<Pair<IStorage, IProject>> storages = storage2UriMapper.getStorages(uri);
  if (!Iterables.isEmpty(storages)) {
    IProject project = Iterables.get(storages, 0).getSecond();
    XtextResourceSetProvider resourceSetProvider = this.serviceProviderRegistry.getResourceServiceProvider(uri).get(XtextResourceSetProvider.class);
    return resourceSetProvider.get(project);
  }
  return null;
}
项目:statecharts    文件:SGenUiModule.java   
@Override
public Class<? extends IResourceSetProvider> bindIResourceSetProvider() {
    if (Access.getJdtHelper().get().isJavaCoreAvailable()) {
        return XtextResourceSetProvider.class;
    } else {
        return SimpleResourceSetProvider.class;
    }
}
项目:statecharts    文件:STextUiModule.java   
public Class<? extends IResourceSetProvider> bindIResourceSetProvider() {
    if (Access.getJdtHelper().get().isJavaCoreAvailable()) {
        return XtextResourceSetProvider.class;
    } else {
        return SimpleResourceSetProvider.class;
    }
}
项目:statecharts    文件:ExpressionsUiModule.java   
@Override
public Class<? extends IResourceSetProvider> bindIResourceSetProvider() {
    if (Access.getJdtHelper().get().isJavaCoreAvailable()) {
        return XtextResourceSetProvider.class;
    } else {
        return SimpleResourceSetProvider.class;
    }
}
项目:sadlos2    文件:SadlSharedModule.java   
@Override
    protected void configure() {
        bind(ToBeBuiltComputer.class).to(SadlToBeBuiltComputer.class);
        bind(ProjectClasspathChangeListener.class).asEagerSingleton();
        bind(IStorage2UriMapper.class).to(IStorage2UriMapperJdtExtensions.class);
        bind(IStorage2UriMapperJdtExtensions.class).to(Storage2UriMapperJavaImpl.class);
        bind(IResourceSetProvider.class).to(XtextResourceSetProvider.class);
//      bind(TypeResourceUnloader.class).asEagerSingleton();
        bind(JavaChangeQueueFiller.class).asEagerSingleton();
        bind(StorageAwareTrace.class).to(JarEntryAwareTrace.class);
        bind(DefaultTraceURIConverter.class).to(DefaultUITraceURIConverter.class);
    }
项目:joynr    文件:TestsStandaloneSetup.java   
private Module getStaticTestModule() {
    return new AbstractModule() {

        @Override
        protected void configure() {
            bind(IResourceSetProvider.class).to(XtextResourceSetProvider.class);
        }
    };
}
项目:bts    文件:DefaultUiModule.java   
public Class<? extends IResourceSetProvider> bindIResourceSetProvider() {
    return XtextResourceSetProvider.class;
}