Migrated to XText 2.14 and Photon for RDL Editor RCP

This commit is contained in:
2018-06-02 23:41:27 +02:00
parent cc6d106838
commit 9a55dd5a21
165 changed files with 2419 additions and 662 deletions

View File

@@ -1,12 +1,11 @@
/*
* generated by Xtext 2.13.0
* generated by Xtext 2.14.0
*/
package com.minres.rdl.ui.internal;
import com.google.common.collect.Maps;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Module;
import com.minres.rdl.RDLRuntimeModule;
import com.minres.rdl.ui.RDLUiModule;
import java.util.Collections;
@@ -61,10 +60,10 @@ public class RdlActivator extends AbstractUIPlugin {
protected Injector createInjector(String language) {
try {
Module runtimeModule = getRuntimeModule(language);
Module sharedStateModule = getSharedStateModule();
Module uiModule = getUiModule(language);
Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
com.google.inject.Module runtimeModule = getRuntimeModule(language);
com.google.inject.Module sharedStateModule = getSharedStateModule();
com.google.inject.Module uiModule = getUiModule(language);
com.google.inject.Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
return Guice.createInjector(mergedModule);
} catch (Exception e) {
logger.error("Failed to create injector for " + language);
@@ -73,21 +72,21 @@ public class RdlActivator extends AbstractUIPlugin {
}
}
protected Module getRuntimeModule(String grammar) {
protected com.google.inject.Module getRuntimeModule(String grammar) {
if (COM_MINRES_RDL_RDL.equals(grammar)) {
return new RDLRuntimeModule();
}
throw new IllegalArgumentException(grammar);
}
protected Module getUiModule(String grammar) {
protected com.google.inject.Module getUiModule(String grammar) {
if (COM_MINRES_RDL_RDL.equals(grammar)) {
return new RDLUiModule(this);
}
throw new IllegalArgumentException(grammar);
}
protected Module getSharedStateModule() {
protected com.google.inject.Module getSharedStateModule() {
return new SharedStateModule();
}