本文整理汇总了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);
}
示例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);
}
}
示例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));
}
示例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);
}
示例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));
}
示例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));
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
}));
}