當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。