Bug 443791 invoke-aut now accepts -path and -inject arguments.
Example:
invoke-AUT mockupsQ7 -inject [site-injection
"http://build.xored.com/browse/Q7-Q7QUALITY/latest/artifact/PROD/repository"]
-path "C:\Users\vasili\Documents\eclipse-indigo" -args "-nosplash"
-vmargs "-Xmx512m -XX:MaxPermSize=256m"
diff --git a/launching/org.eclipse.rcptt.launching.injection/models/injection.ecore b/launching/org.eclipse.rcptt.launching.injection/models/injection.ecore
index 0f46e12..e21dfa0 100644
--- a/launching/org.eclipse.rcptt.launching.injection/models/injection.ecore
+++ b/launching/org.eclipse.rcptt.launching.injection/models/injection.ecore
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="injection"
- nsURI="http://eclipse.org/rcptt/launching/injection" nsPrefix="org.eclipse.rcptt.launching.injection">
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="injection" nsURI="http://eclipse.org/rcptt/launching/injection"
+ nsPrefix="org.eclipse.rcptt.launching.injection">
<eClassifiers xsi:type="ecore:EClass" name="InjectionConfiguration">
<eStructuralFeatures xsi:type="ecore:EReference" name="entries" upperBound="-1"
eType="#//Entry" containment="true"/>
diff --git a/testing/org.eclipse.rcptt.testing.ecl/META-INF/MANIFEST.MF b/testing/org.eclipse.rcptt.testing.ecl/META-INF/MANIFEST.MF
index f4e794c..b7acd62 100644
--- a/testing/org.eclipse.rcptt.testing.ecl/META-INF/MANIFEST.MF
+++ b/testing/org.eclipse.rcptt.testing.ecl/META-INF/MANIFEST.MF
@@ -1,10 +1,14 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: ECL Commands for Q7 Testing
+Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rcptt.testing.ecl;singleton:=true
Bundle-Version: 1.5.3.qualifier
-Bundle-Vendor: Eclipse RCP Testing Tool Project
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Export-Package: org.eclipse.rcptt.testing.commands,
+ org.eclipse.rcptt.testing.commands.impl
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport,
org.eclipse.rcptt.ecl.core;visibility:=reexport,
diff --git a/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/CommandsFactory.java b/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/CommandsFactory.java
index 7f8f93b..5d466ce 100644
--- a/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/CommandsFactory.java
+++ b/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/CommandsFactory.java
@@ -129,6 +129,15 @@
CleanSelfAUT createCleanSelfAUT();
/**
+ * Returns a new object of class '<em>Site Injection</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Site Injection</em>'.
+ * @generated
+ */
+ SiteInjection createSiteInjection();
+
+ /**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/CommandsPackage.java b/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/CommandsPackage.java
index f3e2541..d6328e8 100644
--- a/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/CommandsPackage.java
+++ b/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/CommandsPackage.java
@@ -315,13 +315,31 @@
int INVOKE_AUT__ARGS = CorePackage.COMMAND_FEATURE_COUNT + 1;
/**
+ * The feature id for the '<em><b>Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOKE_AUT__PATH = CorePackage.COMMAND_FEATURE_COUNT + 2;
+
+ /**
* The feature id for the '<em><b>Vmargs</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int INVOKE_AUT__VMARGS = CorePackage.COMMAND_FEATURE_COUNT + 2;
+ int INVOKE_AUT__VMARGS = CorePackage.COMMAND_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Inject</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOKE_AUT__INJECT = CorePackage.COMMAND_FEATURE_COUNT + 4;
/**
* The number of structural features of the '<em>Invoke AUT</em>' class.
@@ -330,7 +348,7 @@
* @generated
* @ordered
*/
- int INVOKE_AUT_FEATURE_COUNT = CorePackage.COMMAND_FEATURE_COUNT + 3;
+ int INVOKE_AUT_FEATURE_COUNT = CorePackage.COMMAND_FEATURE_COUNT + 5;
/**
* The meta object id for the '{@link org.eclipse.rcptt.testing.commands.impl.FindContextsImpl <em>Find Contexts</em>}' class.
@@ -618,6 +636,61 @@
int CLEAN_SELF_AUT_FEATURE_COUNT = CorePackage.COMMAND_FEATURE_COUNT + 0;
/**
+ * The meta object id for the '{@link org.eclipse.rcptt.testing.commands.impl.SiteInjectionImpl <em>Site Injection</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.rcptt.testing.commands.impl.SiteInjectionImpl
+ * @see org.eclipse.rcptt.testing.commands.impl.CommandsPackageImpl#getSiteInjection()
+ * @generated
+ */
+ int SITE_INJECTION = 11;
+
+ /**
+ * The feature id for the '<em><b>Host</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SITE_INJECTION__HOST = CorePackage.COMMAND__HOST;
+
+ /**
+ * The feature id for the '<em><b>Bindings</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SITE_INJECTION__BINDINGS = CorePackage.COMMAND__BINDINGS;
+
+ /**
+ * The feature id for the '<em><b>Uri</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SITE_INJECTION__URI = CorePackage.COMMAND_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Unit</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SITE_INJECTION__UNIT = CorePackage.COMMAND_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Site Injection</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SITE_INJECTION_FEATURE_COUNT = CorePackage.COMMAND_FEATURE_COUNT + 2;
+
+ /**
* The meta object id for the '<em>Network Recorder</em>' data type.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -625,7 +698,7 @@
* @see org.eclipse.rcptt.testing.commands.impl.CommandsPackageImpl#getNetworkRecorder()
* @generated
*/
- int NETWORK_RECORDER = 11;
+ int NETWORK_RECORDER = 12;
/**
@@ -767,6 +840,17 @@
EAttribute getInvokeAUT_Args();
/**
+ * Returns the meta object for the attribute '{@link org.eclipse.rcptt.testing.commands.InvokeAUT#getPath <em>Path</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Path</em>'.
+ * @see org.eclipse.rcptt.testing.commands.InvokeAUT#getPath()
+ * @see #getInvokeAUT()
+ * @generated
+ */
+ EAttribute getInvokeAUT_Path();
+
+ /**
* Returns the meta object for the attribute '{@link org.eclipse.rcptt.testing.commands.InvokeAUT#getVmargs <em>Vmargs</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -778,6 +862,17 @@
EAttribute getInvokeAUT_Vmargs();
/**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.rcptt.testing.commands.InvokeAUT#getInject <em>Inject</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Inject</em>'.
+ * @see org.eclipse.rcptt.testing.commands.InvokeAUT#getInject()
+ * @see #getInvokeAUT()
+ * @generated
+ */
+ EReference getInvokeAUT_Inject();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.rcptt.testing.commands.FindContexts <em>Find Contexts</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -915,6 +1010,38 @@
EClass getCleanSelfAUT();
/**
+ * Returns the meta object for class '{@link org.eclipse.rcptt.testing.commands.SiteInjection <em>Site Injection</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Site Injection</em>'.
+ * @see org.eclipse.rcptt.testing.commands.SiteInjection
+ * @generated
+ */
+ EClass getSiteInjection();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.rcptt.testing.commands.SiteInjection#getUri <em>Uri</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Uri</em>'.
+ * @see org.eclipse.rcptt.testing.commands.SiteInjection#getUri()
+ * @see #getSiteInjection()
+ * @generated
+ */
+ EAttribute getSiteInjection_Uri();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.eclipse.rcptt.testing.commands.SiteInjection#getUnit <em>Unit</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute list '<em>Unit</em>'.
+ * @see org.eclipse.rcptt.testing.commands.SiteInjection#getUnit()
+ * @see #getSiteInjection()
+ * @generated
+ */
+ EAttribute getSiteInjection_Unit();
+
+ /**
* Returns the meta object for data type '{@link org.eclipse.rcptt.core.recording.NetworkRecorder <em>Network Recorder</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1062,6 +1189,14 @@
EAttribute INVOKE_AUT__ARGS = eINSTANCE.getInvokeAUT_Args();
/**
+ * The meta object literal for the '<em><b>Path</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute INVOKE_AUT__PATH = eINSTANCE.getInvokeAUT_Path();
+
+ /**
* The meta object literal for the '<em><b>Vmargs</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1070,6 +1205,14 @@
EAttribute INVOKE_AUT__VMARGS = eINSTANCE.getInvokeAUT_Vmargs();
/**
+ * The meta object literal for the '<em><b>Inject</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference INVOKE_AUT__INJECT = eINSTANCE.getInvokeAUT_Inject();
+
+ /**
* The meta object literal for the '{@link org.eclipse.rcptt.testing.commands.impl.FindContextsImpl <em>Find Contexts</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1186,6 +1329,32 @@
EClass CLEAN_SELF_AUT = eINSTANCE.getCleanSelfAUT();
/**
+ * The meta object literal for the '{@link org.eclipse.rcptt.testing.commands.impl.SiteInjectionImpl <em>Site Injection</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.rcptt.testing.commands.impl.SiteInjectionImpl
+ * @see org.eclipse.rcptt.testing.commands.impl.CommandsPackageImpl#getSiteInjection()
+ * @generated
+ */
+ EClass SITE_INJECTION = eINSTANCE.getSiteInjection();
+
+ /**
+ * The meta object literal for the '<em><b>Uri</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute SITE_INJECTION__URI = eINSTANCE.getSiteInjection_Uri();
+
+ /**
+ * The meta object literal for the '<em><b>Unit</b></em>' attribute list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute SITE_INJECTION__UNIT = eINSTANCE.getSiteInjection_Unit();
+
+ /**
* The meta object literal for the '<em>Network Recorder</em>' data type.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/InvokeAUT.java b/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/InvokeAUT.java
index ef6ad1f..f367cb2 100644
--- a/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/InvokeAUT.java
+++ b/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/InvokeAUT.java
@@ -10,7 +10,9 @@
*******************************************************************************/
package org.eclipse.rcptt.testing.commands;
+import org.eclipse.emf.common.util.EList;
import org.eclipse.rcptt.ecl.core.Command;
+import org.eclipse.rcptt.launching.injection.Entry;
/**
* <!-- begin-user-doc -->
@@ -22,7 +24,9 @@
* <ul>
* <li>{@link org.eclipse.rcptt.testing.commands.InvokeAUT#getName <em>Name</em>}</li>
* <li>{@link org.eclipse.rcptt.testing.commands.InvokeAUT#getArgs <em>Args</em>}</li>
+ * <li>{@link org.eclipse.rcptt.testing.commands.InvokeAUT#getPath <em>Path</em>}</li>
* <li>{@link org.eclipse.rcptt.testing.commands.InvokeAUT#getVmargs <em>Vmargs</em>}</li>
+ * <li>{@link org.eclipse.rcptt.testing.commands.InvokeAUT#getInject <em>Inject</em>}</li>
* </ul>
* </p>
*
@@ -84,6 +88,32 @@
void setArgs(String value);
/**
+ * Returns the value of the '<em><b>Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Path</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Path</em>' attribute.
+ * @see #setPath(String)
+ * @see org.eclipse.rcptt.testing.commands.CommandsPackage#getInvokeAUT_Path()
+ * @model
+ * @generated
+ */
+ String getPath();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.rcptt.testing.commands.InvokeAUT#getPath <em>Path</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Path</em>' attribute.
+ * @see #getPath()
+ * @generated
+ */
+ void setPath(String value);
+
+ /**
* Returns the value of the '<em><b>Vmargs</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
@@ -109,4 +139,20 @@
*/
void setVmargs(String value);
+ /**
+ * Returns the value of the '<em><b>Inject</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.rcptt.launching.injection.Entry}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Inject</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Inject</em>' containment reference list.
+ * @see org.eclipse.rcptt.testing.commands.CommandsPackage#getInvokeAUT_Inject()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Entry> getInject();
+
} // InvokeAUT
diff --git a/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/SiteInjection.java b/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/SiteInjection.java
new file mode 100644
index 0000000..e9c37bc
--- /dev/null
+++ b/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/SiteInjection.java
@@ -0,0 +1,69 @@
+/**
+ */
+package org.eclipse.rcptt.testing.commands;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.rcptt.ecl.core.Command;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Site Injection</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.rcptt.testing.commands.SiteInjection#getUri <em>Uri</em>}</li>
+ * <li>{@link org.eclipse.rcptt.testing.commands.SiteInjection#getUnit <em>Unit</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.rcptt.testing.commands.CommandsPackage#getSiteInjection()
+ * @model
+ * @generated
+ */
+public interface SiteInjection extends Command {
+ /**
+ * Returns the value of the '<em><b>Uri</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Uri</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Uri</em>' attribute.
+ * @see #setUri(String)
+ * @see org.eclipse.rcptt.testing.commands.CommandsPackage#getSiteInjection_Uri()
+ * @model required="true"
+ * @generated
+ */
+ String getUri();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.rcptt.testing.commands.SiteInjection#getUri <em>Uri</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Uri</em>' attribute.
+ * @see #getUri()
+ * @generated
+ */
+ void setUri(String value);
+
+ /**
+ * Returns the value of the '<em><b>Unit</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Unit</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Unit</em>' attribute list.
+ * @see org.eclipse.rcptt.testing.commands.CommandsPackage#getSiteInjection_Unit()
+ * @model
+ * @generated
+ */
+ EList<String> getUnit();
+
+} // SiteInjection
diff --git a/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/impl/CommandsFactoryImpl.java b/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/impl/CommandsFactoryImpl.java
index ecf8a0f..09a903c 100644
--- a/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/impl/CommandsFactoryImpl.java
+++ b/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/impl/CommandsFactoryImpl.java
@@ -38,7 +38,7 @@
*/
public static CommandsFactory init() {
try {
- CommandsFactory theCommandsFactory = (CommandsFactory)EPackage.Registry.INSTANCE.getEFactory("http://eclipse.org/rcptt/testing/ecl");
+ CommandsFactory theCommandsFactory = (CommandsFactory)EPackage.Registry.INSTANCE.getEFactory(CommandsPackage.eNS_URI);
if (theCommandsFactory != null) {
return theCommandsFactory;
}
@@ -78,6 +78,7 @@
case CommandsPackage.GET_GLOBAL: return createGetGlobal();
case CommandsPackage.SET_GLOBAL: return createSetGlobal();
case CommandsPackage.CLEAN_SELF_AUT: return createCleanSelfAUT();
+ case CommandsPackage.SITE_INJECTION: return createSiteInjection();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -228,6 +229,16 @@
* <!-- end-user-doc -->
* @generated
*/
+ public SiteInjection createSiteInjection() {
+ SiteInjectionImpl siteInjection = new SiteInjectionImpl();
+ return siteInjection;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public NetworkRecorder createNetworkRecorderFromString(EDataType eDataType, String initialValue) {
return (NetworkRecorder)super.createFromString(eDataType, initialValue);
}
diff --git a/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/impl/CommandsPackageImpl.java b/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/impl/CommandsPackageImpl.java
index 13e393c..62cadef 100644
--- a/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/impl/CommandsPackageImpl.java
+++ b/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/impl/CommandsPackageImpl.java
@@ -16,15 +16,10 @@
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EcorePackage;
-
import org.eclipse.emf.ecore.impl.EPackageImpl;
-
import org.eclipse.rcptt.core.recording.NetworkRecorder;
-
-import org.eclipse.rcptt.core.scenario.ScenarioPackage;
-
import org.eclipse.rcptt.ecl.core.CorePackage;
-
+import org.eclipse.rcptt.launching.injection.InjectionPackage;
import org.eclipse.rcptt.testing.commands.ApplyContext;
import org.eclipse.rcptt.testing.commands.CaptureContext;
import org.eclipse.rcptt.testing.commands.CleanSelfAUT;
@@ -38,6 +33,7 @@
import org.eclipse.rcptt.testing.commands.InvokeAUT;
import org.eclipse.rcptt.testing.commands.SetFeature;
import org.eclipse.rcptt.testing.commands.SetGlobal;
+import org.eclipse.rcptt.testing.commands.SiteInjection;
/**
* <!-- begin-user-doc -->
@@ -128,6 +124,13 @@
* <!-- end-user-doc -->
* @generated
*/
+ private EClass siteInjectionEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
private EDataType networkRecorderEDataType = null;
/**
@@ -178,7 +181,7 @@
// Initialize simple dependencies
CorePackage.eINSTANCE.eClass();
- ScenarioPackage.eINSTANCE.eClass();
+ InjectionPackage.eINSTANCE.eClass();
// Create package meta-data objects
theCommandsPackage.createPackageContents();
@@ -317,7 +320,7 @@
* <!-- end-user-doc -->
* @generated
*/
- public EAttribute getInvokeAUT_Vmargs() {
+ public EAttribute getInvokeAUT_Path() {
return (EAttribute)invokeAUTEClass.getEStructuralFeatures().get(2);
}
@@ -326,6 +329,24 @@
* <!-- end-user-doc -->
* @generated
*/
+ public EAttribute getInvokeAUT_Vmargs() {
+ return (EAttribute)invokeAUTEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getInvokeAUT_Inject() {
+ return (EReference)invokeAUTEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getFindContexts() {
return findContextsEClass;
}
@@ -443,6 +464,33 @@
* <!-- end-user-doc -->
* @generated
*/
+ public EClass getSiteInjection() {
+ return siteInjectionEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getSiteInjection_Uri() {
+ return (EAttribute)siteInjectionEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getSiteInjection_Unit() {
+ return (EAttribute)siteInjectionEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EDataType getNetworkRecorder() {
return networkRecorderEDataType;
}
@@ -492,7 +540,9 @@
invokeAUTEClass = createEClass(INVOKE_AUT);
createEAttribute(invokeAUTEClass, INVOKE_AUT__NAME);
createEAttribute(invokeAUTEClass, INVOKE_AUT__ARGS);
+ createEAttribute(invokeAUTEClass, INVOKE_AUT__PATH);
createEAttribute(invokeAUTEClass, INVOKE_AUT__VMARGS);
+ createEReference(invokeAUTEClass, INVOKE_AUT__INJECT);
findContextsEClass = createEClass(FIND_CONTEXTS);
createEAttribute(findContextsEClass, FIND_CONTEXTS__TYPE);
@@ -513,6 +563,10 @@
cleanSelfAUTEClass = createEClass(CLEAN_SELF_AUT);
+ siteInjectionEClass = createEClass(SITE_INJECTION);
+ createEAttribute(siteInjectionEClass, SITE_INJECTION__URI);
+ createEAttribute(siteInjectionEClass, SITE_INJECTION__UNIT);
+
// Create data types
networkRecorderEDataType = createEDataType(NETWORK_RECORDER);
}
@@ -543,6 +597,7 @@
// Obtain other dependent packages
CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI);
EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
+ InjectionPackage theInjectionPackage = (InjectionPackage)EPackage.Registry.INSTANCE.getEPackage(InjectionPackage.eNS_URI);
// Create type parameters
@@ -560,6 +615,7 @@
getGlobalEClass.getESuperTypes().add(theCorePackage.getCommand());
setGlobalEClass.getESuperTypes().add(theCorePackage.getCommand());
cleanSelfAUTEClass.getESuperTypes().add(theCorePackage.getCommand());
+ siteInjectionEClass.getESuperTypes().add(theCorePackage.getCommand());
// Initialize classes and features; add operations and parameters
initEClass(getAutEClass, GetAut.class, "GetAut", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -579,7 +635,9 @@
initEClass(invokeAUTEClass, InvokeAUT.class, "InvokeAUT", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getInvokeAUT_Name(), theEcorePackage.getEString(), "name", null, 1, 1, InvokeAUT.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getInvokeAUT_Args(), theEcorePackage.getEString(), "args", null, 1, 1, InvokeAUT.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getInvokeAUT_Path(), theEcorePackage.getEString(), "path", null, 0, 1, InvokeAUT.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getInvokeAUT_Vmargs(), theEcorePackage.getEString(), "vmargs", null, 0, 1, InvokeAUT.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getInvokeAUT_Inject(), theInjectionPackage.getEntry(), null, "inject", null, 0, -1, InvokeAUT.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(findContextsEClass, FindContexts.class, "FindContexts", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getFindContexts_Type(), theEcorePackage.getEString(), "type", null, 0, 1, FindContexts.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -600,6 +658,10 @@
initEClass(cleanSelfAUTEClass, CleanSelfAUT.class, "CleanSelfAUT", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEClass(siteInjectionEClass, SiteInjection.class, "SiteInjection", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getSiteInjection_Uri(), theEcorePackage.getEString(), "uri", null, 1, 1, SiteInjection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getSiteInjection_Unit(), theEcorePackage.getEString(), "unit", null, 0, -1, SiteInjection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
// Initialize data types
initEDataType(networkRecorderEDataType, NetworkRecorder.class, "NetworkRecorder", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
diff --git a/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/impl/InvokeAUTImpl.java b/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/impl/InvokeAUTImpl.java
index d28e102..2d6f5e7 100644
--- a/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/impl/InvokeAUTImpl.java
+++ b/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/impl/InvokeAUTImpl.java
@@ -10,14 +10,18 @@
*******************************************************************************/
package org.eclipse.rcptt.testing.commands.impl;
+import java.util.Collection;
+
import org.eclipse.emf.common.notify.Notification;
-
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
-
+import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.rcptt.ecl.core.impl.CommandImpl;
-
+import org.eclipse.rcptt.launching.injection.Entry;
import org.eclipse.rcptt.testing.commands.CommandsPackage;
import org.eclipse.rcptt.testing.commands.InvokeAUT;
@@ -30,7 +34,9 @@
* <ul>
* <li>{@link org.eclipse.rcptt.testing.commands.impl.InvokeAUTImpl#getName <em>Name</em>}</li>
* <li>{@link org.eclipse.rcptt.testing.commands.impl.InvokeAUTImpl#getArgs <em>Args</em>}</li>
+ * <li>{@link org.eclipse.rcptt.testing.commands.impl.InvokeAUTImpl#getPath <em>Path</em>}</li>
* <li>{@link org.eclipse.rcptt.testing.commands.impl.InvokeAUTImpl#getVmargs <em>Vmargs</em>}</li>
+ * <li>{@link org.eclipse.rcptt.testing.commands.impl.InvokeAUTImpl#getInject <em>Inject</em>}</li>
* </ul>
* </p>
*
@@ -78,6 +84,26 @@
protected String args = ARGS_EDEFAULT;
/**
+ * The default value of the '{@link #getPath() <em>Path</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPath()
+ * @generated
+ * @ordered
+ */
+ protected static final String PATH_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getPath() <em>Path</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPath()
+ * @generated
+ * @ordered
+ */
+ protected String path = PATH_EDEFAULT;
+
+ /**
* The default value of the '{@link #getVmargs() <em>Vmargs</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -98,6 +124,16 @@
protected String vmargs = VMARGS_EDEFAULT;
/**
+ * The cached value of the '{@link #getInject() <em>Inject</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInject()
+ * @generated
+ * @ordered
+ */
+ protected EList<Entry> inject;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -163,6 +199,27 @@
* <!-- end-user-doc -->
* @generated
*/
+ public String getPath() {
+ return path;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setPath(String newPath) {
+ String oldPath = path;
+ path = newPath;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CommandsPackage.INVOKE_AUT__PATH, oldPath, path));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public String getVmargs() {
return vmargs;
}
@@ -184,6 +241,32 @@
* <!-- end-user-doc -->
* @generated
*/
+ public EList<Entry> getInject() {
+ if (inject == null) {
+ inject = new EObjectContainmentEList<Entry>(Entry.class, this, CommandsPackage.INVOKE_AUT__INJECT);
+ }
+ return inject;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case CommandsPackage.INVOKE_AUT__INJECT:
+ return ((InternalEList<?>)getInject()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
@@ -191,8 +274,12 @@
return getName();
case CommandsPackage.INVOKE_AUT__ARGS:
return getArgs();
+ case CommandsPackage.INVOKE_AUT__PATH:
+ return getPath();
case CommandsPackage.INVOKE_AUT__VMARGS:
return getVmargs();
+ case CommandsPackage.INVOKE_AUT__INJECT:
+ return getInject();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -202,6 +289,7 @@
* <!-- end-user-doc -->
* @generated
*/
+ @SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
@@ -211,9 +299,16 @@
case CommandsPackage.INVOKE_AUT__ARGS:
setArgs((String)newValue);
return;
+ case CommandsPackage.INVOKE_AUT__PATH:
+ setPath((String)newValue);
+ return;
case CommandsPackage.INVOKE_AUT__VMARGS:
setVmargs((String)newValue);
return;
+ case CommandsPackage.INVOKE_AUT__INJECT:
+ getInject().clear();
+ getInject().addAll((Collection<? extends Entry>)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -232,9 +327,15 @@
case CommandsPackage.INVOKE_AUT__ARGS:
setArgs(ARGS_EDEFAULT);
return;
+ case CommandsPackage.INVOKE_AUT__PATH:
+ setPath(PATH_EDEFAULT);
+ return;
case CommandsPackage.INVOKE_AUT__VMARGS:
setVmargs(VMARGS_EDEFAULT);
return;
+ case CommandsPackage.INVOKE_AUT__INJECT:
+ getInject().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -251,8 +352,12 @@
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case CommandsPackage.INVOKE_AUT__ARGS:
return ARGS_EDEFAULT == null ? args != null : !ARGS_EDEFAULT.equals(args);
+ case CommandsPackage.INVOKE_AUT__PATH:
+ return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path);
case CommandsPackage.INVOKE_AUT__VMARGS:
return VMARGS_EDEFAULT == null ? vmargs != null : !VMARGS_EDEFAULT.equals(vmargs);
+ case CommandsPackage.INVOKE_AUT__INJECT:
+ return inject != null && !inject.isEmpty();
}
return super.eIsSet(featureID);
}
@@ -271,6 +376,8 @@
result.append(name);
result.append(", args: ");
result.append(args);
+ result.append(", path: ");
+ result.append(path);
result.append(", vmargs: ");
result.append(vmargs);
result.append(')');
diff --git a/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/impl/SiteInjectionImpl.java b/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/impl/SiteInjectionImpl.java
new file mode 100644
index 0000000..1ed648f
--- /dev/null
+++ b/testing/org.eclipse.rcptt.testing.ecl/gen-src/org/eclipse/rcptt/testing/commands/impl/SiteInjectionImpl.java
@@ -0,0 +1,207 @@
+/**
+ */
+package org.eclipse.rcptt.testing.commands.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
+
+import org.eclipse.rcptt.ecl.core.impl.CommandImpl;
+
+import org.eclipse.rcptt.testing.commands.CommandsPackage;
+import org.eclipse.rcptt.testing.commands.SiteInjection;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Site Injection</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.rcptt.testing.commands.impl.SiteInjectionImpl#getUri <em>Uri</em>}</li>
+ * <li>{@link org.eclipse.rcptt.testing.commands.impl.SiteInjectionImpl#getUnit <em>Unit</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class SiteInjectionImpl extends CommandImpl implements SiteInjection {
+ /**
+ * The default value of the '{@link #getUri() <em>Uri</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getUri()
+ * @generated
+ * @ordered
+ */
+ protected static final String URI_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getUri() <em>Uri</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getUri()
+ * @generated
+ * @ordered
+ */
+ protected String uri = URI_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getUnit() <em>Unit</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getUnit()
+ * @generated
+ * @ordered
+ */
+ protected EList<String> unit;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected SiteInjectionImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return CommandsPackage.Literals.SITE_INJECTION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getUri() {
+ return uri;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setUri(String newUri) {
+ String oldUri = uri;
+ uri = newUri;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CommandsPackage.SITE_INJECTION__URI, oldUri, uri));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<String> getUnit() {
+ if (unit == null) {
+ unit = new EDataTypeUniqueEList<String>(String.class, this, CommandsPackage.SITE_INJECTION__UNIT);
+ }
+ return unit;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case CommandsPackage.SITE_INJECTION__URI:
+ return getUri();
+ case CommandsPackage.SITE_INJECTION__UNIT:
+ return getUnit();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case CommandsPackage.SITE_INJECTION__URI:
+ setUri((String)newValue);
+ return;
+ case CommandsPackage.SITE_INJECTION__UNIT:
+ getUnit().clear();
+ getUnit().addAll((Collection<? extends String>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case CommandsPackage.SITE_INJECTION__URI:
+ setUri(URI_EDEFAULT);
+ return;
+ case CommandsPackage.SITE_INJECTION__UNIT:
+ getUnit().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case CommandsPackage.SITE_INJECTION__URI:
+ return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri);
+ case CommandsPackage.SITE_INJECTION__UNIT:
+ return unit != null && !unit.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (uri: ");
+ result.append(uri);
+ result.append(", unit: ");
+ result.append(unit);
+ result.append(')');
+ return result.toString();
+ }
+
+} //SiteInjectionImpl
diff --git a/testing/org.eclipse.rcptt.testing.ecl/model/commands.ecore b/testing/org.eclipse.rcptt.testing.ecl/model/commands.ecore
index 08fa5a0..fdbaae7 100644
--- a/testing/org.eclipse.rcptt.testing.ecl/model/commands.ecore
+++ b/testing/org.eclipse.rcptt.testing.ecl/model/commands.ecore
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="commands"
- nsURI="http://eclipse.org/rcptt/testing/ecl" nsPrefix="org.eclipse.rcptt.testing.ecl">
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="commands" nsURI="http://eclipse.org/rcptt/testing/ecl" nsPrefix="org.eclipse.rcptt.testing.ecl">
<eClassifiers xsi:type="ecore:EClass" name="GetAut" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command">
<eAnnotations source="http://www.eclipse.org/ecl/internal"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
@@ -32,7 +30,11 @@
<eAnnotations source="http://www.eclipse.org/ecl/internal"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="args" lowerBound="1" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="path" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="vmargs" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="inject" upperBound="-1"
+ eType="ecore:EClass ../../org.eclipse.rcptt.launching.injection/models/injection.ecore#//Entry"
+ containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="FindContexts" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command">
<eAnnotations source="http://www.eclipse.org/ecl/docs">
@@ -98,4 +100,8 @@
<eClassifiers xsi:type="ecore:EClass" name="CleanSelfAUT" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command">
<eAnnotations source="http://www.eclipse.org/ecl/internal"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="SiteInjection" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="uri" lowerBound="1" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="unit" upperBound="-1" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ </eClassifiers>
</ecore:EPackage>
diff --git a/testing/org.eclipse.rcptt.testing.ecl/model/commands.genmodel b/testing/org.eclipse.rcptt.testing.ecl/model/commands.genmodel
index 248857a..6aa2565 100644
--- a/testing/org.eclipse.rcptt.testing.ecl/model/commands.genmodel
+++ b/testing/org.eclipse.rcptt.testing.ecl/model/commands.genmodel
@@ -1,19 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.rcptt.testing.ecl/gen-src"
- modelPluginID="org.eclipse.rcptt.testing.ecl" modelName="Commands" importerID="org.eclipse.emf.importer.ecore"
- complianceLevel="6.0" copyrightFields="false" usedGenPackages="../../org.eclipse.rcptt.ecl.core/model/ecl.genmodel#//core platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.rcptt.core.scenario/models/scenario.genmodel#//scenario">
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.rcptt.testing.ecl/gen-src" modelPluginID="org.eclipse.rcptt.testing.ecl"
+ modelName="Commands" importerID="org.eclipse.emf.importer.ecore" complianceLevel="6.0"
+ copyrightFields="false" usedGenPackages="../../org.eclipse.rcptt.ecl.core/model/ecl.genmodel#//core platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.rcptt.launching.injection/models/q7Injection.genmodel#//injection">
<foreignModel>commands.ecore</foreignModel>
<genPackages prefix="Commands" basePackage="org.eclipse.rcptt.testing" disposableProviderFactory="true"
adapterFactory="false" ecorePackage="commands.ecore#/">
- <genDataTypes ecoreDataType="commands.ecore#//AUTElement"/>
<genDataTypes ecoreDataType="commands.ecore#//NetworkRecorder"/>
<genClasses ecoreClass="commands.ecore#//GetAut">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute commands.ecore#//GetAut/name"/>
</genClasses>
<genClasses ecoreClass="commands.ecore#//Eval">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute commands.ecore#//Eval/aut"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute commands.ecore#//Eval/autId"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute commands.ecore#//Eval/script"/>
</genClasses>
<genClasses ecoreClass="commands.ecore#//GetRecorder"/>
@@ -22,15 +20,33 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute commands.ecore#//SetFeature/name"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute commands.ecore#//SetFeature/value"/>
</genClasses>
- <genClasses ecoreClass="commands.ecore#//GetTest">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute commands.ecore#//GetTest/name"/>
+ <genClasses ecoreClass="commands.ecore#//InvokeAUT">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute commands.ecore#//InvokeAUT/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute commands.ecore#//InvokeAUT/args"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute commands.ecore#//InvokeAUT/vmargs"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference commands.ecore#//InvokeAUT/inject"/>
</genClasses>
- <genClasses ecoreClass="commands.ecore#//GetContext">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute commands.ecore#//GetContext/name"/>
+ <genClasses ecoreClass="commands.ecore#//FindContexts">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute commands.ecore#//FindContexts/type"/>
</genClasses>
- <genClasses ecoreClass="commands.ecore#//HasContext">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference commands.ecore#//HasContext/element"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute commands.ecore#//HasContext/name"/>
+ <genClasses ecoreClass="commands.ecore#//CaptureContext">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute commands.ecore#//CaptureContext/path"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute commands.ecore#//CaptureContext/type"/>
+ </genClasses>
+ <genClasses ecoreClass="commands.ecore#//ApplyContext">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute commands.ecore#//ApplyContext/path"/>
+ </genClasses>
+ <genClasses ecoreClass="commands.ecore#//GetGlobal">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute commands.ecore#//GetGlobal/name"/>
+ </genClasses>
+ <genClasses ecoreClass="commands.ecore#//SetGlobal">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference commands.ecore#//SetGlobal/values"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute commands.ecore#//SetGlobal/name"/>
+ </genClasses>
+ <genClasses ecoreClass="commands.ecore#//CleanSelfAUT"/>
+ <genClasses ecoreClass="commands.ecore#//SiteInjection">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute commands.ecore#//SiteInjection/uri"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute commands.ecore#//SiteInjection/unit"/>
</genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/testing/org.eclipse.rcptt.testing.ecl/plugin.xml b/testing/org.eclipse.rcptt.testing.ecl/plugin.xml
index e7f68e6..4311e55 100644
--- a/testing/org.eclipse.rcptt.testing.ecl/plugin.xml
+++ b/testing/org.eclipse.rcptt.testing.ecl/plugin.xml
@@ -16,6 +16,7 @@
class="org.eclipse.rcptt.testing.commands.CommandsPackage"
genModel="model/commands.genmodel"/>
</extension>
+
<extension
point="org.eclipse.rcptt.ecl.core.scriptlet">
<scriptlet
@@ -75,6 +76,11 @@
<friendly_name
value="clean-self-aut">
</friendly_name>
+ </scriptlet>
+ <scriptlet
+ class="org.eclipse.rcptt.testing.SiteInjectionService"
+ name="SiteInjection"
+ namespace="http://eclipse.org/rcptt/testing/ecl">
</scriptlet>
</extension>
diff --git a/testing/org.eclipse.rcptt.testing.ecl/src/org/eclipse/rcptt/testing/InvokeAUTService.java b/testing/org.eclipse.rcptt.testing.ecl/src/org/eclipse/rcptt/testing/InvokeAUTService.java
index 036f39b..b32bd9e 100644
--- a/testing/org.eclipse.rcptt.testing.ecl/src/org/eclipse/rcptt/testing/InvokeAUTService.java
+++ b/testing/org.eclipse.rcptt.testing.ecl/src/org/eclipse/rcptt/testing/InvokeAUTService.java
@@ -30,7 +30,6 @@
import org.eclipse.rcptt.ecl.core.Command;
import org.eclipse.rcptt.ecl.runtime.ICommandService;
import org.eclipse.rcptt.ecl.runtime.IProcess;
-
import org.eclipse.rcptt.internal.core.RcpttPlugin;
import org.eclipse.rcptt.internal.launching.ext.Q7TargetPlatformManager;
import org.eclipse.rcptt.internal.launching.ext.UpdateVMArgs;
@@ -38,6 +37,8 @@
import org.eclipse.rcptt.launching.AutLaunch;
import org.eclipse.rcptt.launching.AutManager;
import org.eclipse.rcptt.launching.ext.Q7LaunchingUtil;
+import org.eclipse.rcptt.launching.injection.InjectionConfiguration;
+import org.eclipse.rcptt.launching.injection.InjectionFactory;
import org.eclipse.rcptt.launching.target.ITargetPlatformHelper;
import org.eclipse.rcptt.testing.commands.InvokeAUT;
@@ -70,10 +71,18 @@
}
private Aut createAut(InvokeAUT cmd) throws CoreException {
- updateEclipseLocation();
- if (eclipseLocation == null) {
- throw new CoreException(
- RcpttPlugin.createStatus("Failed to launch selfAUT. ${eclipse_home} variable is not resolved..."));
+ final String location;
+
+ if (cmd.getPath() != null) {
+ location = cmd.getPath();
+ } else {
+ updateEclipseLocation();
+ if (eclipseLocation == null) {
+ throw new CoreException(
+ RcpttPlugin
+ .createStatus("Failed to launch selfAUT. ${eclipse_home} variable is not resolved..."));
+ }
+ location = eclipseLocation;
}
// ITargetPlatformHelper platform = TargetPlatformManager
// .getCurrentTargetPlatform();
@@ -81,9 +90,17 @@
// Q7TargetPlatformManager.createTargetPlatform(location, monitor,
// addErrorsToLog)
ITargetPlatformHelper platform = Q7TargetPlatformManager
- .createTargetPlatform(eclipseLocation,
+ .createTargetPlatform(location,
new NullProgressMonitor(), false);
+ platform.setTargetName(cmd.getName());
+
+ InjectionConfiguration configuration = InjectionFactory.eINSTANCE.createInjectionConfiguration();
+ configuration.getEntries().addAll(cmd.getInject());
+
+ platform.applyInjection(configuration, new NullProgressMonitor());
+
+
ILaunchConfigurationWorkingCopy launch = Q7LaunchingUtil
.createLaunchConfiguration(platform, cmd.getName());
launch.setAttribute(
diff --git a/testing/org.eclipse.rcptt.testing.ecl/src/org/eclipse/rcptt/testing/SiteInjectionService.java b/testing/org.eclipse.rcptt.testing.ecl/src/org/eclipse/rcptt/testing/SiteInjectionService.java
new file mode 100644
index 0000000..694e10b
--- /dev/null
+++ b/testing/org.eclipse.rcptt.testing.ecl/src/org/eclipse/rcptt/testing/SiteInjectionService.java
@@ -0,0 +1,29 @@
+package org.eclipse.rcptt.testing;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.rcptt.ecl.runtime.SingleCommandService;
+import org.eclipse.rcptt.launching.injection.InjectionFactory;
+import org.eclipse.rcptt.launching.injection.UpdateSite;
+import org.eclipse.rcptt.testing.commands.SiteInjection;
+
+public class SiteInjectionService extends SingleCommandService<SiteInjection> {
+
+ public SiteInjectionService() {
+ super(SiteInjection.class);
+ }
+
+ @Override
+ protected Object serviceTyped(SiteInjection command) throws InterruptedException, CoreException {
+ final UpdateSite rv = InjectionFactory.eINSTANCE.createUpdateSite();
+ rv.setUri(command.getUri());
+ if (!command.getUnit().isEmpty()) {
+ rv.setAllUnits(false);
+ rv.getUnits().addAll(command.getUnit());
+ } else {
+ rv.setAllUnits(true);
+ }
+
+ return rv;
+ }
+
+}