Java 类org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions 实例源码

项目:xtext-extras    文件:BuilderIntegrationFragment.java   
@Override
public Set<Binding> getGuiceBindingsRt(Grammar grammar) {
    return new BindFactory()
    .addTypeToType(IContainer.Manager.class.getName(), StateBasedContainerManager.class.getName())
    .addTypeToType(IAllContainersState.Provider.class.getName(),
            org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider.class.getName())
    .addConfiguredBinding(
                IResourceDescriptions.class.getName(),
                "binder.bind(" + IResourceDescriptions.class.getName() + ".class"
                        + ").to("
                        + ResourceSetBasedResourceDescriptions.class.getName() + ".class)")
        .addConfiguredBinding(
                IResourceDescriptions.class.getName() + "Persisted",
                "binder.bind("+ IResourceDescriptions.class.getName() + ".class"
                        + ").annotatedWith(com.google.inject.name.Names.named("
                        + "org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to("
                        + ResourceSetBasedResourceDescriptions.class.getName() + ".class)")
        .getBindings();
}
项目:xtext-core    文件:LiveShadowedChunkedResourceDescriptions.java   
@Override
public void setContext(final Notifier ctx) {
  IResourceDescriptions _localDescriptions = this.getLocalDescriptions();
  final Procedure1<ResourceSetBasedResourceDescriptions> _function = (ResourceSetBasedResourceDescriptions it) -> {
    it.setContext(ctx);
    it.setData(null);
  };
  ObjectExtensions.<ResourceSetBasedResourceDescriptions>operator_doubleArrow(((ResourceSetBasedResourceDescriptions) _localDescriptions), _function);
  final ResourceSet resourceSet = EcoreUtil2.getResourceSet(ctx);
  this.setGlobalDescriptions(ChunkedResourceDescriptions.findInEmfObject(resourceSet));
  IProjectConfig _projectConfig = null;
  if (this.projectConfigProvider!=null) {
    _projectConfig=this.projectConfigProvider.getProjectConfig(resourceSet);
  }
  IWorkspaceConfig _workspaceConfig = null;
  if (_projectConfig!=null) {
    _workspaceConfig=_projectConfig.getWorkspaceConfig();
  }
  this.workspaceConfig = _workspaceConfig;
}
项目:xtext-core    文件:LiveShadowedAllContainerStateTest.java   
@Test
public void testContainsURI() {
    String fileExtension = fep.getPrimaryFileExtension();
    XtextResourceSet xtextResourceSet1 = rsp.get();
    xtextResourceSet1.createResource(URI.createURI("/a/x." + fileExtension));
    xtextResourceSet1.createResource(URI.createURI("/b/x1." + fileExtension));
    ResourceSetBasedResourceDescriptions liveState = new ResourceSetBasedResourceDescriptions();
    liveState.setContext(xtextResourceSet1);
    liveState.setRegistry(registry);
    Multimap<String, URI> container2Uris = ArrayListMultimap.create();
    container2Uris.put("a", URI.createURI("/a/x." + fileExtension));
    container2Uris.put("a", URI.createURI("/a/y." + fileExtension));
    container2Uris.put("b", URI.createURI("/b/x1." + fileExtension));
    container2Uris.put("b", URI.createURI("/b/x2." + fileExtension));
    IAllContainersState containersState = containerStateProvider.get(liveState,
            new FakeAllContainerState(container2Uris));
    assertTrue(containersState.containsURI("a", URI.createURI("/a/x." + fileExtension)));
    assertTrue(containersState.containsURI("a", URI.createURI("/a/y." + fileExtension)));
    assertFalse(containersState.containsURI("b", URI.createURI("/a/x." + fileExtension)));
    assertFalse(containersState.containsURI("b", URI.createURI("/a/y." + fileExtension)));
    assertTrue(containersState.containsURI("b", URI.createURI("/b/x1." + fileExtension)));
    assertTrue(containersState.containsURI("b", URI.createURI("/b/x2." + fileExtension)));
    assertFalse(containersState.containsURI("a", URI.createURI("/b/x1." + fileExtension)));
    assertFalse(containersState.containsURI("a", URI.createURI("/b/x2." + fileExtension)));
}
项目:xtext-extras    文件:StandaloneBuilderModule.java   
@Override
protected void configure() {
  this.<IResourceDescriptions>bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(ResourceSetBasedResourceDescriptions.class);
  this.<IResourceDescriptions>bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.LIVE_SCOPE)).to(ResourceSetBasedResourceDescriptions.class);
  this.<IResourceDescriptions>bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
  this.<IResourceDescriptions>bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
  this.<IIssueHandler>bind(IIssueHandler.class).to(this.bindIIssueHandler());
  this.<AbstractFileSystemAccess>bind(AbstractFileSystemAccess.class).to(this.bindJavaIoFileSystemAccess());
  this.<IJavaCompiler>bind(IJavaCompiler.class).to(this.bindIJavaCompiler());
  this.<IEncodingProvider>bind(IEncodingProvider.class).to(this.bindIEncodingProvider());
}
项目:xtext-core    文件:ResourceSetBasedAllContainersStateProvider.java   
/**
 * @since 2.4
 */
protected ResourceSet getResourceSet(IResourceDescriptions context) {
    if (context instanceof ResourceSetBasedResourceDescriptions) 
        return ((ResourceSetBasedResourceDescriptions) context).getResourceSet();
    else if (context instanceof EagerResourceSetBasedResourceDescriptions) 
        return ((EagerResourceSetBasedResourceDescriptions) context).getResourceSet();
    String contextType = context == null ? "null" : context.getClass().getName();
    throw new IllegalStateException("Passed " + contextType + " is not based on a resource set");
}
项目:statecharts    文件:ModelSequencerTest.java   
@Before
public void setup() {
    Module m = new Module(){
        @Override
        public void configure(Binder binder) {
            binder.bind(INamingService.class).to(DefaultNamingService.class);
            binder.bind(IQualifiedNameProvider.class).to(SGraphNameProvider.class);
            binder.bind(ITypeSystem.class).toInstance(GenericTypeSystem.getInstance());
            binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
        }
    };
    Injector injector = Guice.createInjector(m);
    injector.injectMembers(this);
}
项目:pokemon-tcgo-deck-generator    文件:AbstractPkmntcgoRuntimeModule.java   
public void configureIResourceDescriptions(Binder binder) {
    binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
}
项目:pokemon-tcgo-deck-generator    文件:AbstractPkmntcgoRuntimeModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
}
项目:n4js    文件:AbstractRegularExpressionRuntimeModule.java   
public void configureIResourceDescriptions(Binder binder) {
    binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
}
项目:n4js    文件:AbstractRegularExpressionRuntimeModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
}
项目:n4js    文件:AbstractN4JSRuntimeModule.java   
public void configureIResourceDescriptions(Binder binder) {
    binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
}
项目:n4js    文件:AbstractN4JSRuntimeModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
}
项目:n4js    文件:AbstractN4MFRuntimeModule.java   
public void configureIResourceDescriptions(Binder binder) {
    binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
}
项目:n4js    文件:AbstractN4MFRuntimeModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
}
项目:Xtext_Xtend_HTML_Generator    文件:AbstractMyDslRuntimeModule.java   
public void configureIResourceDescriptions(Binder binder) {
    binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
}
项目:Xtext_Xtend_HTML_Generator    文件:AbstractMyDslRuntimeModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
}
项目:bromium    文件:AbstractBromiumRuntimeModule.java   
public void configureIResourceDescriptions(Binder binder) {
    binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
}
项目:bromium    文件:AbstractBromiumRuntimeModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
}
项目:gw4e.project    文件:AbstractDSLPoliciesRuntimeModule.java   
public void configureIResourceDescriptions(Binder binder) {
    binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
}
项目:gw4e.project    文件:AbstractDSLPoliciesRuntimeModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
}
项目:lcdsl    文件:AbstractLcDslRuntimeModule.java   
public void configureIResourceDescriptions(Binder binder) {
    binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
}
项目:lcdsl    文件:AbstractLcDslRuntimeModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
}
项目:gemoc-studio    文件:AbstractDslRuntimeModule.java   
public void configureIResourceDescriptions(Binder binder) {
    binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
}
项目:gemoc-studio    文件:AbstractDslRuntimeModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
}
项目:org.xtext.dsl.restaurante    文件:AbstractRestauranteRuntimeModule.java   
public void configureIResourceDescriptions(Binder binder) {
    binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
}
项目:org.xtext.dsl.restaurante    文件:AbstractRestauranteRuntimeModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
}
项目:OCCI-Studio    文件:AbstractOCCIRuntimeModule.java   
public void configureIResourceDescriptions(Binder binder) {
    binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
}
项目:OCCI-Studio    文件:AbstractOCCIRuntimeModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
}
项目:xtext-extras    文件:AbstractPureXbaseRuntimeModule.java   
public void configureIResourceDescriptions(Binder binder) {
    binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
}
项目:xtext-extras    文件:AbstractPureXbaseRuntimeModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
}
项目:xtext-extras    文件:AbstractXbaseRuntimeModule.java   
public void configureIResourceDescriptions(Binder binder) {
    binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
}
项目:xtext-extras    文件:AbstractXbaseRuntimeModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
}
项目:xtext-extras    文件:AbstractXbaseWithAnnotationsRuntimeModule.java   
public void configureIResourceDescriptions(Binder binder) {
    binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
}
项目:xtext-extras    文件:AbstractXbaseWithAnnotationsRuntimeModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
}
项目:xtext-extras    文件:AbstractBuilderTestLanguageRuntimeModule.java   
public void configureIResourceDescriptions(Binder binder) {
    binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
}
项目:xtext-extras    文件:AbstractBuilderTestLanguageRuntimeModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
}
项目:xtext-extras    文件:AbstractBug462047LangRuntimeModule.java   
public void configureIResourceDescriptions(Binder binder) {
    binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
}
项目:xtext-extras    文件:AbstractBug462047LangRuntimeModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
}
项目:xtext-extras    文件:AbstractXImportSectionTestLangRuntimeModule.java   
public void configureIResourceDescriptions(Binder binder) {
    binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
}
项目:xtext-extras    文件:AbstractXImportSectionTestLangRuntimeModule.java   
public void configureIResourceDescriptionsPersisted(Binder binder) {
    binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
}