Merge changes I8e5f02c8,I03503c57
* changes:
Bug 442693 - Added tests
Bug 442693 - Added decorators to "Advanced Information" when dumping UI tree
diff --git a/core/org.eclipse.rcptt.tesla.core/src/org/eclipse/rcptt/tesla/core/protocol/TextUIElement.java b/core/org.eclipse.rcptt.tesla.core/src/org/eclipse/rcptt/tesla/core/protocol/TextUIElement.java
index cdae5e8..20afee6 100644
--- a/core/org.eclipse.rcptt.tesla.core/src/org/eclipse/rcptt/tesla/core/protocol/TextUIElement.java
+++ b/core/org.eclipse.rcptt.tesla.core/src/org/eclipse/rcptt/tesla/core/protocol/TextUIElement.java
@@ -13,6 +13,7 @@
import org.eclipse.rcptt.tesla.core.protocol.raw.Element;
import org.eclipse.rcptt.tesla.core.protocol.raw.Response;
import org.eclipse.rcptt.tesla.core.protocol.raw.ResponseStatus;
+import org.eclipse.rcptt.tesla.core.utils.Cryptography;
public class TextUIElement extends ControlUIElement {
@@ -30,7 +31,7 @@
public void setText(String text, boolean select, boolean hide) {
SetText cmd = factory.createSetText();
cmd.setElement(getElement());
- cmd.setValue(text);
+ cmd.setValue(hide ? Cryptography.INSTANCE.encrypt(text) : text);
cmd.setSelect(select);
cmd.setHidden(hide);
player.safeExecuteCommand(cmd);
diff --git a/core/org.eclipse.rcptt.tesla.core/src/org/eclipse/rcptt/tesla/core/utils/Cryptography.java b/core/org.eclipse.rcptt.tesla.core/src/org/eclipse/rcptt/tesla/core/utils/Cryptography.java
new file mode 100644
index 0000000..f2d831a
--- /dev/null
+++ b/core/org.eclipse.rcptt.tesla.core/src/org/eclipse/rcptt/tesla/core/utils/Cryptography.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2014 Xored Software Inc and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Xored Software Inc - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+package org.eclipse.rcptt.tesla.core.utils;
+
+import java.security.Key;
+import java.security.spec.KeySpec;
+
+import javax.crypto.Cipher;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.PBEKeySpec;
+import javax.crypto.spec.SecretKeySpec;
+
+import org.eclipse.rcptt.util.Base64;
+import org.eclipse.rcptt.util.StringUtils;
+
+public class Cryptography {
+ private static final byte[] IV_PARAMETER_SPEC = new byte[]{1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8};
+ private static final byte[] SALT = new byte[]{0, 0, 0, 0, 0, 0, 0, 0};
+ private static final String CIPHER_MODE = "AES/CBC/PKCS5Padding";
+ private static final String PROPERTY = "org.eclipse.rcptt.cryptoKey";
+ private Key key;
+
+ public Cryptography(Key key) {
+ this.key = key;
+ if (key == null)
+ throw new NullPointerException();
+ }
+
+ public String decrypt(String input) {
+ try {
+ Cipher cipher = Cipher.getInstance(CIPHER_MODE);
+ cipher.init(Cipher.DECRYPT_MODE, key, new IvParameterSpec(IV_PARAMETER_SPEC));
+ return new String(cipher.doFinal(Base64
+ .decode(input)), "UTF-8");
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public String encrypt(String input) {
+ try {
+ Cipher cipher = Cipher.getInstance(CIPHER_MODE);
+ cipher.init(Cipher.ENCRYPT_MODE, key, new IvParameterSpec(IV_PARAMETER_SPEC));
+ return Base64.encode(cipher.doFinal(input
+ .getBytes("UTF-8")));
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ static public final Cryptography INSTANCE = new Cryptography(
+ getConfiguredKey());
+
+ private static Key getConfiguredKey() {
+ String keyString = System.getProperty(PROPERTY);
+ if (StringUtils.isEmpty(keyString))
+ keyString = "gjdlm7JIO.UOLNE/EOL<FPUWX MI<KMG2TYIL";
+ try {
+ SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
+ KeySpec spec = new PBEKeySpec(keyString.toCharArray(), SALT, 256, 128);
+ byte[] encoded = factory.generateSecret(spec).getEncoded();
+ assert encoded.length*8 == 128;
+ Key rv = new SecretKeySpec(encoded, "AES");
+ //Testing key
+ Cipher cipher = Cipher.getInstance(CIPHER_MODE);
+ cipher.init(Cipher.DECRYPT_MODE, rv, new IvParameterSpec(IV_PARAMETER_SPEC));
+ return rv;
+ } catch (Exception e) {
+ throw new RuntimeException("Cryptography key failure.", e);
+ }
+
+ }
+}
diff --git a/core/org.eclipse.rcptt.tesla.recording.core.ecl/src/org/eclipse/rcptt/tesla/recording/core/ecl/parser/TeslaParser.java b/core/org.eclipse.rcptt.tesla.recording.core.ecl/src/org/eclipse/rcptt/tesla/recording/core/ecl/parser/TeslaParser.java
index b72f5e8..167a7f3 100644
--- a/core/org.eclipse.rcptt.tesla.recording.core.ecl/src/org/eclipse/rcptt/tesla/recording/core/ecl/parser/TeslaParser.java
+++ b/core/org.eclipse.rcptt.tesla.recording.core.ecl/src/org/eclipse/rcptt/tesla/recording/core/ecl/parser/TeslaParser.java
@@ -30,7 +30,6 @@
import org.eclipse.rcptt.ecl.core.Sequence;
import org.eclipse.rcptt.ecl.core.util.EclRefactoring;
import org.eclipse.swt.dnd.DND;
-
import org.eclipse.rcptt.util.Base64;
import org.eclipse.rcptt.util.swt.KeysAndButtons;
import org.eclipse.rcptt.tesla.core.protocol.ActivateCellEditor;
@@ -97,6 +96,7 @@
import org.eclipse.rcptt.tesla.ecl.TeslaEclUtils;
import org.eclipse.rcptt.tesla.ecl.TeslaScriptletFactory;
import org.eclipse.rcptt.tesla.ecl.model.Button;
+import org.eclipse.rcptt.tesla.ecl.model.Decrypt;
import org.eclipse.rcptt.tesla.ecl.model.ExecWithOptions;
import org.eclipse.rcptt.tesla.ecl.model.FromRawKey;
import org.eclipse.rcptt.tesla.ecl.model.GetProperty;
@@ -296,16 +296,29 @@
}
@TeslaCommand(packageUri = ProtocolPackage.eNS_URI, classifier = "SetText")
- protected Command setText(SetText c) {
- if (c.getElement().getKind().equals(ElementKind.DateTime.name())
- || c.getElement().getKind().equals(ElementKind.Slider.name())) {
- return TeslaScriptletFactory.makePipe(selectorOf(c.getElement()),
- TeslaScriptletFactory.makeSetValue(c.getValue()));
+ protected Command setText(SetText c) {
+ if (c.getElement().getKind().equals(ElementKind.DateTime.name())
+ || c.getElement().getKind().equals(ElementKind.Slider.name())) {
+ return TeslaScriptletFactory.makePipe(selectorOf(c.getElement()),
+ TeslaScriptletFactory.makeSetValue(c.getValue()));
+ }
+
+ org.eclipse.rcptt.tesla.ecl.model.SetText cmd = TeslaFactory.eINSTANCE.createSetText();
+ if (c.isHidden()) {
+ bind(cmd, TeslaPackage.eINSTANCE.getSetText_Text(), decrypt(c.getValue()));
+ } else {
+ cmd.setText(c.getValue());
}
- return TeslaScriptletFactory.makePipe(selectorOf(c.getElement()),
- TeslaScriptletFactory.makeSetText(c.getValue()));
+ return TeslaScriptletFactory.makePipe(selectorOf(c.getElement()),
+ cmd);
}
-
+
+ protected Command decrypt(String rawdata) {
+ Decrypt cmd = TeslaFactory.eINSTANCE.createDecrypt();
+ cmd.setValue(rawdata);
+ return cmd;
+ }
+
@TeslaCommand(packageUri = ProtocolPackage.eNS_URI, classifier = "SetTextSelection")
protected Command setTextSelection(SetTextSelection c) {
if (c.getEndline() != null && c.getEndoffset() != null) {
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.core/META-INF/MANIFEST.MF b/ecl/plugins/org.eclipse.rcptt.ecl.core/META-INF/MANIFEST.MF
index 5240309..6852161 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.core/META-INF/MANIFEST.MF
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.core/META-INF/MANIFEST.MF
@@ -1,10 +1,11 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: ECL Core
+Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rcptt.ecl.core;singleton:=true
Bundle-Version: 1.5.2.qualifier
Bundle-ClassPath: .
-Bundle-Vendor: Eclipse RCP Testing Tool Project
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: org.eclipse.rcptt.ecl.core,
org.eclipse.rcptt.ecl.core.impl,
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.core/model/ecl.ecore b/ecl/plugins/org.eclipse.rcptt.ecl.core/model/ecl.ecore
index 2e78493..eea77bb 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.core/model/ecl.ecore
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.core/model/ecl.ecore
@@ -318,13 +318,6 @@
<details key="returns" value="An internal object describing the case."/>
<details key="example" value="list 1 2 3 | get 0 | switch [case 1 {
	log -message "First item is 1"
}] [case 2 {
	log -message "First item is 2"
}]"/>
</eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EReference" name="input" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"
- containment="true">
- <eAnnotations source="http://www.eclipse.org/ecl/input"/>
- <eAnnotations source="http://www.eclipse.org/ecl/docs">
- <details key="description" value="The input value to compare."/>
- </eAnnotations>
- </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="condition" lowerBound="1"
eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject">
<eAnnotations source="http://www.eclipse.org/ecl/docs">
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.core/plugin.properties b/ecl/plugins/org.eclipse.rcptt.ecl.core/plugin.properties
index 69c8776..2538b5e 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.core/plugin.properties
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.core/plugin.properties
@@ -8,3 +8,5 @@
# Contributors:
# Xored Software Inc - initial API and implementation and/or initial documentation
###############################################################################
+pluginName = Ecl Model
+providerName = www.example.org
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/Case.java b/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/Case.java
index 52b9a06..ba0f7ec 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/Case.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/Case.java
@@ -12,7 +12,6 @@
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.rcptt.ecl.core.Case#getInput <em>Input</em>}</li>
* <li>{@link org.eclipse.rcptt.ecl.core.Case#getCondition <em>Condition</em>}</li>
* <li>{@link org.eclipse.rcptt.ecl.core.Case#getThen <em>Then</em>}</li>
* </ul>
@@ -77,31 +76,4 @@
*/
void setThen(Command value);
- /**
- * Returns the value of the '<em><b>Input</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Input</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Input</em>' containment reference.
- * @see #setInput(EObject)
- * @see org.eclipse.rcptt.ecl.core.CorePackage#getCase_Input()
- * @model containment="true" required="true"
- * annotation="http://www.eclipse.org/ecl/docs description='The input value to compare.'"
- * @generated
- */
- EObject getInput();
-
- /**
- * Sets the value of the '{@link org.eclipse.rcptt.ecl.core.Case#getInput <em>Input</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Input</em>' containment reference.
- * @see #getInput()
- * @generated
- */
- void setInput(EObject value);
-
} // Case
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/CorePackage.java b/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/CorePackage.java
index 09505e4..52edeae 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/CorePackage.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/CorePackage.java
@@ -2019,22 +2019,13 @@
int CASE__BINDINGS = COMMAND__BINDINGS;
/**
- * The feature id for the '<em><b>Input</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CASE__INPUT = COMMAND_FEATURE_COUNT + 0;
-
- /**
* The feature id for the '<em><b>Condition</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int CASE__CONDITION = COMMAND_FEATURE_COUNT + 1;
+ int CASE__CONDITION = COMMAND_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Then</b></em>' containment reference.
@@ -2043,7 +2034,7 @@
* @generated
* @ordered
*/
- int CASE__THEN = COMMAND_FEATURE_COUNT + 2;
+ int CASE__THEN = COMMAND_FEATURE_COUNT + 1;
/**
* The number of structural features of the '<em>Case</em>' class.
@@ -2052,7 +2043,7 @@
* @generated
* @ordered
*/
- int CASE_FEATURE_COUNT = COMMAND_FEATURE_COUNT + 3;
+ int CASE_FEATURE_COUNT = COMMAND_FEATURE_COUNT + 2;
/**
* The meta object id for the '{@link org.eclipse.rcptt.ecl.core.impl.SwitchImpl <em>Switch</em>}' class.
@@ -3226,17 +3217,6 @@
EReference getCase_Then();
/**
- * Returns the meta object for the containment reference '{@link org.eclipse.rcptt.ecl.core.Case#getInput <em>Input</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Input</em>'.
- * @see org.eclipse.rcptt.ecl.core.Case#getInput()
- * @see #getCase()
- * @generated
- */
- EReference getCase_Input();
-
- /**
* Returns the meta object for class '{@link org.eclipse.rcptt.ecl.core.Switch <em>Switch</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -4408,14 +4388,6 @@
EReference CASE__THEN = eINSTANCE.getCase_Then();
/**
- * The meta object literal for the '<em><b>Input</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference CASE__INPUT = eINSTANCE.getCase_Input();
-
- /**
* The meta object literal for the '{@link org.eclipse.rcptt.ecl.core.impl.SwitchImpl <em>Switch</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/Nullable.java b/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/Nullable.java
index 5c945ab..6255844 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/Nullable.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/Nullable.java
@@ -8,78 +8,78 @@
* Contributors:
* Xored Software Inc - initial API and implementation and/or initial documentation
*******************************************************************************/
-package org.eclipse.rcptt.ecl.core;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Nullable</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.rcptt.ecl.core.Nullable#getValue <em>Value</em>}</li>
- * <li>{@link org.eclipse.rcptt.ecl.core.Nullable#getType <em>Type</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.rcptt.ecl.core.CorePackage#getNullable()
- * @model
- * @generated
- */
-public interface Nullable extends EObject {
- /**
- * Returns the value of the '<em><b>Value</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Value</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Value</em>' containment reference.
- * @see #setValue(EObject)
- * @see org.eclipse.rcptt.ecl.core.CorePackage#getNullable_Value()
- * @model containment="true"
- * @generated
- */
- EObject getValue();
-
- /**
- * Sets the value of the '{@link org.eclipse.rcptt.ecl.core.Nullable#getValue <em>Value</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Value</em>' containment reference.
- * @see #getValue()
- * @generated
- */
- void setValue(EObject value);
-
- /**
- * Returns the value of the '<em><b>Type</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Type</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Type</em>' attribute.
- * @see #setType(String)
- * @see org.eclipse.rcptt.ecl.core.CorePackage#getNullable_Type()
- * @model
- * @generated
- */
- String getType();
-
- /**
- * Sets the value of the '{@link org.eclipse.rcptt.ecl.core.Nullable#getType <em>Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Type</em>' attribute.
- * @see #getType()
- * @generated
- */
- void setType(String value);
-
-} // Nullable
+package org.eclipse.rcptt.ecl.core;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Nullable</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.rcptt.ecl.core.Nullable#getValue <em>Value</em>}</li>
+ * <li>{@link org.eclipse.rcptt.ecl.core.Nullable#getType <em>Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.rcptt.ecl.core.CorePackage#getNullable()
+ * @model
+ * @generated
+ */
+public interface Nullable extends EObject {
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' containment reference.
+ * @see #setValue(EObject)
+ * @see org.eclipse.rcptt.ecl.core.CorePackage#getNullable_Value()
+ * @model containment="true"
+ * @generated
+ */
+ EObject getValue();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.rcptt.ecl.core.Nullable#getValue <em>Value</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' containment reference.
+ * @see #getValue()
+ * @generated
+ */
+ void setValue(EObject value);
+
+ /**
+ * Returns the value of the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Type</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Type</em>' attribute.
+ * @see #setType(String)
+ * @see org.eclipse.rcptt.ecl.core.CorePackage#getNullable_Type()
+ * @model
+ * @generated
+ */
+ String getType();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.rcptt.ecl.core.Nullable#getType <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Type</em>' attribute.
+ * @see #getType()
+ * @generated
+ */
+ void setType(String value);
+
+} // Nullable
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/Serialized.java b/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/Serialized.java
index 8ba3fa9..9301c85 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/Serialized.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/Serialized.java
@@ -8,51 +8,51 @@
* Contributors:
* Xored Software Inc - initial API and implementation and/or initial documentation
*******************************************************************************/
-package org.eclipse.rcptt.ecl.core;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Serialized</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.rcptt.ecl.core.Serialized#getBytes <em>Bytes</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.rcptt.ecl.core.CorePackage#getSerialized()
- * @model
- * @generated
- */
-public interface Serialized extends EObject {
- /**
- * Returns the value of the '<em><b>Bytes</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Bytes</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Bytes</em>' attribute.
- * @see #setBytes(byte[])
- * @see org.eclipse.rcptt.ecl.core.CorePackage#getSerialized_Bytes()
- * @model
- * @generated
- */
- byte[] getBytes();
-
- /**
- * Sets the value of the '{@link org.eclipse.rcptt.ecl.core.Serialized#getBytes <em>Bytes</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Bytes</em>' attribute.
- * @see #getBytes()
- * @generated
- */
- void setBytes(byte[] value);
-
-} // Serialized
+package org.eclipse.rcptt.ecl.core;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Serialized</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.rcptt.ecl.core.Serialized#getBytes <em>Bytes</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.rcptt.ecl.core.CorePackage#getSerialized()
+ * @model
+ * @generated
+ */
+public interface Serialized extends EObject {
+ /**
+ * Returns the value of the '<em><b>Bytes</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Bytes</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Bytes</em>' attribute.
+ * @see #setBytes(byte[])
+ * @see org.eclipse.rcptt.ecl.core.CorePackage#getSerialized_Bytes()
+ * @model
+ * @generated
+ */
+ byte[] getBytes();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.rcptt.ecl.core.Serialized#getBytes <em>Bytes</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Bytes</em>' attribute.
+ * @see #getBytes()
+ * @generated
+ */
+ void setBytes(byte[] value);
+
+} // Serialized
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/impl/CaseImpl.java b/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/impl/CaseImpl.java
index 5df016b..c33f152 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/impl/CaseImpl.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/impl/CaseImpl.java
@@ -22,7 +22,6 @@
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.rcptt.ecl.core.impl.CaseImpl#getInput <em>Input</em>}</li>
* <li>{@link org.eclipse.rcptt.ecl.core.impl.CaseImpl#getCondition <em>Condition</em>}</li>
* <li>{@link org.eclipse.rcptt.ecl.core.impl.CaseImpl#getThen <em>Then</em>}</li>
* </ul>
@@ -32,16 +31,6 @@
*/
public class CaseImpl extends CommandImpl implements Case {
/**
- * The cached value of the '{@link #getInput() <em>Input</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInput()
- * @generated
- * @ordered
- */
- protected EObject input;
-
- /**
* The cached value of the '{@link #getCondition() <em>Condition</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -166,54 +155,9 @@
* <!-- end-user-doc -->
* @generated
*/
- public EObject getInput() {
- return input;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetInput(EObject newInput, NotificationChain msgs) {
- EObject oldInput = input;
- input = newInput;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CorePackage.CASE__INPUT, oldInput, newInput);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setInput(EObject newInput) {
- if (newInput != input) {
- NotificationChain msgs = null;
- if (input != null)
- msgs = ((InternalEObject)input).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CorePackage.CASE__INPUT, null, msgs);
- if (newInput != null)
- msgs = ((InternalEObject)newInput).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CorePackage.CASE__INPUT, null, msgs);
- msgs = basicSetInput(newInput, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.CASE__INPUT, newInput, newInput));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case CorePackage.CASE__INPUT:
- return basicSetInput(null, msgs);
case CorePackage.CASE__THEN:
return basicSetThen(null, msgs);
}
@@ -228,8 +172,6 @@
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case CorePackage.CASE__INPUT:
- return getInput();
case CorePackage.CASE__CONDITION:
if (resolve) return getCondition();
return basicGetCondition();
@@ -247,9 +189,6 @@
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case CorePackage.CASE__INPUT:
- setInput((EObject)newValue);
- return;
case CorePackage.CASE__CONDITION:
setCondition((EObject)newValue);
return;
@@ -268,9 +207,6 @@
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case CorePackage.CASE__INPUT:
- setInput((EObject)null);
- return;
case CorePackage.CASE__CONDITION:
setCondition((EObject)null);
return;
@@ -289,8 +225,6 @@
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case CorePackage.CASE__INPUT:
- return input != null;
case CorePackage.CASE__CONDITION:
return condition != null;
case CorePackage.CASE__THEN:
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/impl/CorePackageImpl.java b/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/impl/CorePackageImpl.java
index a2141c6..4d3733f 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/impl/CorePackageImpl.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/impl/CorePackageImpl.java
@@ -1296,7 +1296,7 @@
* @generated
*/
public EReference getCase_Condition() {
- return (EReference)caseEClass.getEStructuralFeatures().get(1);
+ return (EReference)caseEClass.getEStructuralFeatures().get(0);
}
/**
@@ -1305,16 +1305,7 @@
* @generated
*/
public EReference getCase_Then() {
- return (EReference)caseEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getCase_Input() {
- return (EReference)caseEClass.getEStructuralFeatures().get(0);
+ return (EReference)caseEClass.getEStructuralFeatures().get(1);
}
/**
@@ -1704,7 +1695,6 @@
createEReference(eclMapEntryEClass, ECL_MAP_ENTRY__VALUE);
caseEClass = createEClass(CASE);
- createEReference(caseEClass, CASE__INPUT);
createEReference(caseEClass, CASE__CONDITION);
createEReference(caseEClass, CASE__THEN);
@@ -1947,7 +1937,6 @@
initEReference(getEclMapEntry_Value(), theEcorePackage.getEObject(), null, "value", null, 0, 1, EclMapEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(caseEClass, Case.class, "Case", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getCase_Input(), theEcorePackage.getEObject(), null, "input", null, 1, 1, Case.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getCase_Condition(), theEcorePackage.getEObject(), null, "condition", null, 1, 1, Case.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getCase_Then(), this.getCommand(), null, "then", null, 0, 1, Case.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -2018,7 +2007,7 @@
(restoreStateEClass,
source,
new String[] {
- });
+ });
}
/**
@@ -2037,12 +2026,7 @@
(getGet_Input(),
source,
new String[] {
- });
- addAnnotation
- (getCase_Input(),
- source,
- new String[] {
- });
+ });
addAnnotation
(getSwitch_Input(),
source,
@@ -2223,12 +2207,6 @@
"description", "Corresponds command from <code>then</code> branch if an object from the <code>input</code> matches the <code>condition</code> object.",
"returns", "An internal object describing the case.",
"example", "list 1 2 3 | get 0 | switch [case 1 {\r\n\tlog -message \"First item is 1\"\r\n}] [case 2 {\n\tlog -message \"First item is 2\"\n}]"
- });
- addAnnotation
- (getCase_Input(),
- source,
- new String[] {
- "description", "The input value to compare."
});
addAnnotation
(getCase_Condition(),
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/impl/NullableImpl.java b/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/impl/NullableImpl.java
index e2d2ae5..00ecb1c 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/impl/NullableImpl.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/impl/NullableImpl.java
@@ -8,245 +8,245 @@
* Contributors:
* Xored Software Inc - initial API and implementation and/or initial documentation
*******************************************************************************/
-package org.eclipse.rcptt.ecl.core.impl;
-
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
+package org.eclipse.rcptt.ecl.core.impl;
+
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.rcptt.ecl.core.CorePackage;
import org.eclipse.rcptt.ecl.core.Nullable;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Nullable</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.rcptt.ecl.core.impl.NullableImpl#getValue <em>Value</em>}</li>
- * <li>{@link org.eclipse.rcptt.ecl.core.impl.NullableImpl#getType <em>Type</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class NullableImpl extends EObjectImpl implements Nullable {
- /**
- * The cached value of the '{@link #getValue() <em>Value</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getValue()
- * @generated
- * @ordered
- */
- protected EObject value;
-
- /**
- * The default value of the '{@link #getType() <em>Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getType()
- * @generated
- * @ordered
- */
- protected static final String TYPE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getType()
- * @generated
- * @ordered
- */
- protected String type = TYPE_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected NullableImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return CorePackage.Literals.NULLABLE;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject getValue() {
- return value;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetValue(EObject newValue, NotificationChain msgs) {
- EObject oldValue = value;
- value = newValue;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CorePackage.NULLABLE__VALUE, oldValue, newValue);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setValue(EObject newValue) {
- if (newValue != value) {
- NotificationChain msgs = null;
- if (value != null)
- msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CorePackage.NULLABLE__VALUE, null, msgs);
- if (newValue != null)
- msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CorePackage.NULLABLE__VALUE, null, msgs);
- msgs = basicSetValue(newValue, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.NULLABLE__VALUE, newValue, newValue));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getType() {
- return type;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setType(String newType) {
- String oldType = type;
- type = newType;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.NULLABLE__TYPE, oldType, type));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case CorePackage.NULLABLE__VALUE:
- return basicSetValue(null, 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) {
- case CorePackage.NULLABLE__VALUE:
- return getValue();
- case CorePackage.NULLABLE__TYPE:
- return getType();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case CorePackage.NULLABLE__VALUE:
- setValue((EObject)newValue);
- return;
- case CorePackage.NULLABLE__TYPE:
- setType((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case CorePackage.NULLABLE__VALUE:
- setValue((EObject)null);
- return;
- case CorePackage.NULLABLE__TYPE:
- setType(TYPE_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case CorePackage.NULLABLE__VALUE:
- return value != null;
- case CorePackage.NULLABLE__TYPE:
- return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
- }
- 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(" (type: ");
- result.append(type);
- result.append(')');
- return result.toString();
- }
-
-} //NullableImpl
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Nullable</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.rcptt.ecl.core.impl.NullableImpl#getValue <em>Value</em>}</li>
+ * <li>{@link org.eclipse.rcptt.ecl.core.impl.NullableImpl#getType <em>Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class NullableImpl extends EObjectImpl implements Nullable {
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected EObject value;
+
+ /**
+ * The default value of the '{@link #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected static final String TYPE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected String type = TYPE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NullableImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return CorePackage.Literals.NULLABLE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObject getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetValue(EObject newValue, NotificationChain msgs) {
+ EObject oldValue = value;
+ value = newValue;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CorePackage.NULLABLE__VALUE, oldValue, newValue);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(EObject newValue) {
+ if (newValue != value) {
+ NotificationChain msgs = null;
+ if (value != null)
+ msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CorePackage.NULLABLE__VALUE, null, msgs);
+ if (newValue != null)
+ msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CorePackage.NULLABLE__VALUE, null, msgs);
+ msgs = basicSetValue(newValue, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.NULLABLE__VALUE, newValue, newValue));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setType(String newType) {
+ String oldType = type;
+ type = newType;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.NULLABLE__TYPE, oldType, type));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case CorePackage.NULLABLE__VALUE:
+ return basicSetValue(null, 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) {
+ case CorePackage.NULLABLE__VALUE:
+ return getValue();
+ case CorePackage.NULLABLE__TYPE:
+ return getType();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case CorePackage.NULLABLE__VALUE:
+ setValue((EObject)newValue);
+ return;
+ case CorePackage.NULLABLE__TYPE:
+ setType((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case CorePackage.NULLABLE__VALUE:
+ setValue((EObject)null);
+ return;
+ case CorePackage.NULLABLE__TYPE:
+ setType(TYPE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case CorePackage.NULLABLE__VALUE:
+ return value != null;
+ case CorePackage.NULLABLE__TYPE:
+ return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
+ }
+ 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(" (type: ");
+ result.append(type);
+ result.append(')');
+ return result.toString();
+ }
+
+} //NullableImpl
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/impl/SerializedImpl.java b/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/impl/SerializedImpl.java
index 6a4d3a6..4f776ca 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/impl/SerializedImpl.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/impl/SerializedImpl.java
@@ -8,164 +8,164 @@
* Contributors:
* Xored Software Inc - initial API and implementation and/or initial documentation
*******************************************************************************/
-package org.eclipse.rcptt.ecl.core.impl;
-
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
+package org.eclipse.rcptt.ecl.core.impl;
+
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.rcptt.ecl.core.CorePackage;
import org.eclipse.rcptt.ecl.core.Serialized;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Serialized</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.rcptt.ecl.core.impl.SerializedImpl#getBytes <em>Bytes</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class SerializedImpl extends EObjectImpl implements Serialized {
- /**
- * The default value of the '{@link #getBytes() <em>Bytes</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getBytes()
- * @generated
- * @ordered
- */
- protected static final byte[] BYTES_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getBytes() <em>Bytes</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getBytes()
- * @generated
- * @ordered
- */
- protected byte[] bytes = BYTES_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected SerializedImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return CorePackage.Literals.SERIALIZED;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public byte[] getBytes() {
- return bytes;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setBytes(byte[] newBytes) {
- byte[] oldBytes = bytes;
- bytes = newBytes;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.SERIALIZED__BYTES, oldBytes, bytes));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case CorePackage.SERIALIZED__BYTES:
- return getBytes();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case CorePackage.SERIALIZED__BYTES:
- setBytes((byte[])newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case CorePackage.SERIALIZED__BYTES:
- setBytes(BYTES_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case CorePackage.SERIALIZED__BYTES:
- return BYTES_EDEFAULT == null ? bytes != null : !BYTES_EDEFAULT.equals(bytes);
- }
- 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(" (bytes: ");
- result.append(bytes);
- result.append(')');
- return result.toString();
- }
-
-} //SerializedImpl
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Serialized</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.rcptt.ecl.core.impl.SerializedImpl#getBytes <em>Bytes</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class SerializedImpl extends EObjectImpl implements Serialized {
+ /**
+ * The default value of the '{@link #getBytes() <em>Bytes</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getBytes()
+ * @generated
+ * @ordered
+ */
+ protected static final byte[] BYTES_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getBytes() <em>Bytes</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getBytes()
+ * @generated
+ * @ordered
+ */
+ protected byte[] bytes = BYTES_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected SerializedImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return CorePackage.Literals.SERIALIZED;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public byte[] getBytes() {
+ return bytes;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setBytes(byte[] newBytes) {
+ byte[] oldBytes = bytes;
+ bytes = newBytes;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.SERIALIZED__BYTES, oldBytes, bytes));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case CorePackage.SERIALIZED__BYTES:
+ return getBytes();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case CorePackage.SERIALIZED__BYTES:
+ setBytes((byte[])newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case CorePackage.SERIALIZED__BYTES:
+ setBytes(BYTES_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case CorePackage.SERIALIZED__BYTES:
+ return BYTES_EDEFAULT == null ? bytes != null : !BYTES_EDEFAULT.equals(bytes);
+ }
+ 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(" (bytes: ");
+ result.append(bytes);
+ result.append(')');
+ return result.toString();
+ }
+
+} //SerializedImpl
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/util/CommandToStringConverter.java b/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/util/CommandToStringConverter.java
index ba030d8..c5a8a00 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/util/CommandToStringConverter.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.core/src/org/eclipse/rcptt/ecl/core/util/CommandToStringConverter.java
@@ -162,7 +162,8 @@
} else {
EReference ref = (EReference) feature;
EClass eclass = ref.getEReferenceType();
- if (eclass.getClassifierID() == CorePackage.COMMAND) {
+ if (eclass.getEPackage().getName() == CorePackage.eNAME
+ && eclass.getClassifierID() == CorePackage.COMMAND) {
boolean singleLine = !(val instanceof Sequence);
formatter.addAttrName(name, forced);
formatter.openGroup(singleLine);
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.data/META-INF/MANIFEST.MF b/ecl/plugins/org.eclipse.rcptt.ecl.data/META-INF/MANIFEST.MF
index a6386a4..c868f6a 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.data/META-INF/MANIFEST.MF
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.data/META-INF/MANIFEST.MF
@@ -10,12 +10,13 @@
Export-Package: org.eclipse.rcptt.ecl.data.commands,
org.eclipse.rcptt.ecl.data.commands.impl,
org.eclipse.rcptt.ecl.data.commands.util,
+ org.eclipse.rcptt.ecl.data.internal.commands,
org.eclipse.rcptt.ecl.data.objects,
org.eclipse.rcptt.ecl.data.objects.impl,
org.eclipse.rcptt.ecl.data.objects.util
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport,
org.eclipse.rcptt.ecl.core;bundle-version="1.1.0",
- org.eclipse.rcptt.ecl.data;visibility:=reexport,
- org.eclipse.core.resources;resolution:=optional
+ org.eclipse.core.resources;resolution:=optional,
+ org.eclipse.rcptt.ecl.filesystem;bundle-version="1.5.2"
Bundle-ActivationPolicy: lazy
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/ReadCsvFileService.java b/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/ReadCsvFileService.java
index 83a90d8..4818156 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/ReadCsvFileService.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/ReadCsvFileService.java
@@ -26,6 +26,7 @@
import org.eclipse.rcptt.ecl.data.objects.ObjectsFactory;
import org.eclipse.rcptt.ecl.data.objects.Row;
import org.eclipse.rcptt.ecl.data.objects.Table;
+import org.eclipse.rcptt.ecl.filesystem.FileResolver;
import org.eclipse.rcptt.ecl.runtime.ICommandService;
import org.eclipse.rcptt.ecl.runtime.IProcess;
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/ReadLinesService.java b/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/ReadLinesService.java
index 478c655..b08ab1c 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/ReadLinesService.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/ReadLinesService.java
@@ -22,6 +22,7 @@
import org.eclipse.rcptt.ecl.core.Command;
import org.eclipse.rcptt.ecl.data.commands.ReadLines;
import org.eclipse.rcptt.ecl.data.internal.EclDataPlugin;
+import org.eclipse.rcptt.ecl.filesystem.FileResolver;
import org.eclipse.rcptt.ecl.runtime.ICommandService;
import org.eclipse.rcptt.ecl.runtime.IProcess;
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/ReadPropertiesService.java b/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/ReadPropertiesService.java
index 7a7d9c1..c6f22d6 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/ReadPropertiesService.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/ReadPropertiesService.java
@@ -27,6 +27,7 @@
import org.eclipse.rcptt.ecl.core.EclMapEntry;
import org.eclipse.rcptt.ecl.data.commands.ReadProperties;
import org.eclipse.rcptt.ecl.data.internal.EclDataPlugin;
+import org.eclipse.rcptt.ecl.filesystem.FileResolver;
import org.eclipse.rcptt.ecl.runtime.BoxedValues;
import org.eclipse.rcptt.ecl.runtime.ICommandService;
import org.eclipse.rcptt.ecl.runtime.IProcess;
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/WriteCsvFileService.java b/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/WriteCsvFileService.java
index 6721e02..f819615 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/WriteCsvFileService.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/WriteCsvFileService.java
@@ -24,6 +24,7 @@
import org.eclipse.rcptt.ecl.data.internal.EclDataPlugin;
import org.eclipse.rcptt.ecl.data.objects.Row;
import org.eclipse.rcptt.ecl.data.objects.Table;
+import org.eclipse.rcptt.ecl.filesystem.FileResolver;
import org.eclipse.rcptt.ecl.runtime.ICommandService;
import org.eclipse.rcptt.ecl.runtime.IProcess;
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/WriteLinesService.java b/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/WriteLinesService.java
index 4e6c89c..d3ea7a5 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/WriteLinesService.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/WriteLinesService.java
@@ -21,6 +21,7 @@
import org.eclipse.rcptt.ecl.core.Command;
import org.eclipse.rcptt.ecl.data.commands.WriteLines;
import org.eclipse.rcptt.ecl.data.internal.EclDataPlugin;
+import org.eclipse.rcptt.ecl.filesystem.FileResolver;
import org.eclipse.rcptt.ecl.runtime.CoreUtils;
import org.eclipse.rcptt.ecl.runtime.ICommandService;
import org.eclipse.rcptt.ecl.runtime.IProcess;
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/META-INF/MANIFEST.MF b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/META-INF/MANIFEST.MF
index 486e5a5..4cdee80 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/META-INF/MANIFEST.MF
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/META-INF/MANIFEST.MF
@@ -14,5 +14,6 @@
org.eclipse.emf.ecore;visibility:=reexport,
org.eclipse.rcptt.ecl.core;visibility:=reexport,
org.eclipse.rcptt.ecl.dispatch,
- org.eclipse.core.filesystem
+ org.eclipse.core.filesystem,
+ org.eclipse.core.resources
Bundle-ActivationPolicy: lazy
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/DeleteFile.java b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/DeleteFile.java
new file mode 100644
index 0000000..2635ee0
--- /dev/null
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/DeleteFile.java
@@ -0,0 +1,51 @@
+/**
+ */
+package org.eclipse.rcptt.ecl.filesystem;
+
+import org.eclipse.rcptt.ecl.core.Command;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Delete File</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.rcptt.ecl.filesystem.DeleteFile#getUri <em>Uri</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.rcptt.ecl.filesystem.FilesystemPackage#getDeleteFile()
+ * @model annotation="http://www.eclipse.org/ecl/docs description='Deletes file or folder identified by URI.\r\nCurrently supported schemes are workspace:/ for files in workspace and file:/ for files on local file system.' returns='Nothing' example='delete-file \"file:/C:/temp/1.txt\"\r\ndelete-file [uri-from-path \"C:/temp/2.txt\"]\r\nuri-from-path \"C:/temp/3.txt\" | delete-file\r\nget-file \"file:/C:/temp/4.txt\" | delete-file\r\nstr \"workspace:/MyProject/text.txt\" | delete-file\r\n\r\n'"
+ * @generated
+ */
+public interface DeleteFile 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.ecl.filesystem.FilesystemPackage#getDeleteFile_Uri()
+ * @model required="true"
+ * annotation="http://www.eclipse.org/ecl/docs description='URI of a file or directory. Can be created manually, or with uri-from-path.' example='file:/C:/temp'"
+ * @generated
+ */
+ String getUri();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.rcptt.ecl.filesystem.DeleteFile#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);
+
+} // DeleteFile
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/FilesystemFactory.java b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/FilesystemFactory.java
index 1a6c865..dd65ae7 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/FilesystemFactory.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/FilesystemFactory.java
@@ -67,6 +67,15 @@
File createFile();
/**
+ * Returns a new object of class '<em>Delete File</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Delete File</em>'.
+ * @generated
+ */
+ DeleteFile createDeleteFile();
+
+ /**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/FilesystemPackage.java b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/FilesystemPackage.java
index 372d45f..2d6fe97 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/FilesystemPackage.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/FilesystemPackage.java
@@ -251,6 +251,53 @@
/**
+ * The meta object id for the '{@link org.eclipse.rcptt.ecl.filesystem.impl.DeleteFileImpl <em>Delete File</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.rcptt.ecl.filesystem.impl.DeleteFileImpl
+ * @see org.eclipse.rcptt.ecl.filesystem.impl.FilesystemPackageImpl#getDeleteFile()
+ * @generated
+ */
+ int DELETE_FILE = 4;
+
+ /**
+ * The feature id for the '<em><b>Host</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DELETE_FILE__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 DELETE_FILE__BINDINGS = CorePackage.COMMAND__BINDINGS;
+
+ /**
+ * The feature id for the '<em><b>Uri</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DELETE_FILE__URI = CorePackage.COMMAND_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Delete File</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DELETE_FILE_FEATURE_COUNT = CorePackage.COMMAND_FEATURE_COUNT + 1;
+
+
+ /**
* Returns the meta object for class '{@link org.eclipse.rcptt.ecl.filesystem.CopyFile <em>Copy File</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -357,6 +404,27 @@
EAttribute getFile_Uri();
/**
+ * Returns the meta object for class '{@link org.eclipse.rcptt.ecl.filesystem.DeleteFile <em>Delete File</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Delete File</em>'.
+ * @see org.eclipse.rcptt.ecl.filesystem.DeleteFile
+ * @generated
+ */
+ EClass getDeleteFile();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.rcptt.ecl.filesystem.DeleteFile#getUri <em>Uri</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Uri</em>'.
+ * @see org.eclipse.rcptt.ecl.filesystem.DeleteFile#getUri()
+ * @see #getDeleteFile()
+ * @generated
+ */
+ EAttribute getDeleteFile_Uri();
+
+ /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -466,6 +534,24 @@
*/
EAttribute FILE__URI = eINSTANCE.getFile_Uri();
+ /**
+ * The meta object literal for the '{@link org.eclipse.rcptt.ecl.filesystem.impl.DeleteFileImpl <em>Delete File</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.rcptt.ecl.filesystem.impl.DeleteFileImpl
+ * @see org.eclipse.rcptt.ecl.filesystem.impl.FilesystemPackageImpl#getDeleteFile()
+ * @generated
+ */
+ EClass DELETE_FILE = eINSTANCE.getDeleteFile();
+
+ /**
+ * The meta object literal for the '<em><b>Uri</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute DELETE_FILE__URI = eINSTANCE.getDeleteFile_Uri();
+
}
} //FilesystemPackage
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/impl/DeleteFileImpl.java b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/impl/DeleteFileImpl.java
new file mode 100644
index 0000000..065bee6
--- /dev/null
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/impl/DeleteFileImpl.java
@@ -0,0 +1,164 @@
+/**
+ */
+package org.eclipse.rcptt.ecl.filesystem.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.rcptt.ecl.core.impl.CommandImpl;
+
+import org.eclipse.rcptt.ecl.filesystem.DeleteFile;
+import org.eclipse.rcptt.ecl.filesystem.FilesystemPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Delete File</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.rcptt.ecl.filesystem.impl.DeleteFileImpl#getUri <em>Uri</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DeleteFileImpl extends CommandImpl implements DeleteFile {
+ /**
+ * 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;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DeleteFileImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FilesystemPackage.Literals.DELETE_FILE;
+ }
+
+ /**
+ * <!-- 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, FilesystemPackage.DELETE_FILE__URI, oldUri, uri));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FilesystemPackage.DELETE_FILE__URI:
+ return getUri();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FilesystemPackage.DELETE_FILE__URI:
+ setUri((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FilesystemPackage.DELETE_FILE__URI:
+ setUri(URI_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FilesystemPackage.DELETE_FILE__URI:
+ return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri);
+ }
+ 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(')');
+ return result.toString();
+ }
+
+} //DeleteFileImpl
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/impl/FilesystemFactoryImpl.java b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/impl/FilesystemFactoryImpl.java
index 7bf4b3d..8b94006 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/impl/FilesystemFactoryImpl.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/impl/FilesystemFactoryImpl.java
@@ -36,7 +36,7 @@
*/
public static FilesystemFactory init() {
try {
- FilesystemFactory theFilesystemFactory = (FilesystemFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/ecl/filesystem.ecore");
+ FilesystemFactory theFilesystemFactory = (FilesystemFactory)EPackage.Registry.INSTANCE.getEFactory(FilesystemPackage.eNS_URI);
if (theFilesystemFactory != null) {
return theFilesystemFactory;
}
@@ -69,6 +69,7 @@
case FilesystemPackage.URI_FROM_PATH: return createUriFromPath();
case FilesystemPackage.GET_FILE: return createGetFile();
case FilesystemPackage.FILE: return createFile();
+ case FilesystemPackage.DELETE_FILE: return createDeleteFile();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -119,6 +120,16 @@
* <!-- end-user-doc -->
* @generated
*/
+ public DeleteFile createDeleteFile() {
+ DeleteFileImpl deleteFile = new DeleteFileImpl();
+ return deleteFile;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public FilesystemPackage getFilesystemPackage() {
return (FilesystemPackage)getEPackage();
}
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/impl/FilesystemPackageImpl.java b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/impl/FilesystemPackageImpl.java
index 78a9eac..7e45b67 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/impl/FilesystemPackageImpl.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/impl/FilesystemPackageImpl.java
@@ -21,6 +21,7 @@
import org.eclipse.rcptt.ecl.core.CorePackage;
import org.eclipse.rcptt.ecl.filesystem.CopyFile;
+import org.eclipse.rcptt.ecl.filesystem.DeleteFile;
import org.eclipse.rcptt.ecl.filesystem.File;
import org.eclipse.rcptt.ecl.filesystem.FilesystemFactory;
import org.eclipse.rcptt.ecl.filesystem.FilesystemPackage;
@@ -63,6 +64,13 @@
private EClass fileEClass = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass deleteFileEClass = null;
+
+ /**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
@@ -221,6 +229,24 @@
* <!-- end-user-doc -->
* @generated
*/
+ public EClass getDeleteFile() {
+ return deleteFileEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getDeleteFile_Uri() {
+ return (EAttribute)deleteFileEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public FilesystemFactory getFilesystemFactory() {
return (FilesystemFactory)getEFactoryInstance();
}
@@ -257,6 +283,9 @@
fileEClass = createEClass(FILE);
createEAttribute(fileEClass, FILE__URI);
+
+ deleteFileEClass = createEClass(DELETE_FILE);
+ createEAttribute(deleteFileEClass, DELETE_FILE__URI);
}
/**
@@ -294,6 +323,7 @@
copyFileEClass.getESuperTypes().add(theCorePackage.getCommand());
uriFromPathEClass.getESuperTypes().add(theCorePackage.getCommand());
getFileEClass.getESuperTypes().add(theCorePackage.getCommand());
+ deleteFileEClass.getESuperTypes().add(theCorePackage.getCommand());
// Initialize classes and features; add operations and parameters
initEClass(copyFileEClass, CopyFile.class, "CopyFile", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -310,6 +340,9 @@
initEClass(fileEClass, File.class, "File", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getFile_Uri(), theEcorePackage.getEString(), "uri", null, 1, 1, File.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(deleteFileEClass, DeleteFile.class, "DeleteFile", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getDeleteFile_Uri(), theEcorePackage.getEString(), "uri", null, 1, 1, DeleteFile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
// Create resource
createResource(eNS_URI);
@@ -327,7 +360,7 @@
* @generated
*/
protected void createDocsAnnotations() {
- String source = "http://www.eclipse.org/ecl/docs";
+ String source = "http://www.eclipse.org/ecl/docs";
addAnnotation
(copyFileEClass,
source,
@@ -335,39 +368,39 @@
"description", "Copies <code>source</code> file or directory into <code>destination</code> directory, optionally giving it a new <code>name</code>.",
"returns", "Nothing.",
"example", "copy-file -source \"/Users/Ulik_MacAir/aut-Q7-1.3.12-B2/Project/t.test\" \n-destination \"/Users/Ulik_MacAir/aut-Q7-1.3.12-B2/Project/Folder\" -name \"Clone.test\""
- });
+ });
addAnnotation
(getCopyFile_Source(),
source,
new String[] {
"description", "Source file or directory."
- });
+ });
addAnnotation
(getCopyFile_Destination(),
source,
new String[] {
"description", "Destination directory under which the <code>source</code> file or directory will be stored."
- });
+ });
addAnnotation
(getCopyFile_Name(),
source,
new String[] {
"description", "New name for the <code>source</code> file or directory."
- });
+ });
addAnnotation
(uriFromPathEClass,
source,
new String[] {
"returns", "URI string. Platform independent (can be used on every OS).",
"example", "get-file [uri-from-path \"C:\\windows\"] | get exists"
- });
+ });
addAnnotation
(getUriFromPath_Path(),
source,
new String[] {
"description", "Platform-dependednt filesystem path.",
"example", "C:\\windows\\system32"
- });
+ });
addAnnotation
(getFileEClass,
source,
@@ -375,13 +408,28 @@
"returns", "A File object. Properties: uri, name, exists, children.",
"description", "Creates a file object by its URI.",
"example", "get-file \"file:/C:/Windows/System32\" | get exists"
- });
+ });
addAnnotation
(getGetFile_Uri(),
source,
new String[] {
"description", "URI of a file or directory. Can be created manually, or with uri-from-path.",
"example", "file:/C:/windows/system32"
+ });
+ addAnnotation
+ (deleteFileEClass,
+ source,
+ new String[] {
+ "description", "Deletes file or folder identified by URI.\r\nCurrently supported schemes are workspace:/ for files in workspace and file:/ for files on local file system.",
+ "returns", "Nothing",
+ "example", "delete-file \"file:/C:/temp/1.txt\"\r\ndelete-file [uri-from-path \"C:/temp/2.txt\"]\r\nuri-from-path \"C:/temp/3.txt\" | delete-file\r\nget-file \"file:/C:/temp/4.txt\" | delete-file\r\nstr \"workspace:/MyProject/text.txt\" | delete-file\r\n\r\n"
+ });
+ addAnnotation
+ (getDeleteFile_Uri(),
+ source,
+ new String[] {
+ "description", "URI of a file or directory. Can be created manually, or with uri-from-path.",
+ "example", "file:/C:/temp"
});
}
@@ -392,17 +440,22 @@
* @generated
*/
protected void createInputAnnotations() {
- String source = "http://www.eclipse.org/ecl/input";
+ String source = "http://www.eclipse.org/ecl/input";
addAnnotation
(getUriFromPath_Path(),
source,
new String[] {
- });
+ });
addAnnotation
(getGetFile_Uri(),
source,
new String[] {
});
+ addAnnotation
+ (getDeleteFile_Uri(),
+ source,
+ new String[] {
+ });
}
} //FilesystemPackageImpl
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/util/FilesystemAdapterFactory.java b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/util/FilesystemAdapterFactory.java
index 4cc27e7..6a41d49 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/util/FilesystemAdapterFactory.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/util/FilesystemAdapterFactory.java
@@ -95,6 +95,10 @@
return createFileAdapter();
}
@Override
+ public Adapter caseDeleteFile(DeleteFile object) {
+ return createDeleteFileAdapter();
+ }
+ @Override
public Adapter caseCommand(Command object) {
return createCommandAdapter();
}
@@ -175,6 +179,20 @@
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.rcptt.ecl.filesystem.DeleteFile <em>Delete File</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.rcptt.ecl.filesystem.DeleteFile
+ * @generated
+ */
+ public Adapter createDeleteFileAdapter() {
+ return null;
+ }
+
+ /**
* Creates a new adapter for an object of class '{@link org.eclipse.rcptt.ecl.core.Command <em>Command</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/util/FilesystemSwitch.java b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/util/FilesystemSwitch.java
index dee879f..4a10695 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/util/FilesystemSwitch.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/gen-src/org/eclipse/rcptt/ecl/filesystem/util/FilesystemSwitch.java
@@ -121,6 +121,13 @@
if (result == null) result = defaultCase(theEObject);
return result;
}
+ case FilesystemPackage.DELETE_FILE: {
+ DeleteFile deleteFile = (DeleteFile)theEObject;
+ T result = caseDeleteFile(deleteFile);
+ if (result == null) result = caseCommand(deleteFile);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
default: return defaultCase(theEObject);
}
}
@@ -186,6 +193,21 @@
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Delete File</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Delete File</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDeleteFile(DeleteFile object) {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of '<em>Command</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/model/filesystem.ecore b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/model/filesystem.ecore
index 40674b5..5074d90 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/model/filesystem.ecore
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/model/filesystem.ecore
@@ -56,4 +56,18 @@
<eClassifiers xsi:type="ecore:EClass" name="File">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="uri" lowerBound="1" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="DeleteFile" eSuperTypes="../../org.eclipse.rcptt.ecl.core/model/ecl.ecore#//Command">
+ <eAnnotations source="http://www.eclipse.org/ecl/docs">
+ <details key="description" value="Deletes file or folder identified by URI.
Currently supported schemes are workspace:/ for files in workspace and file:/ for files on local file system."/>
+ <details key="returns" value="Nothing"/>
+ <details key="example" value="delete-file "file:/C:/temp/1.txt"
delete-file [uri-from-path "C:/temp/2.txt"]
uri-from-path "C:/temp/3.txt" | delete-file
get-file "file:/C:/temp/4.txt" | delete-file
str "workspace:/MyProject/text.txt" | delete-file

"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="uri" lowerBound="1" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/ecl/input"/>
+ <eAnnotations source="http://www.eclipse.org/ecl/docs">
+ <details key="description" value="URI of a file or directory. Can be created manually, or with uri-from-path."/>
+ <details key="example" value="file:/C:/temp"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
</ecore:EPackage>
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/model/filesystem.genmodel b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/model/filesystem.genmodel
index 312fd07..93512e7 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/model/filesystem.genmodel
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/model/filesystem.genmodel
@@ -1,8 +1,7 @@
<?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.ecl.filesystem/gen-src"
- modelPluginID="org.eclipse.rcptt.ecl.filesystem" modelName="Filesystem" editPluginClass="org.eclipse.rcptt.ecl.filesystem.provider.FilesystemEditPlugin"
+<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.ecl.filesystem/gen-src" modelPluginID="org.eclipse.rcptt.ecl.filesystem"
+ modelName="Filesystem" editPluginClass="org.eclipse.rcptt.ecl.filesystem.provider.FilesystemEditPlugin"
editorPluginClass="org.eclipse.rcptt.ecl.filesystem.presentation.FilesystemEditorPlugin"
testSuiteClass="org.eclipse.rcptt.ecl.filesystem.tests.FilesystemAllTests" importerID="org.eclipse.emf.importer.ecore"
complianceLevel="6.0" copyrightFields="false" runtimeVersion="2.5" usedGenPackages="../../org.eclipse.rcptt.ecl.core/model/ecl.genmodel#//core platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore">
@@ -23,5 +22,8 @@
<genClasses ecoreClass="filesystem.ecore#//File">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute filesystem.ecore#//File/uri"/>
</genClasses>
+ <genClasses ecoreClass="filesystem.ecore#//DeleteFile">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute filesystem.ecore#//DeleteFile/path"/>
+ </genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/plugin.xml b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/plugin.xml
index f14ee0f..bba1635 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/plugin.xml
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/plugin.xml
@@ -27,6 +27,11 @@
name="GetFile"
namespace="http://www.eclipse.org/ecl/filesystem.ecore">
</scriptlet>
+ <scriptlet
+ class="org.eclipse.rcptt.ecl.filesystem.internal.commands.DeleteFileService"
+ name="DeleteFile"
+ namespace="http://www.eclipse.org/ecl/filesystem.ecore">
+ </scriptlet>
</extension>
<extension
point="org.eclipse.rcptt.ecl.dispatch.scriptletExtension">
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/EclFilesystemPlugin.java b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/EclFilesystemPlugin.java
index e6f5155..8490743 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/EclFilesystemPlugin.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/EclFilesystemPlugin.java
@@ -66,11 +66,12 @@
return plugin;
}
- public static Status createError(String message, Throwable throwable) {
- return new Status(IStatus.ERROR, EclFilesystemPlugin.PLUGIN_ID, message, throwable);
+ public static Status createError(String message, Object... args) {
+ return createError(null, message, args);
}
- public static Status createError(String message) {
- return createError(message, null);
+ public static Status createError(Throwable throwable, String message, Object... args) {
+ return new Status(IStatus.ERROR, EclFilesystemPlugin.PLUGIN_ID, String.format(message, args), throwable);
}
+
}
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/FileResolver.java b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/FileResolver.java
similarity index 88%
rename from ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/FileResolver.java
rename to ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/FileResolver.java
index fab58ed..ed3b085 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.data/src/org/eclipse/rcptt/ecl/data/internal/commands/FileResolver.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/FileResolver.java
@@ -8,9 +8,9 @@
* Contributors:
* Xored Software Inc - initial API and implementation and/or initial documentation
*******************************************************************************/
-package org.eclipse.rcptt.ecl.data.internal.commands;
+package org.eclipse.rcptt.ecl.filesystem;
-import static org.eclipse.rcptt.ecl.data.internal.EclDataPlugin.createErr;
+import static org.eclipse.rcptt.ecl.filesystem.EclFilesystemPlugin.createError;
import java.io.File;
import java.net.URI;
@@ -55,14 +55,14 @@
try {
return resolve(new URI(uri));
} catch (URISyntaxException e) {
- throw new CoreException(createErr(e, "Cannot parse URI %s", uri));
+ throw new CoreException(createError(e, "Cannot parse URI %s", uri));
}
}
public static File resolve(URI uri) throws CoreException {
Resolver resolver = resolvers.get(uri.getScheme());
if (resolver == null) {
- throw new CoreException(createErr("Usupported scheme %s",
+ throw new CoreException(createError("Usupported scheme %s",
uri.getScheme()));
}
return resolver.resolve(uri);
@@ -88,7 +88,7 @@
.getLocation().toFile();
} catch (NoClassDefFoundError e) {
throw new CoreException(
- createErr("Resources plugin is not available, "
+ createError("Resources plugin is not available, "
+ "cannot use 'workspace:' scheme"));
}
}
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/internal/commands/CopyFileService.java b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/internal/commands/CopyFileService.java
index da3137d..dc2f72f 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/internal/commands/CopyFileService.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/internal/commands/CopyFileService.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.rcptt.ecl.filesystem.internal.commands;
+import static org.eclipse.rcptt.ecl.filesystem.EclFilesystemPlugin.createError;
+
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
@@ -35,23 +37,23 @@
String name = copyFile.getName();
if (src == null || src.length() == 0)
- return error("Source file/directory is not specified.");
+ return createError("Source file/directory is not specified.");
if (dst == null || dst.length() == 0)
- return error("Destination directory is not specified.");
+ return createError("Destination directory is not specified.");
try {
File srcFile = new File(src).getCanonicalFile();
if (!srcFile.exists())
- return error("Source file/directory \"%s\" does not exist.",
+ return createError("Source file/directory \"%s\" does not exist.",
srcFile);
File dstFile = new File(dst).getCanonicalFile();
if (dstFile.exists() && !dstFile.isDirectory())
- return error("Destination \"%s\" must be a directory.", dstFile);
+ return createError("Destination \"%s\" must be a directory.", dstFile);
if (!dstFile.exists() && !dstFile.mkdirs())
- return error(
+ return createError(
"Unable to create the destination directory \"%s\".",
dstFile);
@@ -65,19 +67,19 @@
else if (srcFile.isDirectory())
return copyDirectory(srcFile, dstFile);
else
- return error("Unsupported source type.");
+ return createError("Unsupported source type.");
} catch (Exception e) {
- return error(e.getMessage());
+ return createError(e.getMessage());
}
}
private static IStatus copyFile(File src, File dst) throws IOException {
if (dst.exists())
- return error("Destination \"%s\" already exists.", dst);
+ return createError("Destination \"%s\" already exists.", dst);
File parent = dst.getParentFile();
if (parent != null && !parent.exists() && !parent.mkdirs())
- return error("Unable to create the destination directory \"%s\".",
+ return createError("Unable to create the destination directory \"%s\".",
parent);
doCopyFile(src, dst);
@@ -120,14 +122,14 @@
private static IStatus copyDirectory(File src, File dst) throws IOException {
if (dst.exists())
- return error("Destination \"%s\" already exists.", dst);
+ return createError("Destination \"%s\" already exists.", dst);
if (isSourceIncludesDestination(dst, src))
- return error("Destination \"%s\" is nested inside source \"%s\".",
+ return createError("Destination \"%s\" is nested inside source \"%s\".",
dst, src);
if (!dst.mkdirs())
- return error("Unable to create the destination directory \"%s\".",
+ return createError("Unable to create the destination directory \"%s\".",
dst);
copyFilesAndDirectories(src, dst);
@@ -160,8 +162,4 @@
}
}
- private static Status error(String message, Object... args) {
- return new Status(Status.ERROR, EclFilesystemPlugin.PLUGIN_ID,
- String.format(message, args));
- }
}
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/internal/commands/DeleteFileService.java b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/internal/commands/DeleteFileService.java
new file mode 100644
index 0000000..ecf6c6b
--- /dev/null
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/internal/commands/DeleteFileService.java
@@ -0,0 +1,49 @@
+package org.eclipse.rcptt.ecl.filesystem.internal.commands;
+
+import static org.eclipse.rcptt.ecl.filesystem.EclFilesystemPlugin.createError;
+
+import java.io.File;
+import java.net.URI;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.rcptt.ecl.core.Command;
+import org.eclipse.rcptt.ecl.filesystem.DeleteFile;
+import org.eclipse.rcptt.ecl.filesystem.FileResolver;
+import org.eclipse.rcptt.ecl.runtime.ICommandService;
+import org.eclipse.rcptt.ecl.runtime.IProcess;
+
+public class DeleteFileService implements ICommandService {
+
+ @Override
+ public IStatus service(Command command, IProcess context) throws InterruptedException, CoreException {
+ DeleteFile deleteFile = (DeleteFile) command;
+ String uriString = deleteFile.getUri();
+
+ if (uriString == null || uriString.length() == 0)
+ return createError("No uri argument for delete-file command.");
+
+ try {
+ URI uri = new URI(uriString);
+ File file = FileResolver.resolve(uri);
+ if (file != null) {
+ uri = file.toURI();
+ }
+
+ IFileStore input = EFS.getStore(uri);
+ if (!input.fetchInfo().exists()) {
+ return createError("\"%s\" not found.", uriString);
+ }
+
+ input.delete(EFS.NONE, null);
+
+ return Status.OK_STATUS;
+ } catch (Exception e) {
+ return createError(e.getMessage(), e);
+ }
+ }
+
+}
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/internal/commands/GetFileService.java b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/internal/commands/GetFileService.java
index a4f0cf8..416b109 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/internal/commands/GetFileService.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/internal/commands/GetFileService.java
@@ -38,7 +38,7 @@
try {
URIUtil.fromString(command.getUri());
} catch (URISyntaxException e) {
- throw new CoreException(createError("Failed to parse file URI: "+ command.getUri()));
+ throw new CoreException(createError("Failed to parse file URI: %s", command.getUri()));
}
rv.setUri(command.getUri());
return rv;
diff --git a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/internal/commands/GetFromFileService.java b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/internal/commands/GetFromFileService.java
index 1c6759c..279e689 100644
--- a/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/internal/commands/GetFromFileService.java
+++ b/ecl/plugins/org.eclipse.rcptt.ecl.filesystem/src/org/eclipse/rcptt/ecl/filesystem/internal/commands/GetFromFileService.java
@@ -71,8 +71,7 @@
CoreException {
Key key = parseKey(command.getKey());
if (key == null) {
- throw new CoreException(createError("Invalid key: "
- + command.getKey()));
+ throw new CoreException(createError("Invalid key: %s", command.getKey()));
}
String uriString = ((File) command.getInput()).getUri();
URI uri = URI.create(uriString);
@@ -87,7 +86,7 @@
case NAME:
return handleName(input);
}
- throw new CoreException(createError("Wrong key: " + key));
+ throw new CoreException(createError("Wrong key: %s", key));
}
private boolean handleIsDirectory(IFileStore input) throws CoreException {
diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/editors/EditorContent.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/editors/EditorContent.java
index 165933c..9cebcbd 100644
--- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/editors/EditorContent.java
+++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/editors/EditorContent.java
@@ -26,21 +26,6 @@
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.program.Program;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.ui.IWorkbenchPartSite;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.events.IHyperlinkListener;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Hyperlink;
-import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.ui.views.properties.IPropertySource;
-
import org.eclipse.rcptt.core.model.IQ7NamedElement;
import org.eclipse.rcptt.core.model.ITestCase;
import org.eclipse.rcptt.core.model.ModelException;
@@ -55,6 +40,20 @@
import org.eclipse.rcptt.ui.controls.VerificationsTable;
import org.eclipse.rcptt.ui.editors.NamedElementEditorActions.INamedElementActions;
import org.eclipse.rcptt.ui.editors.ecl.EclSourceViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.program.Program;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.forms.events.HyperlinkEvent;
+import org.eclipse.ui.forms.events.IHyperlinkListener;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Hyperlink;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.IPropertySource;
public class EditorContent implements INamedElementActions {
@@ -71,7 +70,7 @@
private StyledText externalRefControl;
private boolean scenarioEditor;
- private boolean supportRefs;
+ private final boolean supportRefs;
private VerificationsTable verificationsTable;
private Section verificationsSection;
@@ -465,7 +464,7 @@
public void doTextCommand(int fAction) {
if (descriptionComposite.getDescriptionControl().isFocusControl()) {
descriptionComposite.getDescriptionControl().invokeAction(fAction);
- } else if (externalRefControl.isFocusControl()) {
+ } else if (externalRefControl != null && externalRefControl.isFocusControl()) {
externalRefControl.invokeAction(fAction);
}
}
diff --git a/rcpttTests/ECL_IDE_module/Contexts/Ecl Script Context/Bug 442685 NullPointerException.test b/rcpttTests/ECL_IDE_module/Contexts/Ecl Script Context/Bug 442685 NullPointerException.test
new file mode 100644
index 0000000..bffa412
--- /dev/null
+++ b/rcpttTests/ECL_IDE_module/Contexts/Ecl Script Context/Bug 442685 NullPointerException.test
@@ -0,0 +1,55 @@
+--- RCPTT testcase ---
+Format-Version: 1.0
+Contexts: _ymiyse5IEeCU6db9MgIBkA,_IeEQkPSUEeCE1L2j6bYoFw
+Element-Name: Bug 442685 NullPointerException
+Element-Type: testcase
+Element-Version: 3.0
+External-Reference: https://bugs.eclipse.org/bugs/show_bug.cgi?id=442685
+Id: _NjJO0C3YEeSo8tQHjhwDDw
+Runtime-Version: 1.5.2.qualifier
+Save-Time: 8/27/14 6:23 PM
+Testcase-Type: ecl
+
+------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa
+Content-Type: text/plain
+Entry-Name: .description
+
+Copyright (c) 2009, 2014 Xored Software Inc and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Xored Software Inc - initial creation and/or initial documentation
+--------------------------------------------------------------------------------
+
+TEST STEPS
+
+1. Open Ecl Script context editor;
+2. Type Home/End in Name field;
+3. Make sure there are no error.
+------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa--
+------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
+Content-Type: text/ecl
+Entry-Name: .content
+
+get-view "Test Explorer" | get-tree | select "Q7Project/EclContext" | double-click
+
+exec-with-options {
+ get-editor EclContext | get-editbox -after [get-label "Name:"] | key-type Home
+ verify-error { get-window "Problem Occurred" }
+} -allowStatusDialog
+
+
+exec-with-options {
+ get-editor EclContext | get-editbox -after [get-label "Name:"] | key-type End
+ verify-error { get-window "Problem Occurred" }
+} -allowStatusDialog
+
+exec-with-options {
+ get-editor EclContext | get-editbox -after [get-label "Name:"] | key-type "M1+ARROW_RIGHT"
+ verify-error { get-window "Problem Occurred" }
+} -allowStatusDialog
+
+------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--
diff --git a/rcpttTests/ECL_IDE_module/selfAUTTests/q7commands/DeleteDirectory.test b/rcpttTests/ECL_IDE_module/selfAUTTests/q7commands/DeleteDirectory.test
new file mode 100644
index 0000000..df611ce
--- /dev/null
+++ b/rcpttTests/ECL_IDE_module/selfAUTTests/q7commands/DeleteDirectory.test
@@ -0,0 +1,51 @@
+--- RCPTT testcase ---
+Format-Version: 1.0
+Contexts: _ymiyse5IEeCU6db9MgIBkA,_roqd8KekEeC8_YI4qVLWTA
+Element-Name: DeleteDerictory
+Element-Type: testcase
+Element-Version: 3.0
+External-Reference:
+Id: _Mmvu0Ck0EeSQyvXPk2B9Hw
+Runtime-Version: 1.5.0.201406020630
+Save-Time: 8/29/14 2:16 PM
+Testcase-Type: ecl
+
+------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa
+Content-Type: text/plain
+Entry-Name: .description
+
+Copyright (c) 2009, 2014 Xored Software Inc and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Xored Software Inc - initial creation and/or initial documentation
+--------------------------------------------------------------------------------
+
+TEST STEPS:
+
+1. Execute command "delete-file" on directory
+2. Make sure that directory is deleted
+------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa--
+------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
+Content-Type: text/ecl
+Entry-Name: .content
+
+delete-file [concat [uri-from-path [substitute-variables "${workspace_loc}"]] "FilesForContextEditor/folder"]
+get-view "Test Explorer" | get-tree | get-item FilesForContextEditor | get-property childCount | equals 2 | verify-true
+get-view "Test Explorer" | get-tree | select FilesForContextEditor | get-menu Refresh | click
+get-view "Test Explorer" | get-tree | get-item FilesForContextEditor | get-property childCount | equals 1 | verify-true
+
+with [get-view "Test Explorer" | get-tree] {
+ get-item "FilesForContextEditor/text.txt" | get-property caption | equals text.txt | verify-true
+ verify-error {
+ get-item "FilesForContextEditor/folder"
+ }
+}
+
+verify-error {
+ delete-file [concat [uri-from-path [substitute-variables "${workspace_loc}"]] "FilesForContextEditor/folder"]
+}
+------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--
diff --git a/rcpttTests/ECL_IDE_module/selfAUTTests/q7commands/DeleteFile.test b/rcpttTests/ECL_IDE_module/selfAUTTests/q7commands/DeleteFile.test
new file mode 100644
index 0000000..ee9feca
--- /dev/null
+++ b/rcpttTests/ECL_IDE_module/selfAUTTests/q7commands/DeleteFile.test
@@ -0,0 +1,57 @@
+--- RCPTT testcase ---
+Format-Version: 1.0
+Contexts: _ymiyse5IEeCU6db9MgIBkA,_roqd8KekEeC8_YI4qVLWTA
+Element-Name: DeleteFile
+Element-Type: testcase
+Element-Version: 3.0
+External-Reference:
+Id: _Ntb8ACkyEeSQyvXPk2B9Hw
+Runtime-Version: 1.5.0.201406020630
+Save-Time: 8/29/14 2:29 PM
+Testcase-Type: ecl
+
+------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa
+Content-Type: text/plain
+Entry-Name: .description
+
+Copyright (c) 2009, 2014 Xored Software Inc and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Xored Software Inc - initial creation and/or initial documentation
+--------------------------------------------------------------------------------
+
+TEST STEPS:
+
+1. Execute command "delete-file"
+2. Make sure that file is deleted
+------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa--
+------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
+Content-Type: text/ecl
+Entry-Name: .content
+
+delete-file [concat [uri-from-path [substitute-variables "${workspace_loc}"]] "FilesForContextEditor/text.txt"]
+
+get-view "Test Explorer" | get-tree | get-item FilesForContextEditor | get-property childCount | equals 2 | verify-true
+get-view "Test Explorer" | get-tree | select FilesForContextEditor | get-menu Refresh | click
+get-view "Test Explorer" | get-tree | get-item FilesForContextEditor | get-property childCount | equals 1 | verify-true
+
+with [get-view "Test Explorer" | get-tree] {
+ get-item "FilesForContextEditor/folder" | get-property caption | equals folder | verify-true
+ verify-error {
+ get-item "FilesForContextEditor/text.txt"
+ }
+}
+
+verify-error {
+ delete-file [concat [uri-from-path [substitute-variables "${workspace_loc}"]] "FilesForContextEditor/text.txt"]
+}
+verify-error {
+ delete-file [substitute-variables "${workspace_loc}/FilesForContextEditor/text.txt"]
+}
+
+
+------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--
diff --git a/rcpttTests/ECL_IDE_module/selfAUTTests/q7commands/DeleteFileUriInput.test b/rcpttTests/ECL_IDE_module/selfAUTTests/q7commands/DeleteFileUriInput.test
new file mode 100644
index 0000000..571e847
--- /dev/null
+++ b/rcpttTests/ECL_IDE_module/selfAUTTests/q7commands/DeleteFileUriInput.test
@@ -0,0 +1,53 @@
+--- RCPTT testcase ---
+Format-Version: 1.0
+Contexts: _ymiyse5IEeCU6db9MgIBkA,_roqd8KekEeC8_YI4qVLWTA
+Element-Name: DeleteFileUriInput
+Element-Type: testcase
+Element-Version: 3.0
+External-Reference:
+Id: __t9-sC9LEeSQ0rUJOTehDQ
+Runtime-Version: 1.5.0.201406020630
+Save-Time: 8/29/14 2:44 PM
+Testcase-Type: ecl
+
+------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa
+Content-Type: text/plain
+Entry-Name: .description
+
+Copyright (c) 2009, 2014 Xored Software Inc and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Xored Software Inc - initial creation and/or initial documentation
+--------------------------------------------------------------------------------
+
+TEST STEPS:
+
+1. Execute command "delete-file"
+2. Make sure that file is deleted
+------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa--
+------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
+Content-Type: text/ecl
+Entry-Name: .content
+
+get-file "workspace:/FilesForContextEditor/text.txt" | delete-file
+
+get-view "Test Explorer" | get-tree | get-item FilesForContextEditor | get-property childCount | equals 2 | verify-true
+get-view "Test Explorer" | get-tree | select FilesForContextEditor | get-menu Refresh | click
+get-view "Test Explorer" | get-tree | get-item FilesForContextEditor | get-property childCount | equals 1 | verify-true
+
+with [get-view "Test Explorer" | get-tree] {
+ get-item "FilesForContextEditor/folder" | get-property caption | equals folder | verify-true
+ verify-error {
+ get-item "FilesForContextEditor/text.txt"
+ }
+}
+
+verify-error {
+ get-file "workspace:/FilesForContextEditor/text.txt" | delete-file
+}
+
+------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--
diff --git a/rcpttTests/ECL_IDE_module/selfAUTTests/verifications/Log/ErrLogVerification_NEGATIVE Case Denied Entry_Message Pattern.test b/rcpttTests/ECL_IDE_module/selfAUTTests/verifications/Log/ErrLogVerification_NEGATIVE Case Denied Entry_Message Pattern.test
index 39cf956..3686598 100644
--- a/rcpttTests/ECL_IDE_module/selfAUTTests/verifications/Log/ErrLogVerification_NEGATIVE Case Denied Entry_Message Pattern.test
+++ b/rcpttTests/ECL_IDE_module/selfAUTTests/verifications/Log/ErrLogVerification_NEGATIVE Case Denied Entry_Message Pattern.test
@@ -6,8 +6,8 @@
Element-Version: 3.0
External-Reference:
Id: _23J5kH0TEeO5CYdzFmGe7Q
-Runtime-Version: 1.5.0.201407012005
-Save-Time: 7/2/14 8:35 AM
+Runtime-Version: 1.5.2.201408180747
+Save-Time: 8/29/14 2:57 PM
Tags: verification/Error Log, selfAUT
Testcase-Type: ecl
@@ -36,9 +36,11 @@
select ".\\*" -column "Plugin Pattern" | activate-cell-edit -column 4
with [get-editbox] {
set-text "Info Entry"
- key-type "M1+s"
+
+
}
apply-cell-edit -deactivate
+ key-type "M1+s"
}
}
get-view "Test Explorer" | get-tree | select "MyProject/TestCase" | double-click
diff --git a/rcpttTests/contexts/ProjectWithTableTests.ctx b/rcpttTests/contexts/ProjectWithTableTests.ctx
new file mode 100644
index 0000000..51f7fb5
--- /dev/null
+++ b/rcpttTests/contexts/ProjectWithTableTests.ctx
@@ -0,0 +1,125 @@
+--- RCPTT testcase ---
+Format-Version: 1.0
+Context-Type: org.eclipse.rcptt.ctx.workspace
+Element-Name: ProjectWithTableTests
+Element-Type: context
+Element-Version: 2.0
+Id: _l1e_wDGmEeSbC7GaRYibkw
+Runtime-Version: 1.5.0.201406020630
+Save-Time: 9/1/14 2:09 PM
+
+------=_contents/q7project/defaultWB.ctx-5870615a-f089-338e-916f-277f01fea96d
+Content-Type: q7/binary
+Entry-Name: contents/q7project/defaultWB.ctx
+
+UEsDBBQACAgIAAAAIQAAAAAAAAAAAAAAAAAIAAAALmNvbnRlbnSdU02TojAUvPMruFtoAiJi1RyCoiKI
+fCgily2EoIx8CQHUX7/ozFqze9x3Svq9dLrTwDAMbQo0wRUJ/ArTDMNQ87xMfcI4uKziPJvQsA8oU2Aa
+nIV5OaHbtu3f8hKH/SBPB1eBmuYZwTfCbO8FntAd+N2+Cv067oZe3X6bl5cjzoIzJSc4xRlhdD/t5kMc
++XVC9tIb/8PzOvdG33LYTo4STuhfw4cion1xkvH0oYRwkV3CSkRPqVadkTjFPy1w/XGfBZCDAEDIgzFl
++w1mtvFTAgQDdgA5Gk44QBtrimJe9fHraeGlo7ufC1kMRiJgAjwcM9wIiMyYw91WAMNwKEYQ+9HXU7wt
+XIXBMc788k7JGSnv34Z/kFLUTq5mkmSiKUIK6kox0b/1wrVUb46ZlRwzW784otY+0O4WDjh1p+Gt1yrB
+yCXpQlco05UNM2O3KbnBag/r5GoNWDXgnMST5oY3etS9YLkQYhjOdgUyyvnmKj/IBa58NLevrnbWvF7E
+OUund6nmJG4pZEMlTNp2BZDrpItdPuIw4oRDbhxaPFOAWpTqsRRUs4TsLkRb3MywtXpwUdBrVSvzL+W4
+5+2jy+OG091yxlMjQ/s8FWIoxSsl2cTx6WCprBQSIdIFu7DWI70hqlPXAdTrg2uovHGTHFEhkLcP1bqH
+xup1pi2ls1XHReIuEbWvdtVmcScnHRhWuPYUd5Hly6jQYO5mdq598keiLYdyNKsPm/R+X0eDdADYjXJu
+mqKBjxFbJ8NAM+3e4mr13DF1XkfjqhZXHi+adhsoZ65O8nYoITRrUBdQF5qEziaav8I5PfM5IyUUCn+9
+efaFVkbf+Kuov/Kc8p9Hlgfengcd0Vz6muvIZaQ/17IpfQ1+fPz3h9j9xb8BUEsHCCCsA3mbAgAA2gMA
+AFBLAQIUABQACAgIAAAAIQAgrAN5mwIAANoDAAAIAAAAAAAAAAAAAAAAAAAAAAAuY29udGVudFBLBQYA
+AAAAAQABADYAAADRAgAAAAA=
+------=_contents/q7project/defaultWB.ctx-5870615a-f089-338e-916f-277f01fea96d--
+------=_contents/q7project/.defaultWSctx/content1.test-fad4dd51-e91c-3fc7-80f7-c5de32215b57
+Content-Type: q7/binary
+Entry-Name: contents/q7project/.defaultWSctx/content1.test
+
+UEsDBBQACAgIAAAAIQAAAAAAAAAAAAAAAAAIAAAALmNvbnRlbnRtj8sKwjAQRfeC/xBmb6IWqZTGIuJC
+ULoQwZ3UdKyBJukj2vbvTcXqxt1wH2e4YdSqnDyxqqXRHGZ0CgS1MKnUGYeHvU2WEK3Go1AYRVtTYUpL
+n9YCdVJJExw/B2mVDL6UeU9xXF0HTudwt7YIGGuahhqVUVNl7HzYDZG/5G/JueztstJng0tROAmIThRy
+sFhb+G3w+u8y5XDxTnEnkmu8xY1n/Nhb7Jt4nQGxXeFqKHJgbtoLUEsHCDd6xiu1AAAAAwEAAFBLAQIU
+ABQACAgIAAAAIQA3esYrtQAAAAMBAAAIAAAAAAAAAAAAAAAAAAAAAAAuY29udGVudFBLBQYAAAAAAQAB
+ADYAAADrAAAAAAA=
+------=_contents/q7project/.defaultWSctx/content1.test-fad4dd51-e91c-3fc7-80f7-c5de32215b57--
+------=_contents/q7project/TableTest.test-78e92882-c6dd-3dcd-ad74-a7b9d6b0da7a
+Content-Type: q7/binary
+Entry-Name: contents/q7project/TableTest.test
+
+UEsDBBQACAgIAAAAIQAAAAAAAAAAAAAAAAAIAAAALmNvbnRlbnSdk01v2zAMhu/6FYLPo79dzwF2KIKs
+y7q1buKuyClQZKZzI8uuJMdpsB8/uU2y3LZVJ4GkXj58CQEAnY3zoqAGteFMIwUA8rlRNTPwA5WuGjmi
+geuTcSMN7owe0WW8n2aXD+3jBMf7aRlcyU2ps8sPy48CFvH16tbG8028uNffZHBxRyYCa5QGbliNI1qw
+lcDCdjvFi5fWxo8Ap/Cpe2S7T3YGlWQCZrhGhZLbF2RaWpguWTT312Fim5ZP+cXD1z7Z+3dk1klT1Xg+
+Q+KG7nPHRLWuUJE52yIU1YCUeYEXxDQc+RnNv5PiQHIAQy4IgdfzaenywQZL57M0jCPmQ5qUEURlsoYs
+zQJIoqxEH5NVyvibZ2cT7ow3qE2kUS8HO46ChDyigVYdx9NgTejoL8pFxTevyb6SZdPT/E+NTQ8JoxDt
+VaNAbqhzhRIVE94Nmr5RG2oppE1YF7RD/qI0LOf8DiUz7KQNquk1Bd6IrpbUmfOfWDOHwpaJDqnzpShy
+xxb3qjIIXG9hXVk5Z6DQLbM78zzvOW1V82TFPG9YeeDaOuedVLjjoivxH7Dm/8sVvnG9b/H2C/0GUEsH
+CH3WxMe3AQAAWgMAAFBLAQIUABQACAgIAAAAIQB91sTHtwEAAFoDAAAIAAAAAAAAAAAAAAAAAAAAAAAu
+Y29udGVudFBLBQYAAAAAAQABADYAAADtAQAAAAA=
+------=_contents/q7project/TableTest.test-78e92882-c6dd-3dcd-ad74-a7b9d6b0da7a--
+------=_contents/q7project/.defaultWSctx/content1.project-815ee12c-3ff3-364a-b7f0-ed0764506944
+Content-Type: q7/binary
+Entry-Name: contents/q7project/.defaultWSctx/content1.project
+
+UEsDBBQACAgIAAAAIQAAAAAAAAAAAAAAAAAIAAAALmNvbnRlbnRtkEEOwiAQRdeaeIeGvaCrusA2UeMF
+1ANUmDSYAi1Q0+MLlNrUuJv358/8AVoOssneYKzQ6oj2eIcyUExzoeojetyv2wMqi82atka/gLkLWGZE
+67zbqyuqKglFl6cuJZFDg2kpQbmCkqkKavLZCGRBz140/NYCC5Tw7EcrxaOSsvw2PGgDHHc5Zr7A0QnG
+82ms5iv8UGXqPsTbxGQpUPIblJTpEp/qegPJPcKfI7p8bIXsaImb5tnvY5cf+AFQSwcIz2bKQ70AAAB/
+AQAAUEsBAhQAFAAICAgAAAAhAM9mykO9AAAAfwEAAAgAAAAAAAAAAAAAAAAAAAAAAC5jb250ZW50UEsF
+BgAAAAABAAEANgAAAPMAAAAAAA==
+------=_contents/q7project/.defaultWSctx/content1.project-815ee12c-3ff3-364a-b7f0-ed0764506944--
+------=_contents/q7project/rcptt.properties-fd5d5747-330f-3b05-9be7-47bcf072cf18
+Content-Type: q7/binary
+Entry-Name: contents/q7project/rcptt.properties
+
+UEsDBBQACAgIAAAAIQAAAAAAAAAAAAAAAAAIAAAALmNvbnRlbnRNzk1uwjAQQOG9TzEXGMdOQEm9rajo
+gp8U2kU3yHJGKKi2gz0k7e0LqhR1/S3eQ0Roa2DK7GwmQETxEpO3jB+Uch+DAS2VaGscKXQxGZimSX7H
+RJ100RfXWqy+yFNg3FpPBvYpXsgxHIi5D+c88/FnuPPwxxti21m2s8618l577Qycluu4eH/OaUW7zzaN
+28Y9De78OHm7Be49/T+sZCNLpSutlNZL1YiDHQmP/eNIq6IsdAXalA3sN0L8AlBLBwguxza0vAAAAPUA
+AABQSwECFAAUAAgICAAAACEALsc2tLwAAAD1AAAACAAAAAAAAAAAAAAAAAAAAAAALmNvbnRlbnRQSwUG
+AAAAAAEAAQA2AAAA8gAAAAAA
+------=_contents/q7project/rcptt.properties-fd5d5747-330f-3b05-9be7-47bcf072cf18--
+------=_contents/q7project/defaultWS.ctx-f62894c1-f639-3a4d-8b93-315b441db9df
+Content-Type: q7/binary
+Entry-Name: contents/q7project/defaultWS.ctx
+
+UEsDBBQACAgIAAAAIQAAAAAAAAAAAAAAAAAIAAAALmNvbnRlbnStlMuSolgQhvc8hXvjyE1uFVELQEAU
+EVS0ZNNxwAMqN7kIwtM3VJU9NdMTE9Mdnas8yR9/JhlfJABgZHOjCpWVD0s0AgBgNgdqlJ6y4mXUNM3k
+kRXoNPGzBM85TM2KBFZgj4rykqUvI3JCYEqMEpRWwIQJehmdUADvcXXY/qj/EFO9eAtrBHaXQUkSOEXg
+JDmiXxh6ZK0w/fQy+sbH4DhdemsFyVY0PTqlkZKsjWHgPV6/+Vla9a5lP82tyK7Ir/Bh+kn1qIAvCPTJ
+E0jA0TQJaH4qAEgFENCEd4LcifchojH5wwDs2ls/RM7h3iWFRYspaVW0nz/xH00wzFHKmSTZoiyGutiH
+bov/jPe6kZi1l25iL7VnoioZUhN+fA2fMsneNoqMqaLo9FVdHmqy8tXjPeSf/D/irwab3sjRPqqKiIm2
+SA3p+lP4x5bX0/G0muTc5NMO0CcKEaxAAB9NeUCzhAB4GvVPjpiepkJAIhj8r71/Mf2dPW/NaKZaTSfa
+5yDg5bLivGOWO9F+sY7tFSZLYnhWslRdPIyVTlcPY7rF6dZ3kiBv5u6Yxk3OHfte0RWtKLiLrLmzroqc
+UIJJXGQVK2new73d24v9trmqNWaYm3Jrxhm3mpPxUSpVFlWEHaLL3m8TYX2/cVu7IImDoC/GenB0mfFq
+uspN6CadQT/wOrvv28dba0g8Y6Uif8PSLpopu83ytDzI1RQm6xROEbtXyPBNOMyRgaNizI+jQ1WO52TA
+mRa6xp1dVgphyBFvLLXcZ9L5ragjLVw3vomx+yQMumaqVbH0kB/b4Kxc19ouc5mu0+ZCzqQWaVpcceTr
+SCUHRi9Q28wgNyx2mUlPRp+IYk9Gk3NkU/dmeOQ9br/M6BNRTA+VvzP6q2B9YfJf8J58JsAnSBb5AQUI
+kuuhRh4NPAEOGcWzBGRZViB/9zY8m/wOs5sqUpR1cxHtzQlBpCOthnJxL0XKQSsVI0XTSWbbo3ghbWK8
+MmKzcO6LmmZ4nBf32bosU3RcdjabXSmk+62jPLoM9dNUbU01q/zCU7CKIB4akXHQXAVjuc7L23u+DGM1
+Zv37wlVnIRXdbC+RozxawtpwZW0jdeSUwM2jLDO7hlP84gHX27JuKEsLZ/O5z7gFJxJ2qmE8lZTMpeYd
+7S23yp330OybY+levNjdlBueo9BaWP4y0Lkb7+lvJdQTj6nS+sj4wVhUeyp8vaO8pc0Rw0nEh+sl9nuU
+xLMt9tz1Z/H9YJ7FlZC00VoYHkEzUBP+tNz3kJmrRzGEe2CI3kfFpA+dNHBnDrm1+lS+vv4xdnoMvwNQ
+SwcIC2F3Z9UDAABNBwAAUEsBAhQAFAAICAgAAAAhAAthd2fVAwAATQcAAAgAAAAAAAAAAAAAAAAAAAAA
+AC5jb250ZW50UEsFBgAAAAABAAEANgAAAAsEAAAAAA==
+------=_contents/q7project/defaultWS.ctx-f62894c1-f639-3a4d-8b93-315b441db9df--
+------=_.q7.content-3d2e0690-ce48-3609-83e0-c704d49f1eaf
+Content-Type: q7/binary
+Entry-Name: .q7.content
+
+UEsDBBQACAgIAAAAIQAAAAAAAAAAAAAAAAAIAAAALmNvbnRlbnSVUl1LwzAUfRf8DyHvJtaXSWkdOGX4
+IIgbTJ9Gm95tcWlSk1vbn2+6NRVE6fZSmuR85J6TZNqWinyBddLolEbsmhLQwhRSb1Na4+bqlk7vLi8S
+Y7cMhJKVA2ZFhcgEtqwxdu+qTEC8Cn8zoxFaJG0p40H3ptP1TtrFfj+lO8Qq5rxpGmbKLfPi/O35KUBG
+vAZ6wHT0A457HB9wlOis9OgXaz5A4EribpnlCpbg0FEii5SuVQTr5mFePsIin03m2eu7zPcN9RMTkohu
+FI2HhV9WRx3Xy35O+g3aAzxkIxWEcxaOCbQgauysU4q2Bsr/Zgy3Y+g/p/MK2GS1wtV9l9P5tMV5tGMj
+frgKLEpwI0yjCv8KQiaDZ2c5oH459LlHJyX4H3c8Qt7fLfTLQ8HH9vlP/Qk/9/l70jdQSwcIvjWahjgB
+AABbAwAAUEsBAhQAFAAICAgAAAAhAL41moY4AQAAWwMAAAgAAAAAAAAAAAAAAAAAAAAAAC5jb250ZW50
+UEsFBgAAAAABAAEANgAAAG4BAAAAAA==
+------=_.q7.content-3d2e0690-ce48-3609-83e0-c704d49f1eaf--
+------=_contents/q7project/.project-c016ecf2-017a-3eb3-b9aa-3e2860a66691
+Content-Type: q7/binary
+Entry-Name: contents/q7project/.project
+
+UEsDBBQACAgIAAAAIQAAAAAAAAAAAAAAAAAIAAAALmNvbnRlbnS1kUEOwiAQRdeaeIeme0FXdYE1UeMF
+1ANUOmkwLeBATY8vUGrTmC7dzfvzmT8Z2KFr6uQNaISS+3RLNmkCkqtSyGqf3m+X9S495Ksl06iewO0Z
+DEehrXM7dcFk0UD+ymKX0cC+wVXTgLQ5o0Pl1egzAeiEHq2oy6sG7iniyT0tZBmUmOWmkU4hlOSVEe4K
+EpyAjo99NW7hHhVYtT7eRKZTgdGfoNlohRUBXgttgCDX1v4lPyrDJVy0bRGiu4e5TULZW/wOwRomjjO+
+R59+5AdQSwcIDhq3cM8AAAAHAgAAUEsBAhQAFAAICAgAAAAhAA4at3DPAAAABwIAAAgAAAAAAAAAAAAA
+AAAAAAAAAC5jb250ZW50UEsFBgAAAAABAAEANgAAAAUBAAAAAA==
+------=_contents/q7project/.project-c016ecf2-017a-3eb3-b9aa-3e2860a66691--
diff --git a/rcpttTests/platform_tests/Editing/TestCase/ContextList/CopyContextToTestFromNotReferencedProject.test b/rcpttTests/platform_tests/Editing/TestCase/ContextList/CopyContextToTestFromNotReferencedProject.test
index d062398..f6fae28 100644
--- a/rcpttTests/platform_tests/Editing/TestCase/ContextList/CopyContextToTestFromNotReferencedProject.test
+++ b/rcpttTests/platform_tests/Editing/TestCase/ContextList/CopyContextToTestFromNotReferencedProject.test
@@ -6,8 +6,8 @@
Element-Version: 3.0
External-Reference: http://jira4.xored.com/browse/QS-1135
Id: _gusGANIdEeCSSY3GE2xBfQ
-Runtime-Version: 1.5.2.qualifier
-Save-Time: 8/19/14 5:15 PM
+Runtime-Version: 1.5.2.201408180747
+Save-Time: 8/28/14 3:06 PM
Tags: TestCase, Context, Reference
Testcase-Type: ecl
@@ -107,9 +107,6 @@
get-editor scenario3 | get-section Contexts | get-table | get-item "Possible resolution -> context1 \\(p1\\)"
| get-property caption | equals "Possible resolution -> context1 (p1)" | verify-true
-// Dummy editor switch (see 442038):
-get-editor scenario2 | click
-get-editor scenario3 | click
get-editor scenario3 | get-section Script | get-text-viewer | key-type "M1+M2+s"
get-view "Test Explorer" | get-tree | select p3 | get-menu Properties | click
diff --git a/rcpttTests/platform_tests/ecl/GetChildrenFromFile.test b/rcpttTests/platform_tests/ecl/GetChildrenFromFile.test
index 42bac24..5f0c2be 100644
--- a/rcpttTests/platform_tests/ecl/GetChildrenFromFile.test
+++ b/rcpttTests/platform_tests/ecl/GetChildrenFromFile.test
@@ -6,16 +6,16 @@
External-Reference:
Id: _AeqkweZvEeOF0oJ66JQZLA
Runtime-Version: 1.5.2.201408180747
-Save-Time: 8/27/14 12:39 PM
+Save-Time: 8/29/14 12:12 PM
Testcase-Type: ecl
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Content-Type: text/ecl
Entry-Name: .content
-get-file [get-by-os -win "file:/c:/" -macosx "file:/Users" -linux "file:/Home"] | get children | assert-non-empty
+get-file [get-by-os -win "file:/c:/" -macosx "file:/Users" -linux "file:/home"] | get children | assert-non-empty
-get-file [get-by-os -win "file:/c:/" -macosx "file:/Users" -linux "file:/Home"] | get children | foreach {
+get-file [get-by-os -win "file:/c:/" -macosx "file:/Users" -linux "file:/home"] | get children | foreach {
trace [get "name"]
}
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--
diff --git a/rcpttTests/platform_tests/ecl/GetExistsFromFile.test b/rcpttTests/platform_tests/ecl/GetExistsFromFile.test
index bb2d27f..a67887e 100644
--- a/rcpttTests/platform_tests/ecl/GetExistsFromFile.test
+++ b/rcpttTests/platform_tests/ecl/GetExistsFromFile.test
@@ -6,13 +6,13 @@
External-Reference:
Id: _DzrNwOboEeOPh_ngj33FOg
Runtime-Version: 1.5.2.201408180747
-Save-Time: 8/27/14 12:39 PM
+Save-Time: 8/29/14 12:12 PM
Testcase-Type: ecl
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Content-Type: text/ecl
Entry-Name: .content
-get-file [get-by-os -win "file:/c:/" -macosx "file:/Users" -linux "file:/Home"] | get exists | verify-true
+get-file [get-by-os -win "file:/c:/" -macosx "file:/Users" -linux "file:/home"] | get exists | verify-true
get-file "file:/shurumburumc:/" | get exists | verify-false
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--
diff --git a/rcpttTests/platform_tests/ecl/GetIsDirectoryFromFile.test b/rcpttTests/platform_tests/ecl/GetIsDirectoryFromFile.test
index e710ab0..73ef3a7 100644
--- a/rcpttTests/platform_tests/ecl/GetIsDirectoryFromFile.test
+++ b/rcpttTests/platform_tests/ecl/GetIsDirectoryFromFile.test
@@ -6,13 +6,13 @@
External-Reference:
Id: _wyOEIObpEeOPh_ngj33FOg
Runtime-Version: 1.5.2.201408180747
-Save-Time: 8/27/14 12:41 PM
+Save-Time: 8/29/14 12:12 PM
Testcase-Type: ecl
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Content-Type: text/ecl
Entry-Name: .content
-get-file [get-by-os -win "file:/c:/" -macosx "file:/Users" -linux "file:/Home"] | get isDirectory | verify-true
+get-file [get-by-os -win "file:/c:/" -macosx "file:/Users" -linux "file:/home"] | get isDirectory | verify-true
get-file "file:/casf:/" | get isDirectory | verify-false
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--
diff --git a/rcpttTests/platform_tests/ecl/Switch.test b/rcpttTests/platform_tests/ecl/Switch.test
index d00dbbd..7cf06da 100644
--- a/rcpttTests/platform_tests/ecl/Switch.test
+++ b/rcpttTests/platform_tests/ecl/Switch.test
@@ -1,19 +1,24 @@
--- RCPTT testcase ---
Format-Version: 1.0
-Q7-vendor: www.xored.com/q7
Element-Name: Switch
Element-Type: testcase
Element-Version: 3.0
External-Reference:
Id: _gKwkEPd7EeOUrIHOddLXDg
-Q7-Runtime-Version: 1.5.0.qualifier
-Save-Time: 6/19/14 1:45 PM
+Runtime-Version: 1.5.2.201408180747
+Save-Time: 8/28/14 2:24 PM
Testcase-Type: ecl
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Content-Type: text/ecl
Entry-Name: .content
+
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=442016
+switch foo
+ [case foo { bool true }]
+ -default { bool false } | assert-true
+
// Without default
echo "right"
| switch
@@ -51,4 +56,6 @@
| equals "Correct" | verify-true
+
+
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--
diff --git a/rcpttTests/platform_tests/ecl/UriFromPath.test b/rcpttTests/platform_tests/ecl/UriFromPath.test
index d1fd6e4..3d2805b 100644
--- a/rcpttTests/platform_tests/ecl/UriFromPath.test
+++ b/rcpttTests/platform_tests/ecl/UriFromPath.test
@@ -6,13 +6,13 @@
External-Reference:
Id: _zG1GQOTUEeOShsjP9M9CMw
Runtime-Version: 1.5.2.201408180747
-Save-Time: 8/27/14 12:53 PM
+Save-Time: 8/29/14 12:13 PM
Testcase-Type: ecl
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Content-Type: text/ecl
Entry-Name: .content
-uri-from-path [get-by-os -win "C:\Windows\System32" -macosx "Users" -linux "Home"] |
-contains [get-by-os -win "file:/C:/Windows/System32/" -macosx "file:/Users/" -linux "file:/Home/"] | verify-true
+uri-from-path [get-by-os -win "C:\Windows\System32" -macosx "Users" -linux "home"] |
+contains [get-by-os -win "file:/C:/Windows/System32/" -macosx "file:/Users/" -linux "file:/home/"] | verify-true
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--
diff --git a/rcpttTests/platform_tests/selfAUTTests/442980_ClassCastExceptions.test b/rcpttTests/platform_tests/selfAUTTests/442980_ClassCastExceptions.test
new file mode 100644
index 0000000..539d9e4
--- /dev/null
+++ b/rcpttTests/platform_tests/selfAUTTests/442980_ClassCastExceptions.test
@@ -0,0 +1,50 @@
+--- RCPTT testcase ---
+Format-Version: 1.0
+Contexts: _ymiyse5IEeCU6db9MgIBkA,_ZQYygK2sEeCqBbDEJWufvQ,_l1e_wDGmEeSbC7GaRYibkw
+Element-Name: 442980_ClassCastExceptions
+Element-Type: testcase
+Element-Version: 3.0
+External-Reference: https://bugs.eclipse.org/bugs/show_bug.cgi?id=442980
+Id: _y-nOoDGlEeSbC7GaRYibkw
+Runtime-Version: 1.5.0.201406020630
+Save-Time: 9/1/14 2:22 PM
+Testcase-Type: ecl
+
+------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa
+Content-Type: text/plain
+Entry-Name: .description
+
+Copyright (c) 2009, 2014 Xored Software Inc and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Xored Software Inc - initial creation and/or initial documentation
+--------------------------------------------------------------------------------
+
+TEST STEPS:
+
+1. Run test with "select-rows", "exclude-rows", "write-csv-file" commands in Debug mode
+2. Make sure that test is passed
+------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa--
+------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
+Content-Type: text/ecl
+Entry-Name: .content
+
+with [get-view "Test Explorer" | get-tree] {
+ select q7project | double-click
+ select "q7project/TableTest"
+}
+get-button Debug | click
+with [get-view "Execution View"] {
+ get-control Any -after [get-label "1/1"] | get-property "getChildren().Control[2].getText()" | equals 0
+ | verify-true
+ get-editbox -after [get-label "Message:"] | get-property text
+ | contains "cannot be cast to org.eclipse.rcptt.ecl.core.Command" | verify-false
+ get-editbox -after [get-label "Message:"] | get-property text
+ | equals "" | verify-true
+}
+
+------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--
diff --git a/runtime/ecl/org.eclipse.rcptt.tesla.ecl.impl/src/org/eclipse/rcptt/tesla/ecl/internal/impl/AdapterFactory.java b/runtime/ecl/org.eclipse.rcptt.tesla.ecl.impl/src/org/eclipse/rcptt/tesla/ecl/internal/impl/AdapterFactory.java
index c7645fc..4d9a111 100644
--- a/runtime/ecl/org.eclipse.rcptt.tesla.ecl.impl/src/org/eclipse/rcptt/tesla/ecl/internal/impl/AdapterFactory.java
+++ b/runtime/ecl/org.eclipse.rcptt.tesla.ecl.impl/src/org/eclipse/rcptt/tesla/ecl/internal/impl/AdapterFactory.java
@@ -11,14 +11,22 @@
package org.eclipse.rcptt.tesla.ecl.internal.impl;
import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.rcptt.tesla.core.utils.Cryptography;
+import org.eclipse.rcptt.tesla.ecl.model.DecryptResult;
public class AdapterFactory implements IAdapterFactory {
- private static final Class<?>[] adapters = new Class[]{String.class};
+ private static final Class<?>[] adapters = new Class[] { String.class };
@SuppressWarnings({ "rawtypes", "unchecked" })
- @Override
+ @Override
public Object getAdapter(Object adaptableObject, Class adapterType) {
+ if (adaptableObject instanceof DecryptResult) {
+ if (adapterType.isAssignableFrom(String.class)) {
+ return Cryptography.INSTANCE.decrypt(((DecryptResult) adaptableObject).getValue());
+ }
+ }
+
return null;
}
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/.classpath b/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/.classpath
deleted file mode 100644
index 121e527..0000000
--- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/.project b/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/.project
deleted file mode 100644
index 8670c12..0000000
--- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/.project
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rcptt.tesla.recording.aspects.ui.ide</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.ajdt.core.ajbuilder</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.ajdt.ui.ajnature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/META-INF/MANIFEST.MF b/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/META-INF/MANIFEST.MF
deleted file mode 100644
index 48c34ee..0000000
--- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Q7 Runtime Workbencg Recording Support
-Bundle-SymbolicName: org.eclipse.rcptt.tesla.recording.aspects.ui.ide;singleton:=true
-Bundle-Version: 1.5.2.qualifier
-Bundle-Vendor: Eclipse RCP Testing Tool Project
-Require-Bundle: org.aspectj.runtime;visibility:=reexport,
- org.eclipse.core.runtime,
- org.eclipse.rcptt.tesla.core.context;bundle-version="[1.5.2,1.6.0)",
- org.eclipse.rcptt.tesla.core.am;bundle-version="[1.5.2,1.6.0)",
- org.eclipse.rcptt.tesla.swt.aspects;bundle-version="[1.5.2,1.6.0)",
- org.eclipse.ui.ide
-onEnvironment: JavaSE-1.6
-Import-Package: org.osgi.framework
-Eclipse-SupplementBundle: org.eclipse.ui.ide
-Export-Package: org.eclipse.rcptt.tesla.recording.aspects
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.rcptt.tesla.recording.aspects.UIIDEWorkbenchActivator
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/META-INF/aop.xml b/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/META-INF/aop.xml
deleted file mode 100644
index e0d4fd2..0000000
--- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/META-INF/aop.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<aspectj>
- <aspects>
- <aspect name="org.eclipse.rcptt.tesla.recording.aspects.UIIDERecordingAspect" />
- </aspects>
- <weaver options="-verbose -Xset:typeDemotion=true" />
-</aspectj>
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/about.html b/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/about.html
deleted file mode 100644
index 692eebb..0000000
--- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!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>February 24, 2014</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>
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/build.properties b/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/build.properties
deleted file mode 100644
index dfb6a4f..0000000
--- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2009, 2014 Xored Software Inc and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Xored Software Inc - initial API and implementation and/or initial documentation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/epl-v10.html b/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/epl-v10.html
deleted file mode 100644
index 84ec251..0000000
--- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/epl-v10.html
+++ /dev/null
@@ -1,261 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Eclipse Public License - Version 1.0</title>
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style>
-
-</head>
-
-<body lang="EN-US">
-
-<p align=center><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</body>
-
-</html>
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/pom.xml b/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/pom.xml
deleted file mode 100644
index 5c1c5d5..0000000
--- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/pom.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>tesla</artifactId>
- <groupId>org.eclipse.rcptt.tesla</groupId>
- <version>1.5.2-SNAPSHOT</version>
- </parent>
- <groupId>org.eclipse.rcptt.tesla</groupId>
- <artifactId>org.eclipse.rcptt.tesla.recording.aspects.ui.ide</artifactId>
- <version>1.5.2-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
- <dependencies>
- <dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- <version>${aspectj_dep}</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>${tycho-groupid}</groupId>
- <artifactId>tycho-compiler-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <excludeResources>
- <exludeResource>**/*.aj</exludeResource>
- </excludeResources>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>aspectj-maven-plugin</artifactId>
- <version>${aspectj_version}</version>
- <executions>
- <execution>
- <id>compile</id>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- <aspectDirectory>src</aspectDirectory>
- <Xlint>ignore</Xlint>
- <Xreweavable>true</Xreweavable>
- <deprecation>true</deprecation>
- <!--ajdtBuildDefFile>build-1-5.ajproperties</ajdtBuildDefFile-->
- </configuration>
- <goals>
- <goal>compile</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/src/org/eclipse/rcptt/tesla/recording/aspects/IUIIDEEventListener.java b/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/src/org/eclipse/rcptt/tesla/recording/aspects/IUIIDEEventListener.java
deleted file mode 100644
index 53a4cd0..0000000
--- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/src/org/eclipse/rcptt/tesla/recording/aspects/IUIIDEEventListener.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2014 Xored Software Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Xored Software Inc - initial API and implementation and/or initial documentation
- *******************************************************************************/
-package org.eclipse.rcptt.tesla.recording.aspects;
-
-
-public interface IUIIDEEventListener {
- void restartEclipse();
-}
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/src/org/eclipse/rcptt/tesla/recording/aspects/UIIDEEventManager.java b/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/src/org/eclipse/rcptt/tesla/recording/aspects/UIIDEEventManager.java
deleted file mode 100644
index 36844c5..0000000
--- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/src/org/eclipse/rcptt/tesla/recording/aspects/UIIDEEventManager.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2014 Xored Software Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Xored Software Inc - initial API and implementation and/or initial documentation
- *******************************************************************************/
-package org.eclipse.rcptt.tesla.recording.aspects;
-
-import java.util.HashSet;
-import java.util.Set;
-
-public final class UIIDEEventManager {
-
- private static Set<IUIIDEEventListener> listeners = new HashSet<IUIIDEEventListener>();
-
- private static boolean freezeState;
-
- private UIIDEEventManager() {
- }
-
- public static void addListener(IUIIDEEventListener listener) {
- listeners.add(listener);
- }
-
- public static void removeListener(IUIIDEEventListener listener) {
- listeners.remove(listener);
- }
-
- public static boolean getFreeze() {
- return freezeState;
- }
-
- public static void setFreeze(boolean value) {
- freezeState = value;
- }
-
- public static void restartEclipse() {
- for (IUIIDEEventListener listener : listeners) {
- listener.restartEclipse();
- }
- }
-}
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/src/org/eclipse/rcptt/tesla/recording/aspects/UIIDERecordingAspect.aj b/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/src/org/eclipse/rcptt/tesla/recording/aspects/UIIDERecordingAspect.aj
deleted file mode 100644
index 8a2e256..0000000
--- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/src/org/eclipse/rcptt/tesla/recording/aspects/UIIDERecordingAspect.aj
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.eclipse.rcptt.tesla.recording.aspects;
-
-import org.aspectj.lang.annotation.SuppressAjWarnings;
-
-import org.eclipse.rcptt.tesla.core.am.AspectManager;
-
-
-public privileged aspect UIIDERecordingAspect {
-
- public UIIDERecordingAspect() {
- AspectManager.activateAspect(UIIDEWorkbenchActivator.PLUGIN_ID, this
- .getClass().getName());
- }
-
- @SuppressAjWarnings("adviceDidNotMatch")
- before(String location):
- execution(void org.eclipse.ui.internal.ide.actions.OpenWorkspaceAction.restart(String)) && args(location) {
- UIIDEEventManager.restartEclipse();
- }
-}
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/src/org/eclipse/rcptt/tesla/recording/aspects/UIIDEWorkbenchActivator.java b/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/src/org/eclipse/rcptt/tesla/recording/aspects/UIIDEWorkbenchActivator.java
deleted file mode 100644
index 87ea935..0000000
--- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.ui.ide/src/org/eclipse/rcptt/tesla/recording/aspects/UIIDEWorkbenchActivator.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2014 Xored Software Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Xored Software Inc - initial API and implementation and/or initial documentation
- *******************************************************************************/
-package org.eclipse.rcptt.tesla.recording.aspects;
-
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.osgi.framework.BundleContext;
-
-import org.eclipse.rcptt.tesla.core.am.AspectManager;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class UIIDEWorkbenchActivator extends Plugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.rcptt.tesla.recording.aspects.ui.ide";
-
- // The shared instance
- private static UIIDEWorkbenchActivator plugin;
-
- /**
- * The constructor
- */
- public UIIDEWorkbenchActivator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
- * )
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- AspectManager.activateBundle(PLUGIN_ID);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
- * )
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static UIIDEWorkbenchActivator getDefault() {
- return plugin;
- }
-
- public static void log(Throwable t) {
- getDefault().getLog().log(
- new Status(Status.ERROR, PLUGIN_ID,
- "Tesla Recording SWT ERROR", t));
- }
-
-}
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/META-INF/MANIFEST.MF b/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/META-INF/MANIFEST.MF
index 84c8667..2f0b09b 100644
--- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/META-INF/MANIFEST.MF
+++ b/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/META-INF/MANIFEST.MF
@@ -22,7 +22,6 @@
org.eclipse.rcptt.logging;bundle-version="1.1.0",
org.eclipse.rcptt.util.swt;bundle-version="1.0.0",
org.eclipse.rcptt.tesla.ecl,
- org.eclipse.rcptt.tesla.recording.aspects.ui.ide;bundle-version="1.1.0";resolution:=optional,
org.eclipse.rcptt.util;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/plugin.xml b/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/plugin.xml
index 03be923..f9c0e6d 100644
--- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/plugin.xml
+++ b/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/plugin.xml
@@ -19,9 +19,6 @@
<recorder
class="org.eclipse.rcptt.tesla.recording.core.swt.JFaceRecordingProcessor">
</recorder>
- <recorder
- class="org.eclipse.rcptt.tesla.recording.core.swt.UIIDERecordingProcessor">
- </recorder>
</extension>
<extension
point="org.eclipse.rcptt.tesla.recording.swt.describerExtensions">
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/DNDSupport.java b/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/DNDSupport.java
index f9572b8..b597754 100644
--- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/DNDSupport.java
+++ b/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/DNDSupport.java
@@ -10,6 +10,12 @@
*******************************************************************************/
package org.eclipse.rcptt.tesla.recording.core.swt;
+import org.eclipse.rcptt.tesla.core.protocol.ControlUIElement;
+import org.eclipse.rcptt.tesla.core.protocol.DragKind;
+import org.eclipse.rcptt.tesla.core.protocol.raw.Element;
+import org.eclipse.rcptt.tesla.internal.core.TeslaCore;
+import org.eclipse.rcptt.tesla.internal.ui.player.FindResult;
+import org.eclipse.rcptt.tesla.recording.core.TeslaRecorder;
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.DragSource;
import org.eclipse.swt.dnd.DropTarget;
@@ -19,13 +25,6 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Widget;
-import org.eclipse.rcptt.tesla.core.protocol.ControlUIElement;
-import org.eclipse.rcptt.tesla.core.protocol.DragKind;
-import org.eclipse.rcptt.tesla.core.protocol.raw.Element;
-import org.eclipse.rcptt.tesla.internal.core.TeslaCore;
-import org.eclipse.rcptt.tesla.internal.ui.player.FindResult;
-import org.eclipse.rcptt.tesla.recording.core.TeslaRecorder;
-
public class DNDSupport {
private TeslaRecorder recorder;
@@ -34,9 +33,15 @@
public DNDSupport() {
}
+ public void setRecorder(TeslaRecorder recorder) {
+ this.recorder = recorder;
+ }
+
public void processUniversalDND(Event event) {
- if (recorder == null)
- recorder = TeslaRecorder.getInstance();
+ if (recorder == null) {
+ return;
+ }
+
SWTWidgetLocator locator = SWTRecordingHelper.getHelper().getLocator();
String style = "";
@@ -66,8 +71,8 @@
} else if (event.widget instanceof DropTarget) {
DropTarget target = (DropTarget) event.widget;
Control widget = target.getControl();
-
- if( widget instanceof Shell) {
+
+ if (widget instanceof Shell) {
return;
}
@@ -102,7 +107,7 @@
public void processDND(Event event) {
if (recorder == null) {
- recorder = TeslaRecorder.getInstance();
+ return;
}
Control realWidget = null;
if (event.widget instanceof DropTarget) {
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/SWTEventRecorder.java b/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/SWTEventRecorder.java
index c0fc002..bec6b61 100644
--- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/SWTEventRecorder.java
+++ b/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/SWTEventRecorder.java
@@ -36,6 +36,55 @@
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerCell;
import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.rcptt.tesla.core.am.RecordingModeFeature;
+import org.eclipse.rcptt.tesla.core.context.ContextManagement;
+import org.eclipse.rcptt.tesla.core.context.ContextManagement.Context;
+import org.eclipse.rcptt.tesla.core.protocol.Click;
+import org.eclipse.rcptt.tesla.core.protocol.CompositeUIElement;
+import org.eclipse.rcptt.tesla.core.protocol.ControlUIElement;
+import org.eclipse.rcptt.tesla.core.protocol.ElementKind;
+import org.eclipse.rcptt.tesla.core.protocol.LinkUIElement;
+import org.eclipse.rcptt.tesla.core.protocol.MouseEvent;
+import org.eclipse.rcptt.tesla.core.protocol.MouseEventKind;
+import org.eclipse.rcptt.tesla.core.protocol.PartUIElement;
+import org.eclipse.rcptt.tesla.core.protocol.ProtocolFactory;
+import org.eclipse.rcptt.tesla.core.protocol.SWTDialogKind;
+import org.eclipse.rcptt.tesla.core.protocol.SelectCommand;
+import org.eclipse.rcptt.tesla.core.protocol.SelectData;
+import org.eclipse.rcptt.tesla.core.protocol.SetSWTDialogInfo;
+import org.eclipse.rcptt.tesla.core.protocol.SetSelection;
+import org.eclipse.rcptt.tesla.core.protocol.SetTextOffset;
+import org.eclipse.rcptt.tesla.core.protocol.SetTextSelection;
+import org.eclipse.rcptt.tesla.core.protocol.TextUIElement;
+import org.eclipse.rcptt.tesla.core.protocol.Type;
+import org.eclipse.rcptt.tesla.core.protocol.ViewerUIElement;
+import org.eclipse.rcptt.tesla.core.protocol.raw.Command;
+import org.eclipse.rcptt.tesla.core.protocol.raw.RawEvent;
+import org.eclipse.rcptt.tesla.core.protocol.raw.RawFactory;
+import org.eclipse.rcptt.tesla.core.protocol.raw.SetMode;
+import org.eclipse.rcptt.tesla.core.utils.TeslaUtils;
+import org.eclipse.rcptt.tesla.internal.core.TeslaCore;
+import org.eclipse.rcptt.tesla.internal.ui.player.FindResult;
+import org.eclipse.rcptt.tesla.internal.ui.player.ISWTModelMapperExtension;
+import org.eclipse.rcptt.tesla.internal.ui.player.PlayerTextUtils;
+import org.eclipse.rcptt.tesla.internal.ui.player.SWTModelMapper;
+import org.eclipse.rcptt.tesla.internal.ui.player.SWTUIElement;
+import org.eclipse.rcptt.tesla.internal.ui.player.SWTUIPlayer;
+import org.eclipse.rcptt.tesla.internal.ui.player.TeslaSWTAccess;
+import org.eclipse.rcptt.tesla.internal.ui.player.viewers.Viewers;
+import org.eclipse.rcptt.tesla.recording.aspects.IExtendedSWTEventListener;
+import org.eclipse.rcptt.tesla.recording.aspects.SWTEventManager;
+import org.eclipse.rcptt.tesla.recording.core.IRecordingHelper;
+import org.eclipse.rcptt.tesla.recording.core.IRecordingModeListener;
+import org.eclipse.rcptt.tesla.recording.core.IRecordingProcessor;
+import org.eclipse.rcptt.tesla.recording.core.IRecordingProcessorExtension;
+import org.eclipse.rcptt.tesla.recording.core.TeslaRecorder;
+import org.eclipse.rcptt.tesla.recording.core.swt.peg.CommandPostProcessor;
+import org.eclipse.rcptt.tesla.recording.core.swt.util.LastEvents;
+import org.eclipse.rcptt.tesla.recording.core.swt.util.RecordedEvent;
+import org.eclipse.rcptt.tesla.swt.workbench.EclipseWorkbenchProvider;
+import org.eclipse.rcptt.util.swt.StringLines;
+import org.eclipse.rcptt.util.swt.TableTreeUtil;
import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.custom.CCombo;
@@ -97,56 +146,6 @@
import org.eclipse.ui.keys.IBindingService;
import org.osgi.framework.Bundle;
-import org.eclipse.rcptt.util.swt.StringLines;
-import org.eclipse.rcptt.util.swt.TableTreeUtil;
-import org.eclipse.rcptt.tesla.core.am.RecordingModeFeature;
-import org.eclipse.rcptt.tesla.core.context.ContextManagement;
-import org.eclipse.rcptt.tesla.core.context.ContextManagement.Context;
-import org.eclipse.rcptt.tesla.core.protocol.Click;
-import org.eclipse.rcptt.tesla.core.protocol.CompositeUIElement;
-import org.eclipse.rcptt.tesla.core.protocol.ControlUIElement;
-import org.eclipse.rcptt.tesla.core.protocol.ElementKind;
-import org.eclipse.rcptt.tesla.core.protocol.LinkUIElement;
-import org.eclipse.rcptt.tesla.core.protocol.MouseEvent;
-import org.eclipse.rcptt.tesla.core.protocol.MouseEventKind;
-import org.eclipse.rcptt.tesla.core.protocol.PartUIElement;
-import org.eclipse.rcptt.tesla.core.protocol.ProtocolFactory;
-import org.eclipse.rcptt.tesla.core.protocol.SWTDialogKind;
-import org.eclipse.rcptt.tesla.core.protocol.SelectCommand;
-import org.eclipse.rcptt.tesla.core.protocol.SelectData;
-import org.eclipse.rcptt.tesla.core.protocol.SetSWTDialogInfo;
-import org.eclipse.rcptt.tesla.core.protocol.SetSelection;
-import org.eclipse.rcptt.tesla.core.protocol.SetTextOffset;
-import org.eclipse.rcptt.tesla.core.protocol.SetTextSelection;
-import org.eclipse.rcptt.tesla.core.protocol.TextUIElement;
-import org.eclipse.rcptt.tesla.core.protocol.Type;
-import org.eclipse.rcptt.tesla.core.protocol.ViewerUIElement;
-import org.eclipse.rcptt.tesla.core.protocol.raw.Command;
-import org.eclipse.rcptt.tesla.core.protocol.raw.RawEvent;
-import org.eclipse.rcptt.tesla.core.protocol.raw.RawFactory;
-import org.eclipse.rcptt.tesla.core.protocol.raw.SetMode;
-import org.eclipse.rcptt.tesla.core.utils.TeslaUtils;
-import org.eclipse.rcptt.tesla.internal.core.TeslaCore;
-import org.eclipse.rcptt.tesla.internal.ui.player.FindResult;
-import org.eclipse.rcptt.tesla.internal.ui.player.ISWTModelMapperExtension;
-import org.eclipse.rcptt.tesla.internal.ui.player.PlayerTextUtils;
-import org.eclipse.rcptt.tesla.internal.ui.player.SWTModelMapper;
-import org.eclipse.rcptt.tesla.internal.ui.player.SWTUIElement;
-import org.eclipse.rcptt.tesla.internal.ui.player.SWTUIPlayer;
-import org.eclipse.rcptt.tesla.internal.ui.player.TeslaSWTAccess;
-import org.eclipse.rcptt.tesla.internal.ui.player.viewers.Viewers;
-import org.eclipse.rcptt.tesla.recording.aspects.IExtendedSWTEventListener;
-import org.eclipse.rcptt.tesla.recording.aspects.SWTEventManager;
-import org.eclipse.rcptt.tesla.recording.core.IRecordingHelper;
-import org.eclipse.rcptt.tesla.recording.core.IRecordingModeListener;
-import org.eclipse.rcptt.tesla.recording.core.IRecordingProcessor;
-import org.eclipse.rcptt.tesla.recording.core.IRecordingProcessorExtension;
-import org.eclipse.rcptt.tesla.recording.core.TeslaRecorder;
-import org.eclipse.rcptt.tesla.recording.core.swt.peg.CommandPostProcessor;
-import org.eclipse.rcptt.tesla.recording.core.swt.util.LastEvents;
-import org.eclipse.rcptt.tesla.recording.core.swt.util.RecordedEvent;
-import org.eclipse.rcptt.tesla.swt.workbench.EclipseWorkbenchProvider;
-
/**
* Simple event collector Each used widget will be added as variable.
*
@@ -288,7 +287,7 @@
}
public TeslaRecorder getRecorder() {
- return TeslaRecorder.getInstance();
+ return recorder;
}
public SWTEventRecorder() {
@@ -1551,7 +1550,7 @@
|| !beforeTextState.equals(currentText)) {
if (widget != JFaceRecordingProcessor.lastCellEditorControl) {
if (!(widget instanceof Combo)) {
- e.setText(currentText, false, (widget.getStyle() & SWT.PASSWORD ) != 0);
+ e.setText(currentText, false, isPasswordField(widget));
} else {
processComboSelection(e,
((Combo) widget).getItems(), currentText);
@@ -1582,6 +1581,15 @@
}
}
+ private static boolean isPasswordField(Widget widget) {
+ if ((widget.getStyle() & SWT.PASSWORD) != 0)
+ return true;
+ if (widget instanceof Text) {
+ return ((Text) widget).getEchoChar() != '\0';
+ }
+ return false;
+ }
+
private void processMenuShow(Widget widget, RecordedEvent toRecording) {
Object menuSource = null;
@@ -1760,19 +1768,17 @@
// detecting assert/record mode shortcuts
if (event.detail == SWT.TRAVERSE_MNEMONIC) {
- String[] assertShortcuts = TeslaRecorder.getInstance()
- .getAssertModeShortcuts();
- String[] recordShortcuts = TeslaRecorder.getInstance()
- .getRecordModeShortcuts();
- String[] startRecordShortcuts = TeslaRecorder.getInstance()
- .getStartRecordShortcuts();
- String[] stopRecordShortcuts = TeslaRecorder.getInstance()
- .getStopRecordShortcuts();
- String[] replayShortcuts = TeslaRecorder.getInstance()
- .getReplayShortcuts();
+ TeslaRecorder recorder = getRecorder();
+ if (recorder == null) {
+ return;
+ }
+ String[] assertShortcuts = recorder.getAssertModeShortcuts();
+ String[] recordShortcuts = recorder.getRecordModeShortcuts();
+ String[] startRecordShortcuts = recorder.getStartRecordShortcuts();
+ String[] stopRecordShortcuts = recorder.getStopRecordShortcuts();
+ String[] replayShortcuts = recorder.getReplayShortcuts();
- SWTAssertManager assertManager = TeslaRecorder.getInstance()
- .getProcessor(SWTAssertManager.class);
+ SWTAssertManager assertManager = recorder.getProcessor(SWTAssertManager.class);
if (assertManager != null) {
boolean assertRequest = assertManager.isShortcutRequest(event,
@@ -2593,7 +2599,7 @@
int offsetAtLine = text.getOffsetAtLine(lineAtOffset);
if (!(last instanceof SetTextSelection && EcoreUtil.equals(
((SetTextSelection) last).getElement(),
- element.element))) {
+ element.element))) {
// Ignore after setSelection
textCtrl.setTextOffset(lineAtOffset, offset
- offsetAtLine);
@@ -2611,7 +2617,11 @@
inStyledTextAction = true;
}
+ private TeslaRecorder recorder = null;
+
public void initialize(final TeslaRecorder teslaRecorder) {
+ this.recorder = teslaRecorder;
+ this.dragSupport.setRecorder(teslaRecorder);
// getLocator();// .initialize(teslaRecorder);
teslaRecorder.addListener(this);
final CommandPostProcessor pp = new CommandPostProcessor(teslaRecorder);
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/UIIDERecordingProcessor.java b/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/UIIDERecordingProcessor.java
deleted file mode 100644
index 1336ecf..0000000
--- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/UIIDERecordingProcessor.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2014 Xored Software Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Xored Software Inc - initial API and implementation and/or initial documentation
- *******************************************************************************/
-package org.eclipse.rcptt.tesla.recording.core.swt;
-
-import org.eclipse.rcptt.tesla.core.protocol.raw.SetMode;
-import org.eclipse.rcptt.tesla.recording.aspects.IUIIDEEventListener;
-import org.eclipse.rcptt.tesla.recording.aspects.UIIDEEventManager;
-import org.eclipse.rcptt.tesla.recording.core.IRecordingHelper;
-import org.eclipse.rcptt.tesla.recording.core.IRecordingProcessor;
-import org.eclipse.rcptt.tesla.recording.core.TeslaRecorder;
-
-public class UIIDERecordingProcessor implements IRecordingProcessor,
- IUIIDEEventListener {
- private TeslaRecorder recorder;
-
- public UIIDERecordingProcessor() {
- UIIDEEventManager.addListener(this);
- }
-
- @SuppressWarnings("unused")
- private SWTEventRecorder getSWTProcessor() {
- return recorder.getProcessor(SWTEventRecorder.class);
- }
-
- public void restartEclipse() {
- // WaitForRestart command is created by
- // WorkbenchRecordingProcessor.restartEclipse()
- // it must not be added here
-
- // getSWTProcessor().getRecorder().safeExecuteCommand(
- // ProtocolFactory.eINSTANCE.createWaitForRestart());
- }
-
- public void initialize(TeslaRecorder teslaRecorder) {
- this.recorder = teslaRecorder;
- }
-
- public int getInitLevel() {
- return 1000;
- };
-
- public void clear() {
-
- }
-
- public void setFreeze(boolean value, SetMode command) {
- }
-
- public void resetAssertSelection() {
- }
-
- public IRecordingHelper<?> getHelper() {
- return null;
- }
-}
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.runtime-feature/feature.xml b/runtime/tesla/org.eclipse.rcptt.tesla.runtime-feature/feature.xml
index a816bc5..921419d 100644
--- a/runtime/tesla/org.eclipse.rcptt.tesla.runtime-feature/feature.xml
+++ b/runtime/tesla/org.eclipse.rcptt.tesla.runtime-feature/feature.xml
@@ -306,13 +306,6 @@
unpack="false"/>
<plugin
- id="org.eclipse.rcptt.tesla.recording.aspects.ui.ide"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
id="org.eclipse.rcptt.tesla.variables"
download-size="0"
install-size="0"
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.runtime.e4x-feature/feature.xml b/runtime/tesla/org.eclipse.rcptt.tesla.runtime.e4x-feature/feature.xml
index 52dcf9c..ed5f23c 100644
--- a/runtime/tesla/org.eclipse.rcptt.tesla.runtime.e4x-feature/feature.xml
+++ b/runtime/tesla/org.eclipse.rcptt.tesla.runtime.e4x-feature/feature.xml
@@ -306,13 +306,6 @@
unpack="false"/>
<plugin
- id="org.eclipse.rcptt.tesla.recording.aspects.ui.ide"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
id="org.eclipse.rcptt.tesla.variables"
download-size="0"
install-size="0"
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.swt.aspects/src/org/eclipse/rcptt/tesla/swt/events/TeslaEventManager.java b/runtime/tesla/org.eclipse.rcptt.tesla.swt.aspects/src/org/eclipse/rcptt/tesla/swt/events/TeslaEventManager.java
index 94e3f7e..5eb7834 100644
--- a/runtime/tesla/org.eclipse.rcptt.tesla.swt.aspects/src/org/eclipse/rcptt/tesla/swt/events/TeslaEventManager.java
+++ b/runtime/tesla/org.eclipse.rcptt.tesla.swt.aspects/src/org/eclipse/rcptt/tesla/swt/events/TeslaEventManager.java
@@ -245,16 +245,6 @@
}
public static void updateActiveShell() {
- if (Platform.getOS().equals(Platform.OS_LINUX) && activeShell != null
- && !activeShell.isDisposed()) {
- try {
- Field field = Display.class.getDeclaredField("activeShell");
- field.setAccessible(true);
- field.set(activeShell.getDisplay(), activeShell);
- } catch (Throwable e) {
- SWTAspectActivator.log(e);
- }
- }
}
public static Shell getActiveShell() {
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.swt/src/org/eclipse/rcptt/tesla/internal/ui/player/UIJobCollector.java b/runtime/tesla/org.eclipse.rcptt.tesla.swt/src/org/eclipse/rcptt/tesla/internal/ui/player/UIJobCollector.java
index 9129def..3b5bab4 100644
--- a/runtime/tesla/org.eclipse.rcptt.tesla.swt/src/org/eclipse/rcptt/tesla/internal/ui/player/UIJobCollector.java
+++ b/runtime/tesla/org.eclipse.rcptt.tesla.swt/src/org/eclipse/rcptt/tesla/internal/ui/player/UIJobCollector.java
@@ -16,6 +16,7 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
+import java.util.IdentityHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -42,7 +43,6 @@
import org.eclipse.rcptt.tesla.ui.IJobCollector;
import org.eclipse.rcptt.tesla.ui.IJobCollector.JobStatus;
import org.eclipse.rcptt.tesla.ui.SWTTeslaActivator;
-import org.eclipse.rcptt.util.WeakIdentityHashMap;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
@@ -132,7 +132,8 @@
}
- private final Map<Job, JobInfo> jobs = Collections.synchronizedMap(new WeakIdentityHashMap<Job, JobInfo>());
+
+ private final Map<Job, JobInfo> jobs = Collections.synchronizedMap(new IdentityHashMap<Job, JobInfo>());
private boolean state;
private boolean needDisable = false;
private long stepModeNext = 0;
@@ -166,13 +167,16 @@
}
public void done(IJobChangeEvent event) {
+ JobsManager.getInstance().removeCanceled(event.getJob());
synchronized (jobs) {
- getOrCreateJobInfo(event.getJob()).done(TeslaSWTAccess.getJobEventReSchedule(event) && state);
+ boolean reschedule = TeslaSWTAccess.getJobEventReSchedule(event) && state;
+ getOrCreateJobInfo(event.getJob()).done(reschedule);
if (needDisable && isJoinEmpty()) {
disable();
}
+ if (!reschedule)
+ jobs.remove(event.getJob());
}
- JobsManager.getInstance().removeCanceled(event.getJob());
}
public void running(IJobChangeEvent event) {
@@ -202,16 +206,15 @@
private static final Set<String> IGNORED_BY_DEFAULT = Collections.unmodifiableSet(
new HashSet<String> (
asList(
- "org.eclipse.jdt.internal.core.search.processing.JobManager$1$ProgressJob",
- "org.eclipse.ui.internal.progress.ProgressViewUpdater$1",
- "org.eclipse.ui.internal.progress.WorkbenchSiteProgressService$SiteUpdateJob",
- "org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.RefreshProgressMessageJob",
- "org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$RefreshProgressMessageJob",
- "org.eclipse.ui.internal.progress.AnimationManager$1",
- "org.eclipse.ui.internal.progress.ProgressManager$6",
- "org.eclipse.ui.internal.progress.TaskBarProgressManager$2",
- "org.eclipse.ui.internal.views.markers.CachedMarkerBuilder$1",
- "org.eclipse.rcptt.ui.recording.RecordingSupport$10"
+ "org.eclipse.jdt.internal.core.search.processing.JobManager$1$ProgressJob",
+ "org.eclipse.ui.internal.progress.ProgressViewUpdater$1",
+ "org.eclipse.ui.internal.progress.WorkbenchSiteProgressService$SiteUpdateJob",
+ "org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.RefreshProgressMessageJob",
+ "org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$RefreshProgressMessageJob",
+ "org.eclipse.ui.internal.progress.AnimationManager$1",
+ "org.eclipse.ui.internal.progress.ProgressManager$6",
+ "org.eclipse.ui.internal.progress.TaskBarProgressManager$2",
+ "org.eclipse.ui.internal.views.markers.CachedMarkerBuilder$1"
)
)
);
@@ -487,7 +490,7 @@
if (!jobInfo.jobInStepMode) {
// Print step information
SWTTeslaActivator
- .log("---->>> Begin step mode for Job: "
+ .logToReport("---->>> Begin step mode for Job: "
+ getCurrentReportNodeName()
+ " <<---\n(skipping)"
+ getJobMessage(jobInfo));
diff --git a/runtime/tesla/pom.xml b/runtime/tesla/pom.xml
index 5ab815c..93cdcd2 100644
--- a/runtime/tesla/pom.xml
+++ b/runtime/tesla/pom.xml
@@ -36,7 +36,6 @@
<module>org.eclipse.rcptt.tesla.recording.aspects.jface.text</module>
<module>org.eclipse.rcptt.tesla.recording.aspects.swt</module>
<module>org.eclipse.rcptt.tesla.recording.aspects.workbench</module>
- <module>org.eclipse.rcptt.tesla.recording.aspects.ui.ide</module>
<module>org.eclipse.rcptt.tesla.recording.aspects.workbench.texteditor</module>
<module>org.eclipse.rcptt.tesla.recording.draw2d</module>
<module>org.eclipse.rcptt.tesla.recording.gef</module>