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


Java Modules2类代码示例

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


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

示例1: setup

import org.eclipse.xtext.util.Modules2; //导入依赖的package包/类
@Before
public void setup() {
  ServerModule _serverModule = new ServerModule();
  final Injector injector = Guice.createInjector(Modules2.mixin(_serverModule, new AbstractModule() {
    @Override
    protected void configure() {
      this.<IWorkspaceConfigFactory>bind(IWorkspaceConfigFactory.class).to(MultiProjectWorkspaceConfigFactory.class);
    }
  }));
  injector.injectMembers(this);
  final File workspaceRoot = this.getRoot("test-data");
  File _file = new File(workspaceRoot, "test-project0");
  this.project0 = _file;
  File _file_1 = new File(workspaceRoot, "test-project1");
  this.project1 = _file_1;
  this.project0.mkdir();
  this.project1.mkdir();
  final Procedure2<URI, Iterable<Issue>> _function = (URI $0, Iterable<Issue> $1) -> {
    this.diagnostics.put($0, IterableExtensions.<Issue>toList($1));
  };
  this.workspaceManager.initialize(URI.createFileURI(workspaceRoot.getAbsolutePath()), _function, null);
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:23,代码来源:MultiProjectTest.java

示例2: createInjector

import org.eclipse.xtext.util.Modules2; //导入依赖的package包/类
protected Injector createInjector(String language) {
	try {
		Module runtimeModule = getRuntimeModule(language);
		Module sharedStateModule = getSharedStateModule();
		Module uiModule = getUiModule(language);
		Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
		return Guice.createInjector(mergedModule);
	} catch (Exception e) {
		logger.error("Failed to create injector for " + language);
		logger.error(e.getMessage(), e);
		throw new RuntimeException("Failed to create injector for " + language, e);
	}
}
 
开发者ID:rehne93,项目名称:pokemon-tcgo-deck-generator,代码行数:14,代码来源:PkmntcgoActivator.java

示例3: createInjector

import org.eclipse.xtext.util.Modules2; //导入依赖的package包/类
@Override
public Injector createInjector() {
  BromiumRuntimeModule _bromiumRuntimeModule = new BromiumRuntimeModule();
  BromiumIdeModule _bromiumIdeModule = new BromiumIdeModule();
  BromiumWebModule _bromiumWebModule = new BromiumWebModule();
  return Guice.createInjector(Modules2.mixin(_bromiumRuntimeModule, _bromiumIdeModule, _bromiumWebModule));
}
 
开发者ID:hristo-vrigazov,项目名称:bromium,代码行数:8,代码来源:BromiumWebSetup.java

示例4: createInjector

import org.eclipse.xtext.util.Modules2; //导入依赖的package包/类
@Override
public Injector createInjector()
{
    PrologRuntimeModule runtimeModule = new PrologRuntimeModule();
    PrologIdeaModule ideaModule = new PrologIdeaModule();
    Module mergedModule = Modules2.mixin(runtimeModule, ideaModule);
    return Guice.createInjector(mergedModule);
}
 
开发者ID:mochalog,项目名称:mochalog,代码行数:9,代码来源:PrologStandaloneSetupIdea.java

示例5: createInjector

import org.eclipse.xtext.util.Modules2; //导入依赖的package包/类
@Override
public Injector createInjector() {
  RestauranteRuntimeModule _restauranteRuntimeModule = new RestauranteRuntimeModule();
  RestauranteIdeModule _restauranteIdeModule = new RestauranteIdeModule();
  RestauranteWebModule _restauranteWebModule = new RestauranteWebModule();
  return Guice.createInjector(Modules2.mixin(_restauranteRuntimeModule, _restauranteIdeModule, _restauranteWebModule));
}
 
开发者ID:vicegd,项目名称:org.xtext.dsl.restaurante,代码行数:8,代码来源:RestauranteWebSetup.java

示例6: createInjector

import org.eclipse.xtext.util.Modules2; //导入依赖的package包/类
@Override
public Injector createInjector() {
  XbaseWithAnnotationsRuntimeModule _xbaseWithAnnotationsRuntimeModule = new XbaseWithAnnotationsRuntimeModule();
  XbaseWithAnnotationsIdeModule _xbaseWithAnnotationsIdeModule = new XbaseWithAnnotationsIdeModule();
  return Guice.createInjector(
    Modules2.mixin(_xbaseWithAnnotationsRuntimeModule, _xbaseWithAnnotationsIdeModule));
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:8,代码来源:XbaseWithAnnotationsIdeSetup.java

示例7: internalCreateInjector

import org.eclipse.xtext.util.Modules2; //导入依赖的package包/类
@Override
protected Injector internalCreateInjector() {
	return new TestLanguageStandaloneSetup() {
		@Override
		public Injector createInjector() {
			return Guice.createInjector(Modules2.mixin(createRuntimeModule(), new PartialContentAssistTestLanguageIdeModule()));
		}
	}.createInjectorAndDoEMFRegistration();
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:10,代码来源:PartialContentAssistTestLanguageIdeInjectorProvider.java

示例8: internalCreateInjector

import org.eclipse.xtext.util.Modules2; //导入依赖的package包/类
@Override
protected Injector internalCreateInjector() {
	return new TestLanguageStandaloneSetup() {
		@Override
		public Injector createInjector() {
			return Guice.createInjector(Modules2.mixin(createRuntimeModule(), new TestLanguageIdeModule()));
		}
	}.createInjectorAndDoEMFRegistration();

}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:11,代码来源:TestLanguageIdeInjectorProvider.java

示例9: internalCreateInjector

import org.eclipse.xtext.util.Modules2; //导入依赖的package包/类
@Override
protected Injector internalCreateInjector() {
	return new XtextGrammarTestLanguageStandaloneSetup() {
		@Override
		public Injector createInjector() {
			return Guice.createInjector(Modules2.mixin(createRuntimeModule(), createIdeModule()));
		}

		private XtextGrammarTestLanguageIdeModule createIdeModule() {
			return new XtextGrammarTestLanguageIdeModule();
		}
	}.createInjectorAndDoEMFRegistration();
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:14,代码来源:XtextGrammarTestLanguageIdeInjectorProvider.java

示例10: setUp

import org.eclipse.xtext.util.Modules2; //导入依赖的package包/类
@Before
@Override
public void setUp() throws Exception {
  super.setUp();
  with(Modules2.mixin(new XtextRuntimeModule(), new AbstractModule() {
    @Override
    protected void configure() {
      bind(IFragmentProvider.class).to(TestSelectorFragmentProvider.class);
    }
  }));
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:12,代码来源:AbstractSelectorFragmentProviderTest.java


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