当前位置: 首页>>代码示例>>Java>>正文


Java ResourceSetBasedResourceDescriptions类代码示例

本文整理汇总了Java中org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions的典型用法代码示例。如果您正苦于以下问题:Java ResourceSetBasedResourceDescriptions类的具体用法?Java ResourceSetBasedResourceDescriptions怎么用?Java ResourceSetBasedResourceDescriptions使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ResourceSetBasedResourceDescriptions类属于org.eclipse.xtext.resource.impl包,在下文中一共展示了ResourceSetBasedResourceDescriptions类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getGuiceBindingsRt

import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions; //导入依赖的package包/类
@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();
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:20,代码来源:BuilderIntegrationFragment.java

示例2: setContext

import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions; //导入依赖的package包/类
@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;
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:21,代码来源:LiveShadowedChunkedResourceDescriptions.java

示例3: testContainsURI

import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions; //导入依赖的package包/类
@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)));
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:26,代码来源:LiveShadowedAllContainerStateTest.java

示例4: configure

import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions; //导入依赖的package包/类
@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());
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:12,代码来源:StandaloneBuilderModule.java

示例5: getResourceSet

import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions; //导入依赖的package包/类
/**
 * @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");
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:12,代码来源:ResourceSetBasedAllContainersStateProvider.java

示例6: setup

import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions; //导入依赖的package包/类
@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);
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:15,代码来源:ModelSequencerTest.java

示例7: configureIResourceDescriptions

import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions; //导入依赖的package包/类
public void configureIResourceDescriptions(Binder binder) {
	binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
}
 
开发者ID:rehne93,项目名称:pokemon-tcgo-deck-generator,代码行数:4,代码来源:AbstractPkmntcgoRuntimeModule.java

示例8: configureIResourceDescriptionsPersisted

import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions; //导入依赖的package包/类
public void configureIResourceDescriptionsPersisted(Binder binder) {
	binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
}
 
开发者ID:rehne93,项目名称:pokemon-tcgo-deck-generator,代码行数:4,代码来源:AbstractPkmntcgoRuntimeModule.java


注:本文中的org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。