mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 08:18:55 +00:00
make sure WithTransient Package is always registered
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
This commit is contained in:
parent
3072c95bee
commit
d317854941
2 changed files with 28 additions and 0 deletions
|
@ -7,6 +7,9 @@
|
|||
*/
|
||||
package org.eclipse.xtext.ide.tests.testlanguage
|
||||
|
||||
import com.google.inject.Injector
|
||||
import org.eclipse.emf.ecore.EPackage
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithtransientPackage
|
||||
|
||||
/**
|
||||
* Initialization support for running Xtext languages without Equinox extension registry.
|
||||
|
@ -16,4 +19,14 @@ class PartialSerializationTestLanguageStandaloneSetup extends PartialSerializati
|
|||
def static void doSetup() {
|
||||
new PartialSerializationTestLanguageStandaloneSetup().createInjectorAndDoEMFRegistration()
|
||||
}
|
||||
|
||||
override register(Injector injector) {
|
||||
super.register(injector)
|
||||
if (!EPackage.Registry.INSTANCE.containsKey(
|
||||
"http://www.eclipse.org/xtext/ide/tests/testlanguage/mm/withtransient")) {
|
||||
EPackage.Registry.INSTANCE.put("http://www.eclipse.org/xtext/ide/tests/testlanguage/mm/withtransient",
|
||||
WithtransientPackage.eINSTANCE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,7 +7,10 @@
|
|||
*/
|
||||
package org.eclipse.xtext.ide.tests.testlanguage;
|
||||
|
||||
import com.google.inject.Injector;
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.PartialSerializationTestLanguageStandaloneSetupGenerated;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithtransientPackage;
|
||||
|
||||
/**
|
||||
* Initialization support for running Xtext languages without Equinox extension registry.
|
||||
|
@ -17,4 +20,16 @@ public class PartialSerializationTestLanguageStandaloneSetup extends PartialSeri
|
|||
public static void doSetup() {
|
||||
new PartialSerializationTestLanguageStandaloneSetup().createInjectorAndDoEMFRegistration();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void register(final Injector injector) {
|
||||
super.register(injector);
|
||||
boolean _containsKey = EPackage.Registry.INSTANCE.containsKey(
|
||||
"http://www.eclipse.org/xtext/ide/tests/testlanguage/mm/withtransient");
|
||||
boolean _not = (!_containsKey);
|
||||
if (_not) {
|
||||
EPackage.Registry.INSTANCE.put("http://www.eclipse.org/xtext/ide/tests/testlanguage/mm/withtransient",
|
||||
WithtransientPackage.eINSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue