Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorStéphane Bégaudeau2015-10-22 13:43:09 +0000
committerStéphane Bégaudeau2015-10-22 13:51:12 +0000
commit37fc723388edb67bec3585c53458694ff1302330 (patch)
treefec5214a33f1617f0c70d71b58fb71b8a226f7a1 /tests
parentfb1715216a928d3700b98690aea20b8b7d33f88a (diff)
downloadorg.eclipse.eef-37fc723388edb67bec3585c53458694ff1302330.tar.gz
org.eclipse.eef-37fc723388edb67bec3585c53458694ff1302330.tar.xz
org.eclipse.eef-37fc723388edb67bec3585c53458694ff1302330.zip
Introduce the first version of the Expression Xtext DSL
Change-Id: Ibdb93a1528180f7ee4b9b12da54e341696b87e70 Signed-off-by: Stéphane Bégaudeau <stephane.begaudeau@obeo.fr>
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.sirius.expression.dsl.tests/.classpath9
-rw-r--r--tests/org.eclipse.sirius.expression.dsl.tests/.project34
-rw-r--r--tests/org.eclipse.sirius.expression.dsl.tests/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--tests/org.eclipse.sirius.expression.dsl.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tests/org.eclipse.sirius.expression.dsl.tests/META-INF/MANIFEST.MF24
-rw-r--r--tests/org.eclipse.sirius.expression.dsl.tests/build.properties5
-rw-r--r--tests/org.eclipse.sirius.expression.dsl.tests/org.eclipse.sirius.expression.dsl.tests.launch13
-rw-r--r--tests/org.eclipse.sirius.expression.dsl.tests/src-gen/org/eclipse/sirius/expression/dsl/ExpressionDSLInjectorProvider.java48
-rw-r--r--tests/org.eclipse.sirius.expression.dsl.tests/src-gen/org/eclipse/sirius/expression/dsl/ExpressionDSLUiInjectorProvider.java17
9 files changed, 159 insertions, 0 deletions
diff --git a/tests/org.eclipse.sirius.expression.dsl.tests/.classpath b/tests/org.eclipse.sirius.expression.dsl.tests/.classpath
new file mode 100644
index 000000000..9081d4f70
--- /dev/null
+++ b/tests/org.eclipse.sirius.expression.dsl.tests/.classpath
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="src" path="xtend-gen"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.sirius.expression.dsl.tests/.project b/tests/org.eclipse.sirius.expression.dsl.tests/.project
new file mode 100644
index 000000000..f8e7b17bb
--- /dev/null
+++ b/tests/org.eclipse.sirius.expression.dsl.tests/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.sirius.expression.dsl.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.sirius.expression.dsl.tests/.settings/org.eclipse.core.resources.prefs b/tests/org.eclipse.sirius.expression.dsl.tests/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..99f26c020
--- /dev/null
+++ b/tests/org.eclipse.sirius.expression.dsl.tests/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/tests/org.eclipse.sirius.expression.dsl.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.sirius.expression.dsl.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..0c68a61dc
--- /dev/null
+++ b/tests/org.eclipse.sirius.expression.dsl.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/tests/org.eclipse.sirius.expression.dsl.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.sirius.expression.dsl.tests/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..5b9487a95
--- /dev/null
+++ b/tests/org.eclipse.sirius.expression.dsl.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.sirius.expression.dsl.tests
+Bundle-Vendor: My Company
+Bundle-Version: 1.0.0.qualifier
+Bundle-SymbolicName: org.eclipse.sirius.expression.dsl.tests; singleton:=true
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.eclipse.sirius.expression.dsl,
+ org.eclipse.sirius.expression.dsl.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.xtext.junit4,
+ org.eclipse.xtext.xbase.lib,
+ org.eclipse.ui.workbench;resolution:=optional,
+ org.objectweb.asm;bundle-version="[5.0.1,6.0.0)";resolution:=optional
+Import-Package: org.apache.log4j,
+ org.junit;version="4.5.0",
+ org.junit.runner;version="4.5.0",
+ org.junit.runner.manipulation;version="4.5.0",
+ org.junit.runner.notification;version="4.5.0",
+ org.junit.runners;version="4.5.0",
+ org.junit.runners.model;version="4.5.0",
+ org.hamcrest.core
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Export-Package: org.eclipse.sirius.expression.dsl
diff --git a/tests/org.eclipse.sirius.expression.dsl.tests/build.properties b/tests/org.eclipse.sirius.expression.dsl.tests/build.properties
new file mode 100644
index 000000000..c22eebe28
--- /dev/null
+++ b/tests/org.eclipse.sirius.expression.dsl.tests/build.properties
@@ -0,0 +1,5 @@
+source.. = src/,\
+ src-gen/,\
+ xtend-gen/
+bin.includes = META-INF/,\
+ .
diff --git a/tests/org.eclipse.sirius.expression.dsl.tests/org.eclipse.sirius.expression.dsl.tests.launch b/tests/org.eclipse.sirius.expression.dsl.tests/org.eclipse.sirius.expression.dsl.tests.launch
new file mode 100644
index 000000000..377fd6b45
--- /dev/null
+++ b/tests/org.eclipse.sirius.expression.dsl.tests/org.eclipse.sirius.expression.dsl.tests.launch
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.sirius.expression.dsl.tests"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=org.eclipse.sirius.expression.dsl.tests"/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.sirius.expression.dsl.tests"/>
+</launchConfiguration>
diff --git a/tests/org.eclipse.sirius.expression.dsl.tests/src-gen/org/eclipse/sirius/expression/dsl/ExpressionDSLInjectorProvider.java b/tests/org.eclipse.sirius.expression.dsl.tests/src-gen/org/eclipse/sirius/expression/dsl/ExpressionDSLInjectorProvider.java
new file mode 100644
index 000000000..1ec490a01
--- /dev/null
+++ b/tests/org.eclipse.sirius.expression.dsl.tests/src-gen/org/eclipse/sirius/expression/dsl/ExpressionDSLInjectorProvider.java
@@ -0,0 +1,48 @@
+/*
+ * generated by Xtext
+ */
+package org.eclipse.sirius.expression.dsl;
+
+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 ExpressionDSLInjectorProvider 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 ExpressionDSLStandaloneSetup().createInjectorAndDoEMFRegistration();
+ }
+
+ @Override
+ public void restoreRegistry() {
+ stateBeforeInjectorCreation.restoreGlobalState();
+ }
+
+ @Override
+ public void setupRegistry() {
+ getInjector();
+ stateAfterInjectorCreation.restoreGlobalState();
+ }
+}
diff --git a/tests/org.eclipse.sirius.expression.dsl.tests/src-gen/org/eclipse/sirius/expression/dsl/ExpressionDSLUiInjectorProvider.java b/tests/org.eclipse.sirius.expression.dsl.tests/src-gen/org/eclipse/sirius/expression/dsl/ExpressionDSLUiInjectorProvider.java
new file mode 100644
index 000000000..439f58e07
--- /dev/null
+++ b/tests/org.eclipse.sirius.expression.dsl.tests/src-gen/org/eclipse/sirius/expression/dsl/ExpressionDSLUiInjectorProvider.java
@@ -0,0 +1,17 @@
+/*
+ * generated by Xtext
+ */
+package org.eclipse.sirius.expression.dsl;
+
+import org.eclipse.xtext.junit4.IInjectorProvider;
+
+import com.google.inject.Injector;
+
+public class ExpressionDSLUiInjectorProvider implements IInjectorProvider {
+
+ @Override
+ public Injector getInjector() {
+ return org.eclipse.sirius.expression.dsl.ui.internal.ExpressionDSLActivator.getInstance().getInjector("org.eclipse.sirius.expression.dsl.ExpressionDSL");
+ }
+
+}

Back to the top