Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2015-03-24 15:16:58 -0400
committerCamille Letavernier2015-03-24 15:16:58 -0400
commitd27f528c9faa0fa974639fb788604236b11be838 (patch)
tree041aa1a55783fb213681816757ed2db1a2c67bb3 /plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.tests
parent3b32eb2cd4fe0c38b5aa09b8e7fb36ef17bff5b7 (diff)
downloadorg.eclipse.papyrus-d27f528c9faa0fa974639fb788604236b11be838.tar.gz
org.eclipse.papyrus-d27f528c9faa0fa974639fb788604236b11be838.tar.xz
org.eclipse.papyrus-d27f528c9faa0fa974639fb788604236b11be838.zip
455190: [CSS 3] Update the CSS X-Text Grammar to CSS 3
https://bugs.eclipse.org/bugs/show_bug.cgi?id=455190 - Regenerate the CSS3 Editor to match the latest XText version
Diffstat (limited to 'plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.tests')
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/CSSInjectorProvider.java48
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/CSSUiInjectorProvider.java17
2 files changed, 65 insertions, 0 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/CSSInjectorProvider.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/CSSInjectorProvider.java
new file mode 100644
index 00000000000..9e63dc3eedc
--- /dev/null
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/CSSInjectorProvider.java
@@ -0,0 +1,48 @@
+/*
+ * generated by Xtext
+ */
+package org.eclipse.papyrus.infra.gmfdiag.css3;
+
+import org.eclipse.xtext.junit4.GlobalRegistries;
+import org.eclipse.xtext.junit4.GlobalRegistries.GlobalStateMemento;
+import org.eclipse.xtext.junit4.IInjectorProvider;
+import org.eclipse.xtext.junit4.IRegistryConfigurator;
+
+import com.google.inject.Injector;
+
+public class CSSInjectorProvider implements IInjectorProvider, IRegistryConfigurator {
+
+ protected GlobalStateMemento stateBeforeInjectorCreation;
+ protected GlobalStateMemento stateAfterInjectorCreation;
+ protected Injector injector;
+
+ static {
+ GlobalRegistries.initializeDefaults();
+ }
+
+ @Override
+ public Injector getInjector()
+ {
+ if (injector == null) {
+ stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
+ this.injector = internalCreateInjector();
+ stateAfterInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
+ }
+ return injector;
+ }
+
+ protected Injector internalCreateInjector() {
+ return new CSSStandaloneSetup().createInjectorAndDoEMFRegistration();
+ }
+
+ @Override
+ public void restoreRegistry() {
+ stateBeforeInjectorCreation.restoreGlobalState();
+ }
+
+ @Override
+ public void setupRegistry() {
+ getInjector();
+ stateAfterInjectorCreation.restoreGlobalState();
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/CSSUiInjectorProvider.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/CSSUiInjectorProvider.java
new file mode 100644
index 00000000000..6ecd68de5c8
--- /dev/null
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css3.xtext.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/css3/CSSUiInjectorProvider.java
@@ -0,0 +1,17 @@
+/*
+ * generated by Xtext
+ */
+package org.eclipse.papyrus.infra.gmfdiag.css3;
+
+import org.eclipse.xtext.junit4.IInjectorProvider;
+
+import com.google.inject.Injector;
+
+public class CSSUiInjectorProvider implements IInjectorProvider {
+
+ @Override
+ public Injector getInjector() {
+ return org.eclipse.papyrus.infra.gmfdiag.css3.ui.internal.CSSActivator.getInstance().getInjector("org.eclipse.papyrus.infra.gmfdiag.css3.CSS");
+ }
+
+}

Back to the top