diff options
author | Henrik Rentz-Reichert | 2012-11-16 09:29:31 +0000 |
---|---|---|
committer | Henrik Rentz-Reichert | 2012-11-16 09:29:31 +0000 |
commit | ad79252cc7a398521b73d5a32002c8eb9d66f1b3 (patch) | |
tree | 79dca8cbe4fbcf563c6c6fc47bdbe06a815fd3fb /tests | |
parent | 16b74d79d7ff48745e129b99a3443c4e5b12e8ab (diff) | |
download | org.eclipse.etrice-ad79252cc7a398521b73d5a32002c8eb9d66f1b3.tar.gz org.eclipse.etrice-ad79252cc7a398521b73d5a32002c8eb9d66f1b3.tar.xz org.eclipse.etrice-ad79252cc7a398521b73d5a32002c8eb9d66f1b3.zip |
[core.etphys, core.etmap] new physical and mapping models
Diffstat (limited to 'tests')
10 files changed, 169 insertions, 3 deletions
diff --git a/tests/org.eclipse.etrice.core.etmap.tests/.classpath b/tests/org.eclipse.etrice.core.etmap.tests/.classpath new file mode 100644 index 000000000..e5fbd3dd2 --- /dev/null +++ b/tests/org.eclipse.etrice.core.etmap.tests/.classpath @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.etrice.core.etmap.tests/.gitignore b/tests/org.eclipse.etrice.core.etmap.tests/.gitignore new file mode 100644 index 000000000..092357e47 --- /dev/null +++ b/tests/org.eclipse.etrice.core.etmap.tests/.gitignore @@ -0,0 +1 @@ +bin
diff --git a/tests/org.eclipse.etrice.core.etmap.tests/.project b/tests/org.eclipse.etrice.core.etmap.tests/.project new file mode 100644 index 000000000..05fc27921 --- /dev/null +++ b/tests/org.eclipse.etrice.core.etmap.tests/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.etrice.core.etmap.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>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.etrice.core.etmap.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.etrice.core.etmap.tests/META-INF/MANIFEST.MF new file mode 100644 index 000000000..ba724467a --- /dev/null +++ b/tests/org.eclipse.etrice.core.etmap.tests/META-INF/MANIFEST.MF @@ -0,0 +1,22 @@ +Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.etrice.core.etmap.tests
+Bundle-Vendor: eTrice (Incubation)
+Bundle-Version: 0.3.0.qualifier
+Bundle-SymbolicName: org.eclipse.etrice.core.etmap.tests; singleton:=true
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.eclipse.etrice.core.etmap;bundle-version="0.3.0",
+ org.eclipse.etrice.core.etmap.ui;bundle-version="0.3.0",
+ org.eclipse.core.runtime,
+ org.eclipse.xtext.junit4,
+ org.eclipse.ui.workbench;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: J2SE-1.5
+Export-Package: org.eclipse.etrice.core.etmap
diff --git a/tests/org.eclipse.etrice.core.etmap.tests/about.html b/tests/org.eclipse.etrice.core.etmap.tests/about.html new file mode 100644 index 000000000..f47dbddbb --- /dev/null +++ b/tests/org.eclipse.etrice.core.etmap.tests/about.html @@ -0,0 +1,28 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file diff --git a/tests/org.eclipse.etrice.core.etmap.tests/build.properties b/tests/org.eclipse.etrice.core.etmap.tests/build.properties new file mode 100644 index 000000000..e10dcceb6 --- /dev/null +++ b/tests/org.eclipse.etrice.core.etmap.tests/build.properties @@ -0,0 +1,5 @@ +source.. = src/,\ + src-gen/ +bin.includes = META-INF/,\ + .,\ + plugin.xml
\ No newline at end of file diff --git a/tests/org.eclipse.etrice.core.etmap.tests/org.eclipse.etrice.core.etmap.tests.launch b/tests/org.eclipse.etrice.core.etmap.tests/org.eclipse.etrice.core.etmap.tests.launch new file mode 100644 index 000000000..dba7d060e --- /dev/null +++ b/tests/org.eclipse.etrice.core.etmap.tests/org.eclipse.etrice.core.etmap.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.etrice.core.etmap.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.etrice.core.etmap.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.etrice.core.etmap.tests"/>
+</launchConfiguration>
diff --git a/tests/org.eclipse.etrice.core.etmap.tests/src-gen/org/eclipse/etrice/core/etmap/ETMapInjectorProvider.java b/tests/org.eclipse.etrice.core.etmap.tests/src-gen/org/eclipse/etrice/core/etmap/ETMapInjectorProvider.java new file mode 100644 index 000000000..516bdc63f --- /dev/null +++ b/tests/org.eclipse.etrice.core.etmap.tests/src-gen/org/eclipse/etrice/core/etmap/ETMapInjectorProvider.java @@ -0,0 +1,45 @@ +/* +* generated by Xtext +*/ +package org.eclipse.etrice.core.etmap; + +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 ETMapInjectorProvider implements IInjectorProvider, IRegistryConfigurator { + + protected GlobalStateMemento stateBeforeInjectorCreation; + protected GlobalStateMemento stateAfterInjectorCreation; + protected Injector injector; + + static { + GlobalRegistries.initializeDefaults(); + } + + public Injector getInjector() + { + if (injector == null) { + stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); + this.injector = internalCreateInjector(); + stateAfterInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); + } + return injector; + } + + protected Injector internalCreateInjector() { + return new ETMapStandaloneSetup().createInjectorAndDoEMFRegistration(); + } + + public void restoreRegistry() { + stateBeforeInjectorCreation.restoreGlobalState(); + } + + public void setupRegistry() { + getInjector(); + stateAfterInjectorCreation.restoreGlobalState(); + } +} diff --git a/tests/org.eclipse.etrice.core.etmap.tests/src-gen/org/eclipse/etrice/core/etmap/ETMapUiInjectorProvider.java b/tests/org.eclipse.etrice.core.etmap.tests/src-gen/org/eclipse/etrice/core/etmap/ETMapUiInjectorProvider.java new file mode 100644 index 000000000..3eaa945c1 --- /dev/null +++ b/tests/org.eclipse.etrice.core.etmap.tests/src-gen/org/eclipse/etrice/core/etmap/ETMapUiInjectorProvider.java @@ -0,0 +1,16 @@ +/* +* generated by Xtext +*/ +package org.eclipse.etrice.core.etmap; + +import org.eclipse.xtext.junit4.IInjectorProvider; + +import com.google.inject.Injector; + +public class ETMapUiInjectorProvider implements IInjectorProvider { + + public Injector getInjector() { + return org.eclipse.etrice.core.etmap.ui.internal.ETMapActivator.getInstance().getInjector("org.eclipse.etrice.core.etmap.ETMap"); + } + +} diff --git a/tests/org.eclipse.etrice.core.etphys.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.etrice.core.etphys.tests/META-INF/MANIFEST.MF index 089c1e7cc..d1fb50470 100644 --- a/tests/org.eclipse.etrice.core.etphys.tests/META-INF/MANIFEST.MF +++ b/tests/org.eclipse.etrice.core.etphys.tests/META-INF/MANIFEST.MF @@ -1,11 +1,11 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.etrice.core.etphys.tests
-Bundle-Vendor: My Company
-Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: eTrice (Incubation)
+Bundle-Version: 0.3.0.qualifier
Bundle-SymbolicName: org.eclipse.etrice.core.etphys.tests; singleton:=true
Bundle-ActivationPolicy: lazy
-Require-Bundle: org.eclipse.etrice.core.etphys,
+Require-Bundle: org.eclipse.etrice.core.etphys;bundle-version="0.3.0",
org.eclipse.etrice.core.etphys.ui,
org.eclipse.core.runtime,
org.eclipse.xtext.junit4,
|