From 6181763e4c9b79a2d1d79d1381097c752841c94f Mon Sep 17 00:00:00 2001 From: Evgeny Lipkin Date: Tue, 16 Aug 2016 13:51:52 +0700 Subject: [PATCH 01/18] added createAssertingModeFeatureAction() --- .../ui/panels/main/ControlPanelWindow.java | 162 ++++++++++++------ 1 file changed, 109 insertions(+), 53 deletions(-) mode change 100644 => 100755 rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/main/ControlPanelWindow.java diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/main/ControlPanelWindow.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/main/ControlPanelWindow.java old mode 100644 new mode 100755 index c282ab03c..ca152dbfd --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/main/ControlPanelWindow.java +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/main/ControlPanelWindow.java @@ -114,22 +114,26 @@ public class ControlPanelWindow extends Dialog { private final Scenario scenario = ScenarioFactory.eINSTANCE .createScenario(); - private final WritableValue testCase = new WritableValue(null, + private final WritableValue testCase = new WritableValue(null, ITestCase.class); + private final ShellAdapter closeListener = new ParentShellCloseListener(); + private final Listener keyListener = new RecordingShortcutListener(); + private AssertionPanelWindow assertionWindow; private EmbeddedTabFolder tabFolder; private CoolBar coolBar; private StatusBarComposite statusBar; private ContextsTable contextsTable; - private final ShellAdapter closeListener = new ParentShellCloseListener(); - private final Listener keyListener = new RecordingShortcutListener(); - private VerificationsTable verificationsTable; private static ControlPanelWindow window; + private CTabItem script; + + private ScriptComposite scriptPart; + public static synchronized ControlPanelWindow openControlPanel( Shell parentShell, ITestCase testCase) throws ModelException { if (window != null && window.getShell() != null @@ -157,7 +161,7 @@ private ControlPanelWindow(Shell parentShell, ITestCase testCase) super((Shell) null); this.parentShell = parentShell; - setShellStyle(SWT.RESIZE /* | SWT.TOOL */| SWT.CLOSE /* | SWT.ON_TOP */); + setShellStyle(SWT.RESIZE /* | SWT.TOOL */ | SWT.CLOSE /* | SWT.ON_TOP */); if (testCase != null) { setModel(testCase); copyContent((Scenario) testCase.getNamedElement(), this.scenario); @@ -210,7 +214,7 @@ protected Control createContents(Composite parent) { scriptPart = new ScriptComposite(internalModel, model != null ? (IFile) getModel().getResource() : null, getShell(), SWT.SCROLL_LOCK); - ComputedValue recordingMode = new ComputedValue() { + ComputedValue recordingMode = new ComputedValue() { @Override protected Object calculate() { return recordingSupport.getMode(); @@ -284,7 +288,7 @@ public void run() { statusBar.createControl(parent); // statusBar.getControl().addKeyListener(keyListener); dbc.bindValue(WidgetProperties.text().observe(getShell()), - new ComputedValue() { + new ComputedValue() { @Override protected Object calculate() { StringBuilder text = new StringBuilder( @@ -439,7 +443,7 @@ protected void fill(MenuManager manager) { Messages.ControlPanelWindow_SaveAction) { { dbc.bindValue(Actions.observeEnabled(this), - new ComputedValue() { + new ComputedValue() { @Override protected Object calculate() { return getModel() != null; @@ -462,7 +466,7 @@ public void run() { } }); dbc.bindValue(Actions.observeToolTipText(saveAction), - new ComputedValue() { + new ComputedValue() { @Override protected Object calculate() { if (getModel() != null) { @@ -497,6 +501,7 @@ protected Object calculate() { if (Q7UIPlugin.isImageRecognitionAllowed()) { manager.add(createImageRecognitionModeAction()); } + manager.add(createAssertingModeFeatureAction()); coolBarManager.add(manager); } coolBar = coolBarManager.createControl(toolbarComposite); @@ -519,17 +524,17 @@ public void run() { } }; }; - dbc.bindValue(Actions.observeEnabled(action), new ComputedValue( + dbc.bindValue(Actions.observeEnabled(action), new ComputedValue( Boolean.TYPE) { @Override - protected Object calculate() { + protected Boolean calculate() { RecordingMode mode = recordingSupport.getMode(); return mode == RecordingMode.Stopped || mode == RecordingMode.Replaying; } }); dbc.bindValue(Actions.observeImageDescriptor(action), - new ComputedValue() { + new ComputedValue() { @Override protected Object calculate() { if (recordingSupport.getMode() == RecordingMode.Replaying) { @@ -539,7 +544,7 @@ protected Object calculate() { } } }); - dbc.bindValue(Actions.observeToolTipText(action), new ComputedValue() { + dbc.bindValue(Actions.observeToolTipText(action), new ComputedValue() { @Override protected Object calculate() { if (recordingSupport.getMode() == RecordingMode.Replaying) { @@ -563,29 +568,28 @@ public void run() { } }; }; - dbc.bindValue(Actions.observeEnabled(action), new ComputedValue( + dbc.bindValue(Actions.observeEnabled(action), new ComputedValue( Boolean.TYPE) { @Override - protected Object calculate() { + protected Boolean calculate() { RecordingMode mode = recordingSupport.getMode(); return mode == RecordingMode.Stopped || mode != RecordingMode.Replaying; } }); - dbc.bindValue(Actions.observeImageDescriptor(action), - new ComputedValue() { - @Override - protected Object calculate() { - RecordingMode mode = recordingSupport.getMode(); - if (mode == RecordingMode.Stopped - || mode == RecordingMode.Replaying) { - return Images.getImageDescriptor(Images.RECORD); - } else { - return Images.getImageDescriptor(Images.STOP); - } - } - }); - dbc.bindValue(Actions.observeToolTipText(action), new ComputedValue() { + dbc.bindValue(Actions.observeImageDescriptor(action), new ComputedValue() { + @Override + protected Object calculate() { + RecordingMode mode = recordingSupport.getMode(); + if (mode == RecordingMode.Stopped + || mode == RecordingMode.Replaying) { + return Images.getImageDescriptor(Images.RECORD); + } else { + return Images.getImageDescriptor(Images.STOP); + } + } + }); + dbc.bindValue(Actions.observeToolTipText(action), new ComputedValue() { @Override protected Object calculate() { RecordingMode mode = recordingSupport.getMode(); @@ -600,10 +604,10 @@ protected Object calculate() { return action; } - private final ComputedValue modeEnablementObservable = new ComputedValue( + private final ComputedValue modeEnablementObservable = new ComputedValue( Boolean.TYPE) { @Override - protected Object calculate() { + protected Boolean calculate() { RecordingMode mode = recordingSupport.getMode(); return mode != RecordingMode.Stopped && mode != RecordingMode.Replaying @@ -611,10 +615,6 @@ protected Object calculate() { } }; - private CTabItem script; - - private ScriptComposite scriptPart; - private IAction createRecordingModeAction() { IAction action = new Action("", IAction.AS_RADIO_BUTTON) { //$NON-NLS-1$ @Override @@ -622,14 +622,23 @@ public void run() { recordingSupport.setMode(RecordingMode.Recording); } }; - action.setImageDescriptor(Images - .getImageDescriptor(Images.PANEL_MODE_RECORD)); - action.setToolTipText(Messages.ControlPanelWindow_SwitchToRecordModeActionToolTip); + dbc.bindValue(Actions.observeImageDescriptor(action), new ComputedValue() { + @Override + protected Object calculate() { + return Images.getImageDescriptor(Images.PANEL_MODE_RECORD); + } + }); + dbc.bindValue(Actions.observeToolTipText(action), new ComputedValue() { + @Override + protected Object calculate() { + return Messages.ControlPanelWindow_SwitchToRecordModeActionToolTip; + } + }); dbc.bindValue(Actions.observeEnabled(action), modeEnablementObservable); - dbc.bindValue(Actions.observeChecked(action), new ComputedValue( + dbc.bindValue(Actions.observeChecked(action), new ComputedValue( Boolean.TYPE) { @Override - protected Object calculate() { + protected Boolean calculate() { return recordingSupport.getMode() == RecordingMode.Recording; } }); @@ -643,14 +652,52 @@ public void run() { recordingSupport.setMode(RecordingMode.Asserting); } }; - action.setImageDescriptor(Images - .getImageDescriptor(Images.PANEL_MODE_ASSERT)); - action.setToolTipText(Messages.ControlPanelWindow_SwitchToAssertModeActionToolTip); + dbc.bindValue(Actions.observeImageDescriptor(action), new ComputedValue() { + @Override + protected Object calculate() { + return Images.getImageDescriptor(Images.PANEL_MODE_ASSERT); + } + }); + dbc.bindValue(Actions.observeToolTipText(action), new ComputedValue() { + @Override + protected Object calculate() { + return Messages.ControlPanelWindow_SwitchToAssertModeActionToolTip; + } + }); dbc.bindValue(Actions.observeEnabled(action), modeEnablementObservable); - dbc.bindValue(Actions.observeChecked(action), new ComputedValue( + dbc.bindValue(Actions.observeChecked(action), new ComputedValue( Boolean.TYPE) { @Override + protected Boolean calculate() { + return recordingSupport.getMode() == RecordingMode.Asserting; + } + }); + return action; + } + + private IAction createAssertingModeFeatureAction() { + IAction action = new Action() { + @Override + public void run() { + System.out.println("ControlPanelWindow.createAssertingModeFeatureAction Action.run test"); + } + }; + dbc.bindValue(Actions.observeImageDescriptor(action), new ComputedValue() { + @Override protected Object calculate() { + return Images.getImageDescriptor(Images.ECLIPSE); + } + }); + dbc.bindValue(Actions.observeToolTipText(action), new ComputedValue() { + @Override + protected Object calculate() { + return Messages.ControlPanelWindow_OpenAssertingModeTreeDialogActionToolTip; + } + }); + dbc.bindValue(Actions.observeEnabled(action), new ComputedValue( + Boolean.TYPE) { + @Override + protected Boolean calculate() { return recordingSupport.getMode() == RecordingMode.Asserting; } }); @@ -664,14 +711,23 @@ public void run() { recordingSupport.setMode(RecordingMode.ImageRecognition); } }; - action.setImageDescriptor(Images - .getImageDescriptor(Images.PANEL_MODE_IML)); - action.setToolTipText(Messages.ControlPanelWindow_SwitchToRecognitionModeActionToolTip); + dbc.bindValue(Actions.observeImageDescriptor(action), new ComputedValue() { + @Override + protected Object calculate() { + return Images.getImageDescriptor(Images.PANEL_MODE_IML); + } + }); + dbc.bindValue(Actions.observeToolTipText(action), new ComputedValue() { + @Override + protected Object calculate() { + return Messages.ControlPanelWindow_SwitchToRecognitionModeActionToolTip; + } + }); dbc.bindValue(Actions.observeEnabled(action), modeEnablementObservable); - dbc.bindValue(Actions.observeChecked(action), new ComputedValue( + dbc.bindValue(Actions.observeChecked(action), new ComputedValue( Boolean.TYPE) { @Override - protected Object calculate() { + protected Boolean calculate() { return recordingSupport.getMode() == RecordingMode.ImageRecognition; } }); @@ -795,7 +851,8 @@ private void save() { MessageDialog.ERROR, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, - IDialogConstants.CANCEL_LABEL }, 0); + IDialogConstants.CANCEL_LABEL }, + 0); int value = dialog.open(); // Number of pressed button if (value == 0) { saveAs(); @@ -828,7 +885,8 @@ private boolean openSaveDialog() { Messages.ControlPanelWindow_SaveDialogMsg, MessageDialog.QUESTION_WITH_CANCEL, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, - IDialogConstants.CANCEL_LABEL }, 0); + IDialogConstants.CANCEL_LABEL }, + 0); int returnCode = dialog.open(); // Number of pressed button if (returnCode == 0) { if (getModel() != null) { @@ -851,8 +909,6 @@ private void selectTab(CTabItem tab) { tabFolder.setSelection(tab); } - - @Override protected IDialogSettings getDialogBoundsSettings() { final IDialogSettings root = Q7UIPlugin.getDefault() From 35bb8495d0dbed994c161ad56ebe1d0c0435bdd0 Mon Sep 17 00:00:00 2001 From: Evgeny Lipkin Date: Fri, 19 Aug 2016 16:37:43 +0700 Subject: [PATCH 02/18] Added AssertionAUTControlsHierarchyDialog. It's shows hierarchy of AUT controls in assertion mode. --- .../model/AssertionAUTControlsHierarchy.java | 81 ++++ .../AssertionAUTControlsHierarchyState.java | 239 +++++++++++ .../core/ecl/core/model/Q7CoreFactory.java | 9 + .../core/ecl/core/model/Q7CorePackage.java | 145 ++++++- .../AssertionAUTControlsHierarchyImpl.java | 219 +++++++++++ .../core/model/impl/Q7CoreFactoryImpl.java | 35 ++ .../core/model/impl/Q7CorePackageImpl.java | 370 ++++++++++++------ .../core/model/util/Q7CoreAdapterFactory.java | 18 + .../ecl/core/model/util/Q7CoreSwitch.java | 22 ++ .../model/model.ecore | 10 + .../model/q7core.genmodel | 0 .../tesla/core/protocol/ProtocolFactory.java | 18 + .../tesla/core/protocol/ProtocolPackage.java | 224 ++++++++++- .../rcptt/tesla/core/protocol/UIElement.java | 77 ++++ .../core/protocol/UIHierarchyResponse.java | 41 ++ .../protocol/impl/ProtocolFactoryImpl.java | 22 ++ .../protocol/impl/ProtocolPackageImpl.java | 77 ++++ .../core/protocol/impl/UIElementImpl.java | 218 +++++++++++ .../impl/UIHierarchyResponseImpl.java | 134 +++++++ .../tesla/core/ui/util/UiAdapterFactory.java | 0 .../rcptt/tesla/core/ui/util/UiSwitch.java | 0 .../models/protocol.ecore | 8 + .../models/protocol.genmodel | 0 .../eclipse/rcptt/internal/ui/Messages.java | 4 + .../rcptt/internal/ui/messages.properties | 4 + .../AssertionAUTControlsHierarchyDialog.java | 323 +++++++++++++++ .../ui/panels/main/ControlPanelWindow.java | 28 +- .../org.eclipse.rcptt.runtime.ui/plugin.xml | 5 + .../AssertionAUTControlsHierarchyService.java | 177 +++++++++ 29 files changed, 2371 insertions(+), 137 deletions(-) create mode 100644 core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AssertionAUTControlsHierarchy.java create mode 100644 core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AssertionAUTControlsHierarchyState.java mode change 100644 => 100755 core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CoreFactory.java mode change 100644 => 100755 core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CorePackage.java create mode 100644 core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AssertionAUTControlsHierarchyImpl.java mode change 100644 => 100755 core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CoreFactoryImpl.java mode change 100644 => 100755 core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreAdapterFactory.java mode change 100644 => 100755 core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreSwitch.java mode change 100644 => 100755 core/org.eclipse.rcptt.core.ecl.core/model/model.ecore mode change 100644 => 100755 core/org.eclipse.rcptt.core.ecl.core/model/q7core.genmodel mode change 100644 => 100755 core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolFactory.java mode change 100644 => 100755 core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolPackage.java create mode 100644 core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIElement.java create mode 100644 core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIHierarchyResponse.java mode change 100644 => 100755 core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolFactoryImpl.java mode change 100644 => 100755 core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolPackageImpl.java create mode 100644 core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIElementImpl.java create mode 100644 core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIHierarchyResponseImpl.java mode change 100644 => 100755 core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/util/UiAdapterFactory.java mode change 100644 => 100755 core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/util/UiSwitch.java mode change 100644 => 100755 core/org.eclipse.rcptt.tesla.core/models/protocol.ecore mode change 100644 => 100755 core/org.eclipse.rcptt.tesla.core/models/protocol.genmodel mode change 100644 => 100755 rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/Messages.java mode change 100644 => 100755 rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/messages.properties create mode 100644 rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionAUTControlsHierarchyDialog.java mode change 100644 => 100755 runtime/org.eclipse.rcptt.runtime.ui/plugin.xml create mode 100644 runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AssertionAUTControlsHierarchyService.java diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AssertionAUTControlsHierarchy.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AssertionAUTControlsHierarchy.java new file mode 100644 index 000000000..52eddc314 --- /dev/null +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AssertionAUTControlsHierarchy.java @@ -0,0 +1,81 @@ +/** + */ +package org.eclipse.rcptt.core.ecl.core.model; + +import org.eclipse.rcptt.ecl.core.Command; + +/** + * + * A representation of the model object 'Assertion AUT Controls Hierarchy'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy#getId Id}
  • + *
  • {@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy#getState State}
  • + *
+ * + * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAssertionAUTControlsHierarchy() + * @model + * @generated + */ +public interface AssertionAUTControlsHierarchy extends Command { + /** + * Returns the value of the 'Id' attribute. + * The default value is "". + * + *

+ * If the meaning of the 'Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Id' attribute. + * @see #setId(String) + * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAssertionAUTControlsHierarchy_Id() + * @model default="" + * @generated + */ + String getId(); + + /** + * Sets the value of the '{@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy#getId Id}' attribute. + * + * + * @param value the new value of the 'Id' attribute. + * @see #getId() + * @generated + */ + void setId(String value); + + /** + * Returns the value of the 'State' attribute. + * The literals are from the enumeration {@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState}. + * + *

+ * If the meaning of the 'State' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'State' attribute. + * @see org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState + * @see #setState(AssertionAUTControlsHierarchyState) + * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAssertionAUTControlsHierarchy_State() + * @model + * @generated + */ + AssertionAUTControlsHierarchyState getState(); + + /** + * Sets the value of the '{@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy#getState State}' attribute. + * + * + * @param value the new value of the 'State' attribute. + * @see org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState + * @see #getState() + * @generated + */ + void setState(AssertionAUTControlsHierarchyState value); + +} // AssertionAUTControlsHierarchy diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AssertionAUTControlsHierarchyState.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AssertionAUTControlsHierarchyState.java new file mode 100644 index 000000000..a75457a71 --- /dev/null +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AssertionAUTControlsHierarchyState.java @@ -0,0 +1,239 @@ +/** + */ +package org.eclipse.rcptt.core.ecl.core.model; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Assertion AUT Controls Hierarchy State', + * and utility methods for working with them. + * + * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAssertionAUTControlsHierarchyState() + * @model + * @generated + */ +public enum AssertionAUTControlsHierarchyState implements Enumerator { + /** + * The 'Get Root' literal object. + * + * + * @see #GET_ROOT_VALUE + * @generated + * @ordered + */ + GET_ROOT(0, "GetRoot", "GetRoot"), + + /** + * The 'Get Node' literal object. + * + * + * @see #GET_NODE_VALUE + * @generated + * @ordered + */ + GET_NODE(0, "GetNode", "GetNode"), + + /** + * The 'Clear' literal object. + * + * + * @see #CLEAR_VALUE + * @generated + * @ordered + */ + CLEAR(0, "Clear", "Clear"); + + /** + * The 'Get Root' literal value. + * + *

+ * If the meaning of 'Get Root' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #GET_ROOT + * @model name="GetRoot" + * @generated + * @ordered + */ + public static final int GET_ROOT_VALUE = 0; + + /** + * The 'Get Node' literal value. + * + *

+ * If the meaning of 'Get Node' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #GET_NODE + * @model name="GetNode" + * @generated + * @ordered + */ + public static final int GET_NODE_VALUE = 0; + + /** + * The 'Clear' literal value. + * + *

+ * If the meaning of 'Clear' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #CLEAR + * @model name="Clear" + * @generated + * @ordered + */ + public static final int CLEAR_VALUE = 0; + + /** + * An array of all the 'Assertion AUT Controls Hierarchy State' enumerators. + * + * + * @generated + */ + private static final AssertionAUTControlsHierarchyState[] VALUES_ARRAY = + new AssertionAUTControlsHierarchyState[] { + GET_ROOT, + GET_NODE, + CLEAR, + }; + + /** + * A public read-only list of all the 'Assertion AUT Controls Hierarchy State' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Assertion AUT Controls Hierarchy State' literal with the specified literal value. + * + * + * @param literal the literal. + * @return the matching enumerator or null. + * @generated + */ + public static AssertionAUTControlsHierarchyState get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + AssertionAUTControlsHierarchyState result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Assertion AUT Controls Hierarchy State' literal with the specified name. + * + * + * @param name the name. + * @return the matching enumerator or null. + * @generated + */ + public static AssertionAUTControlsHierarchyState getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + AssertionAUTControlsHierarchyState result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Assertion AUT Controls Hierarchy State' literal with the specified integer value. + * + * + * @param value the integer value. + * @return the matching enumerator or null. + * @generated + */ + public static AssertionAUTControlsHierarchyState get(int value) { + switch (value) { + case GET_ROOT_VALUE: return GET_ROOT; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private AssertionAUTControlsHierarchyState(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //AssertionAUTControlsHierarchyState diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CoreFactory.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CoreFactory.java old mode 100644 new mode 100755 index d7fc0b709..d06530dd2 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CoreFactory.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CoreFactory.java @@ -245,6 +245,15 @@ public interface Q7CoreFactory extends EFactory { */ TerminateAut createTerminateAut(); + /** + * Returns a new object of class 'Assertion AUT Controls Hierarchy'. + * + * + * @return a new object of class 'Assertion AUT Controls Hierarchy'. + * @generated + */ + AssertionAUTControlsHierarchy createAssertionAUTControlsHierarchy(); + /** * Returns the package supported by this factory. * diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CorePackage.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CorePackage.java old mode 100644 new mode 100755 index 6b1001cb1..031a161ad --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CorePackage.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CorePackage.java @@ -1179,6 +1179,61 @@ public interface Q7CorePackage extends EPackage { */ int TERMINATE_AUT_FEATURE_COUNT = CorePackage.COMMAND_FEATURE_COUNT + 0; + /** + * The meta object id for the '{@link org.eclipse.rcptt.core.ecl.core.model.impl.AssertionAUTControlsHierarchyImpl Assertion AUT Controls Hierarchy}' class. + * + * + * @see org.eclipse.rcptt.core.ecl.core.model.impl.AssertionAUTControlsHierarchyImpl + * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getAssertionAUTControlsHierarchy() + * @generated + */ + int ASSERTION_AUT_CONTROLS_HIERARCHY = 24; + + /** + * The feature id for the 'Host' attribute. + * + * + * @generated + * @ordered + */ + int ASSERTION_AUT_CONTROLS_HIERARCHY__HOST = CorePackage.COMMAND__HOST; + + /** + * The feature id for the 'Bindings' containment reference list. + * + * + * @generated + * @ordered + */ + int ASSERTION_AUT_CONTROLS_HIERARCHY__BINDINGS = CorePackage.COMMAND__BINDINGS; + + /** + * The feature id for the 'Id' attribute. + * + * + * @generated + * @ordered + */ + int ASSERTION_AUT_CONTROLS_HIERARCHY__ID = CorePackage.COMMAND_FEATURE_COUNT + 0; + + /** + * The feature id for the 'State' attribute. + * + * + * @generated + * @ordered + */ + int ASSERTION_AUT_CONTROLS_HIERARCHY__STATE = CorePackage.COMMAND_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Assertion AUT Controls Hierarchy' class. + * + * + * @generated + * @ordered + */ + int ASSERTION_AUT_CONTROLS_HIERARCHY_FEATURE_COUNT = CorePackage.COMMAND_FEATURE_COUNT + 2; + /** * The meta object id for the '{@link org.eclipse.rcptt.core.ecl.core.model.ExecutionPhase Execution Phase}' enum. * @@ -1187,7 +1242,17 @@ public interface Q7CorePackage extends EPackage { * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getExecutionPhase() * @generated */ - int EXECUTION_PHASE = 24; + int EXECUTION_PHASE = 25; + + /** + * The meta object id for the '{@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState Assertion AUT Controls Hierarchy State}' enum. + * + * + * @see org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState + * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getAssertionAUTControlsHierarchyState() + * @generated + */ + int ASSERTION_AUT_CONTROLS_HIERARCHY_STATE = 26; /** * Returns the meta object for class '{@link org.eclipse.rcptt.core.ecl.core.model.EnterContext Enter Context}'. @@ -1825,6 +1890,38 @@ public interface Q7CorePackage extends EPackage { */ EClass getTerminateAut(); + /** + * Returns the meta object for class '{@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy Assertion AUT Controls Hierarchy}'. + * + * + * @return the meta object for class 'Assertion AUT Controls Hierarchy'. + * @see org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy + * @generated + */ + EClass getAssertionAUTControlsHierarchy(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy#getId Id}'. + * + * + * @return the meta object for the attribute 'Id'. + * @see org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy#getId() + * @see #getAssertionAUTControlsHierarchy() + * @generated + */ + EAttribute getAssertionAUTControlsHierarchy_Id(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy#getState State}'. + * + * + * @return the meta object for the attribute 'State'. + * @see org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy#getState() + * @see #getAssertionAUTControlsHierarchy() + * @generated + */ + EAttribute getAssertionAUTControlsHierarchy_State(); + /** * Returns the meta object for enum '{@link org.eclipse.rcptt.core.ecl.core.model.ExecutionPhase Execution Phase}'. * @@ -1835,6 +1932,16 @@ public interface Q7CorePackage extends EPackage { */ EEnum getExecutionPhase(); + /** + * Returns the meta object for enum '{@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState Assertion AUT Controls Hierarchy State}'. + * + * + * @return the meta object for enum 'Assertion AUT Controls Hierarchy State'. + * @see org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState + * @generated + */ + EEnum getAssertionAUTControlsHierarchyState(); + /** * Returns the factory that creates the instances of the model. * @@ -2385,6 +2492,32 @@ interface Literals { */ EClass TERMINATE_AUT = eINSTANCE.getTerminateAut(); + /** + * The meta object literal for the '{@link org.eclipse.rcptt.core.ecl.core.model.impl.AssertionAUTControlsHierarchyImpl Assertion AUT Controls Hierarchy}' class. + * + * + * @see org.eclipse.rcptt.core.ecl.core.model.impl.AssertionAUTControlsHierarchyImpl + * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getAssertionAUTControlsHierarchy() + * @generated + */ + EClass ASSERTION_AUT_CONTROLS_HIERARCHY = eINSTANCE.getAssertionAUTControlsHierarchy(); + + /** + * The meta object literal for the 'Id' attribute feature. + * + * + * @generated + */ + EAttribute ASSERTION_AUT_CONTROLS_HIERARCHY__ID = eINSTANCE.getAssertionAUTControlsHierarchy_Id(); + + /** + * The meta object literal for the 'State' attribute feature. + * + * + * @generated + */ + EAttribute ASSERTION_AUT_CONTROLS_HIERARCHY__STATE = eINSTANCE.getAssertionAUTControlsHierarchy_State(); + /** * The meta object literal for the '{@link org.eclipse.rcptt.core.ecl.core.model.ExecutionPhase Execution Phase}' enum. * @@ -2395,6 +2528,16 @@ interface Literals { */ EEnum EXECUTION_PHASE = eINSTANCE.getExecutionPhase(); + /** + * The meta object literal for the '{@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState Assertion AUT Controls Hierarchy State}' enum. + * + * + * @see org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState + * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getAssertionAUTControlsHierarchyState() + * @generated + */ + EEnum ASSERTION_AUT_CONTROLS_HIERARCHY_STATE = eINSTANCE.getAssertionAUTControlsHierarchyState(); + } } //Q7CorePackage diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AssertionAUTControlsHierarchyImpl.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AssertionAUTControlsHierarchyImpl.java new file mode 100644 index 000000000..a3c6b5e71 --- /dev/null +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AssertionAUTControlsHierarchyImpl.java @@ -0,0 +1,219 @@ +/** + */ +package org.eclipse.rcptt.core.ecl.core.model.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.core.ecl.core.model.AssertionAUTControlsHierarchy; +import org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState; +import org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage; + +import org.eclipse.rcptt.ecl.core.impl.CommandImpl; + +/** + * + * An implementation of the model object 'Assertion AUT Controls Hierarchy'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.rcptt.core.ecl.core.model.impl.AssertionAUTControlsHierarchyImpl#getId Id}
  • + *
  • {@link org.eclipse.rcptt.core.ecl.core.model.impl.AssertionAUTControlsHierarchyImpl#getState State}
  • + *
+ * + * @generated + */ +public class AssertionAUTControlsHierarchyImpl extends CommandImpl implements AssertionAUTControlsHierarchy { + /** + * The default value of the '{@link #getId() Id}' attribute. + * + * + * @see #getId() + * @generated + * @ordered + */ + protected static final String ID_EDEFAULT = ""; + + /** + * The cached value of the '{@link #getId() Id}' attribute. + * + * + * @see #getId() + * @generated + * @ordered + */ + protected String id = ID_EDEFAULT; + + /** + * The default value of the '{@link #getState() State}' attribute. + * + * + * @see #getState() + * @generated + * @ordered + */ + protected static final AssertionAUTControlsHierarchyState STATE_EDEFAULT = AssertionAUTControlsHierarchyState.GET_ROOT; + + /** + * The cached value of the '{@link #getState() State}' attribute. + * + * + * @see #getState() + * @generated + * @ordered + */ + protected AssertionAUTControlsHierarchyState state = STATE_EDEFAULT; + + /** + * + * + * @generated + */ + protected AssertionAUTControlsHierarchyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Q7CorePackage.Literals.ASSERTION_AUT_CONTROLS_HIERARCHY; + } + + /** + * + * + * @generated + */ + public String getId() { + return id; + } + + /** + * + * + * @generated + */ + public void setId(String newId) { + String oldId = id; + id = newId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY__ID, oldId, id)); + } + + /** + * + * + * @generated + */ + public AssertionAUTControlsHierarchyState getState() { + return state; + } + + /** + * + * + * @generated + */ + public void setState(AssertionAUTControlsHierarchyState newState) { + AssertionAUTControlsHierarchyState oldState = state; + state = newState == null ? STATE_EDEFAULT : newState; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY__STATE, oldState, state)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY__ID: + return getId(); + case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY__STATE: + return getState(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY__ID: + setId((String)newValue); + return; + case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY__STATE: + setState((AssertionAUTControlsHierarchyState)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY__ID: + setId(ID_EDEFAULT); + return; + case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY__STATE: + setState(STATE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY__ID: + return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); + case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY__STATE: + return state != STATE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (id: "); + result.append(id); + result.append(", state: "); + result.append(state); + result.append(')'); + return result.toString(); + } + +} //AssertionAUTControlsHierarchyImpl diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CoreFactoryImpl.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CoreFactoryImpl.java old mode 100644 new mode 100755 index 5b8096dc4..31b3e6193 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CoreFactoryImpl.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CoreFactoryImpl.java @@ -89,6 +89,7 @@ public EObject create(EClass eClass) { case Q7CorePackage.CREATE_VERIFICATION: return createCreateVerification(); case Q7CorePackage.CREATE_WIDGET_VERIFICATION_PARAM: return createCreateWidgetVerificationParam(); case Q7CorePackage.TERMINATE_AUT: return createTerminateAut(); + case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY: return createAssertionAUTControlsHierarchy(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -104,6 +105,8 @@ public Object createFromString(EDataType eDataType, String initialValue) { switch (eDataType.getClassifierID()) { case Q7CorePackage.EXECUTION_PHASE: return createExecutionPhaseFromString(eDataType, initialValue); + case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY_STATE: + return createAssertionAUTControlsHierarchyStateFromString(eDataType, initialValue); default: throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); } @@ -119,6 +122,8 @@ public String convertToString(EDataType eDataType, Object instanceValue) { switch (eDataType.getClassifierID()) { case Q7CorePackage.EXECUTION_PHASE: return convertExecutionPhaseToString(eDataType, instanceValue); + case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY_STATE: + return convertAssertionAUTControlsHierarchyStateToString(eDataType, instanceValue); default: throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); } @@ -364,6 +369,16 @@ public TerminateAut createTerminateAut() { return terminateAut; } + /** + * + * + * @generated + */ + public AssertionAUTControlsHierarchy createAssertionAUTControlsHierarchy() { + AssertionAUTControlsHierarchyImpl assertionAUTControlsHierarchy = new AssertionAUTControlsHierarchyImpl(); + return assertionAUTControlsHierarchy; + } + /** * * @@ -384,6 +399,26 @@ public String convertExecutionPhaseToString(EDataType eDataType, Object instance return instanceValue == null ? null : instanceValue.toString(); } + /** + * + * + * @generated + */ + public AssertionAUTControlsHierarchyState createAssertionAUTControlsHierarchyStateFromString(EDataType eDataType, String initialValue) { + AssertionAUTControlsHierarchyState result = AssertionAUTControlsHierarchyState.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertAssertionAUTControlsHierarchyStateToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + /** * * diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java index f2997e682..fbda81593 100644 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java @@ -1,13 +1,5 @@ -/******************************************************************************* - * Copyright (c) 2009, 2015 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.core.ecl.core.model.impl; import org.eclipse.emf.ecore.EAttribute; @@ -16,10 +8,11 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.EcorePackage; + import org.eclipse.emf.ecore.impl.EPackageImpl; -import org.eclipse.rcptt.ecl.core.CorePackage; -import org.eclipse.rcptt.core.scenario.ScenarioPackage; +import org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy; +import org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState; import org.eclipse.rcptt.core.ecl.core.model.BeginReportNode; import org.eclipse.rcptt.core.ecl.core.model.CreateContext; import org.eclipse.rcptt.core.ecl.core.model.CreateReport; @@ -47,131 +40,158 @@ import org.eclipse.rcptt.core.ecl.core.model.TerminateAut; import org.eclipse.rcptt.core.ecl.core.model.ViewInfo; import org.eclipse.rcptt.core.ecl.core.model.ViewList; + +import org.eclipse.rcptt.core.scenario.ScenarioPackage; + +import org.eclipse.rcptt.ecl.core.CorePackage; + import org.eclipse.rcptt.reporting.ReportingPackage; + import org.eclipse.rcptt.sherlock.core.model.sherlock.report.ReportPackage; /** - * An implementation of the model Package. + * + * An implementation of the model Package. + * * @generated */ public class Q7CorePackageImpl extends EPackageImpl implements Q7CorePackage { /** - * + * + * * @generated */ private EClass enterContextEClass = null; /** - * + * + * * @generated */ private EClass createContextEClass = null; /** - * + * + * * @generated */ private EClass prepareEnvironmentEClass = null; /** - * + * + * * @generated */ private EClass setCommandsDelayEClass = null; /** - * + * + * * @generated */ private EClass getQ7InformationEClass = null; /** - * + * + * * @generated */ private EClass q7InformationEClass = null; /** - * + * + * * @generated */ private EClass setQ7FeaturesEClass = null; /** - * + * + * * @generated */ private EClass getPerspectivesEClass = null; /** - * + * + * * @generated */ private EClass perspectiveInfoEClass = null; /** - * + * + * * @generated */ private EClass perspectivesListEClass = null; /** - * + * + * * @generated */ private EClass getViewsEClass = null; /** - * + * + * * @generated */ private EClass viewInfoEClass = null; /** - * + * + * * @generated */ private EClass viewListEClass = null; /** - * + * + * * @generated */ private EClass createReportEClass = null; /** - * + * + * * @generated */ private EClass getReportEClass = null; /** - * + * + * * @generated */ private EClass beginReportNodeEClass = null; /** - * + * + * * @generated */ private EClass endReportNodeEClass = null; /** - * + * + * * @generated */ private EClass reportAppendEClass = null; /** - * + * + * * @generated */ private EClass setQ7OptionEClass = null; /** - * + * + * * @generated */ private EClass execVerificationEClass = null; @@ -205,21 +225,36 @@ public class Q7CorePackageImpl extends EPackageImpl implements Q7CorePackage { private EClass terminateAutEClass = null; /** - * + * + * + * @generated + */ + private EClass assertionAUTControlsHierarchyEClass = null; + + /** + * + * * @generated */ private EEnum executionPhaseEEnum = null; + /** + * + * + * @generated + */ + private EEnum assertionAUTControlsHierarchyStateEEnum = null; + /** * Creates an instance of the model Package, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the - * package package URI value. - *

- * Note: the correct way to create the package is via the static factory - * method {@link #init init()}, which also performs initialization of the - * package, or returns the registered package, if one already exists. - * + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * * @see org.eclipse.emf.ecore.EPackage.Registry * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#eNS_URI * @see #init() @@ -230,21 +265,19 @@ private Q7CorePackageImpl() { } /** - * + * + * * @generated */ private static boolean isInited = false; /** - * Creates, registers, and initializes the Package for this model, - * and for any others upon which it depends. - * - *

- * This method is used to initialize {@link Q7CorePackage#eINSTANCE} when - * that field is accessed. Clients should not invoke it directly. Instead, - * they should simply access that field to obtain the package. + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. * + *

This method is used to initialize {@link Q7CorePackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() @@ -279,7 +312,8 @@ public static Q7CorePackage init() { } /** - * + * + * * @generated */ public EClass getEnterContext() { @@ -287,7 +321,8 @@ public EClass getEnterContext() { } /** - * + * + * * @generated */ public EReference getEnterContext_Data() { @@ -295,7 +330,8 @@ public EReference getEnterContext_Data() { } /** - * + * + * * @generated */ public EClass getCreateContext() { @@ -303,7 +339,8 @@ public EClass getCreateContext() { } /** - * + * + * * @generated */ public EAttribute getCreateContext_Type() { @@ -311,7 +348,8 @@ public EAttribute getCreateContext_Type() { } /** - * + * + * * @generated */ public EReference getCreateContext_Param() { @@ -319,7 +357,8 @@ public EReference getCreateContext_Param() { } /** - * + * + * * @generated */ public EClass getPrepareEnvironment() { @@ -327,7 +366,8 @@ public EClass getPrepareEnvironment() { } /** - * + * + * * @generated */ public EClass getSetCommandsDelay() { @@ -335,7 +375,8 @@ public EClass getSetCommandsDelay() { } /** - * + * + * * @generated */ public EAttribute getSetCommandsDelay_Delay() { @@ -343,7 +384,8 @@ public EAttribute getSetCommandsDelay_Delay() { } /** - * + * + * * @generated */ public EClass getGetQ7Information() { @@ -351,7 +393,8 @@ public EClass getGetQ7Information() { } /** - * + * + * * @generated */ public EClass getQ7Information() { @@ -359,7 +402,8 @@ public EClass getQ7Information() { } /** - * + * + * * @generated */ public EAttribute getQ7Information_Version() { @@ -367,7 +411,8 @@ public EAttribute getQ7Information_Version() { } /** - * + * + * * @generated */ public EAttribute getQ7Information_TeslaActive() { @@ -375,7 +420,8 @@ public EAttribute getQ7Information_TeslaActive() { } /** - * + * + * * @generated */ public EAttribute getQ7Information_TeslaPort() { @@ -401,7 +447,8 @@ public EAttribute getQ7Information_WindowCount() { } /** - * + * + * * @generated */ public EClass getSetQ7Features() { @@ -409,7 +456,8 @@ public EClass getSetQ7Features() { } /** - * + * + * * @generated */ public EAttribute getSetQ7Features_Features() { @@ -417,7 +465,8 @@ public EAttribute getSetQ7Features_Features() { } /** - * + * + * * @generated */ public EClass getGetPerspectives() { @@ -425,7 +474,8 @@ public EClass getGetPerspectives() { } /** - * + * + * * @generated */ public EClass getPerspectiveInfo() { @@ -433,7 +483,8 @@ public EClass getPerspectiveInfo() { } /** - * + * + * * @generated */ public EAttribute getPerspectiveInfo_Id() { @@ -441,7 +492,8 @@ public EAttribute getPerspectiveInfo_Id() { } /** - * + * + * * @generated */ public EAttribute getPerspectiveInfo_Image() { @@ -449,7 +501,8 @@ public EAttribute getPerspectiveInfo_Image() { } /** - * + * + * * @generated */ public EAttribute getPerspectiveInfo_Label() { @@ -457,7 +510,8 @@ public EAttribute getPerspectiveInfo_Label() { } /** - * + * + * * @generated */ public EAttribute getPerspectiveInfo_Description() { @@ -465,7 +519,8 @@ public EAttribute getPerspectiveInfo_Description() { } /** - * + * + * * @generated */ public EClass getPerspectivesList() { @@ -473,7 +528,8 @@ public EClass getPerspectivesList() { } /** - * + * + * * @generated */ public EReference getPerspectivesList_Perspectives() { @@ -481,7 +537,8 @@ public EReference getPerspectivesList_Perspectives() { } /** - * + * + * * @generated */ public EClass getGetViews() { @@ -489,7 +546,8 @@ public EClass getGetViews() { } /** - * + * + * * @generated */ public EClass getViewInfo() { @@ -497,7 +555,8 @@ public EClass getViewInfo() { } /** - * + * + * * @generated */ public EAttribute getViewInfo_Id() { @@ -505,7 +564,8 @@ public EAttribute getViewInfo_Id() { } /** - * + * + * * @generated */ public EAttribute getViewInfo_Image() { @@ -513,7 +573,8 @@ public EAttribute getViewInfo_Image() { } /** - * + * + * * @generated */ public EAttribute getViewInfo_Label() { @@ -521,7 +582,8 @@ public EAttribute getViewInfo_Label() { } /** - * + * + * * @generated */ public EAttribute getViewInfo_Description() { @@ -529,7 +591,8 @@ public EAttribute getViewInfo_Description() { } /** - * + * + * * @generated */ public EReference getViewInfo_Items() { @@ -537,7 +600,8 @@ public EReference getViewInfo_Items() { } /** - * + * + * * @generated */ public EClass getViewList() { @@ -545,7 +609,8 @@ public EClass getViewList() { } /** - * + * + * * @generated */ public EReference getViewList_Items() { @@ -553,7 +618,8 @@ public EReference getViewList_Items() { } /** - * + * + * * @generated */ public EClass getCreateReport() { @@ -561,7 +627,8 @@ public EClass getCreateReport() { } /** - * + * + * * @generated */ public EAttribute getCreateReport_Name() { @@ -569,7 +636,8 @@ public EAttribute getCreateReport_Name() { } /** - * + * + * * @generated */ public EReference getCreateReport_Q7info() { @@ -577,7 +645,8 @@ public EReference getCreateReport_Q7info() { } /** - * + * + * * @generated */ public EClass getGetReport() { @@ -585,7 +654,8 @@ public EClass getGetReport() { } /** - * + * + * * @generated */ public EClass getBeginReportNode() { @@ -593,7 +663,8 @@ public EClass getBeginReportNode() { } /** - * + * + * * @generated */ public EAttribute getBeginReportNode_Name() { @@ -601,7 +672,8 @@ public EAttribute getBeginReportNode_Name() { } /** - * + * + * * @generated */ public EReference getBeginReportNode_Properties() { @@ -609,7 +681,8 @@ public EReference getBeginReportNode_Properties() { } /** - * + * + * * @generated */ public EClass getEndReportNode() { @@ -617,7 +690,8 @@ public EClass getEndReportNode() { } /** - * + * + * * @generated */ public EAttribute getEndReportNode_Snaphots() { @@ -625,7 +699,8 @@ public EAttribute getEndReportNode_Snaphots() { } /** - * + * + * * @generated */ public EAttribute getEndReportNode_TakeSnaphots() { @@ -642,7 +717,8 @@ public EReference getEndReportNode_Result() { } /** - * + * + * * @generated */ public EClass getReportAppend() { @@ -650,7 +726,8 @@ public EClass getReportAppend() { } /** - * + * + * * @generated */ public EReference getReportAppend_Objects() { @@ -658,7 +735,8 @@ public EReference getReportAppend_Objects() { } /** - * + * + * * @generated */ public EClass getSetQ7Option() { @@ -666,7 +744,8 @@ public EClass getSetQ7Option() { } /** - * + * + * * @generated */ public EAttribute getSetQ7Option_Key() { @@ -674,7 +753,8 @@ public EAttribute getSetQ7Option_Key() { } /** - * + * + * * @generated */ public EAttribute getSetQ7Option_Value() { @@ -682,7 +762,8 @@ public EAttribute getSetQ7Option_Value() { } /** - * + * + * * @generated */ public EClass getExecVerification() { @@ -690,7 +771,8 @@ public EClass getExecVerification() { } /** - * + * + * * @generated */ public EReference getExecVerification_Verification() { @@ -698,7 +780,8 @@ public EReference getExecVerification_Verification() { } /** - * + * + * * @generated */ public EAttribute getExecVerification_Phase() { @@ -769,7 +852,35 @@ public EClass getTerminateAut() { } /** - * + * + * + * @generated + */ + public EClass getAssertionAUTControlsHierarchy() { + return assertionAUTControlsHierarchyEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getAssertionAUTControlsHierarchy_Id() { + return (EAttribute)assertionAUTControlsHierarchyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getAssertionAUTControlsHierarchy_State() { + return (EAttribute)assertionAUTControlsHierarchyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * * @generated */ public EEnum getExecutionPhase() { @@ -777,7 +888,17 @@ public EEnum getExecutionPhase() { } /** - * + * + * + * @generated + */ + public EEnum getAssertionAUTControlsHierarchyState() { + return assertionAUTControlsHierarchyStateEEnum; + } + + /** + * + * * @generated */ public Q7CoreFactory getQ7CoreFactory() { @@ -785,7 +906,8 @@ public Q7CoreFactory getQ7CoreFactory() { } /** - * + * + * * @generated */ private boolean isCreated = false; @@ -886,21 +1008,27 @@ public void createPackageContents() { terminateAutEClass = createEClass(TERMINATE_AUT); + assertionAUTControlsHierarchyEClass = createEClass(ASSERTION_AUT_CONTROLS_HIERARCHY); + createEAttribute(assertionAUTControlsHierarchyEClass, ASSERTION_AUT_CONTROLS_HIERARCHY__ID); + createEAttribute(assertionAUTControlsHierarchyEClass, ASSERTION_AUT_CONTROLS_HIERARCHY__STATE); + // Create enums executionPhaseEEnum = createEEnum(EXECUTION_PHASE); + assertionAUTControlsHierarchyStateEEnum = createEEnum(ASSERTION_AUT_CONTROLS_HIERARCHY_STATE); } /** - * + * + * * @generated */ private boolean isInitialized = false; /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * * @generated */ public void initializePackageContents() { @@ -942,6 +1070,7 @@ public void initializePackageContents() { resetVerificationsEClass.getESuperTypes().add(theCorePackage.getCommand()); createVerificationEClass.getESuperTypes().add(theCorePackage.getCommand()); terminateAutEClass.getESuperTypes().add(theCorePackage.getCommand()); + assertionAUTControlsHierarchyEClass.getESuperTypes().add(theCorePackage.getCommand()); // Initialize classes and features; add operations and parameters initEClass(enterContextEClass, EnterContext.class, "EnterContext", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -1028,6 +1157,10 @@ public void initializePackageContents() { initEClass(terminateAutEClass, TerminateAut.class, "TerminateAut", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEClass(assertionAUTControlsHierarchyEClass, AssertionAUTControlsHierarchy.class, "AssertionAUTControlsHierarchy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getAssertionAUTControlsHierarchy_Id(), theEcorePackage.getEString(), "id", "", 0, 1, AssertionAUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAssertionAUTControlsHierarchy_State(), this.getAssertionAUTControlsHierarchyState(), "state", null, 0, 1, AssertionAUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + // Initialize enums and add enum literals initEEnum(executionPhaseEEnum, ExecutionPhase.class, "ExecutionPhase"); addEEnumLiteral(executionPhaseEEnum, ExecutionPhase.AUTO); @@ -1035,6 +1168,11 @@ public void initializePackageContents() { addEEnumLiteral(executionPhaseEEnum, ExecutionPhase.RUN); addEEnumLiteral(executionPhaseEEnum, ExecutionPhase.FINISH); + initEEnum(assertionAUTControlsHierarchyStateEEnum, AssertionAUTControlsHierarchyState.class, "AssertionAUTControlsHierarchyState"); + addEEnumLiteral(assertionAUTControlsHierarchyStateEEnum, AssertionAUTControlsHierarchyState.GET_ROOT); + addEEnumLiteral(assertionAUTControlsHierarchyStateEEnum, AssertionAUTControlsHierarchyState.GET_NODE); + addEEnumLiteral(assertionAUTControlsHierarchyStateEEnum, AssertionAUTControlsHierarchyState.CLEAR); + // Create resource createResource(eNS_URI); @@ -1049,8 +1187,8 @@ public void initializePackageContents() { /** * Initializes the annotations for http://www.eclipse.org/ecl/internal. - * + * + * * @generated */ protected void createInternalAnnotations() { @@ -1144,7 +1282,8 @@ protected void createInternalAnnotations() { /** * Initializes the annotations for http://www.eclipse.org/ecl/input. - * + * + * * @generated */ protected void createInputAnnotations() { @@ -1158,7 +1297,8 @@ protected void createInputAnnotations() { /** * Initializes the annotations for http://www.eclipse.org/ecl/docs. - * + * + * * @generated */ protected void createDocsAnnotations() { @@ -1178,4 +1318,4 @@ protected void createDocsAnnotations() { }); } -} // Q7CorePackageImpl +} //Q7CorePackageImpl diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreAdapterFactory.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreAdapterFactory.java old mode 100644 new mode 100755 index 514cb139a..7234b8c86 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreAdapterFactory.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreAdapterFactory.java @@ -174,6 +174,10 @@ public Adapter caseTerminateAut(TerminateAut object) { return createTerminateAutAdapter(); } @Override + public Adapter caseAssertionAUTControlsHierarchy(AssertionAUTControlsHierarchy object) { + return createAssertionAUTControlsHierarchyAdapter(); + } + @Override public Adapter caseCommand(Command object) { return createCommandAdapter(); } @@ -533,6 +537,20 @@ public Adapter createTerminateAutAdapter() { return null; } + /** + * Creates a new adapter for an object of class '{@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy Assertion AUT Controls Hierarchy}'. + * + * 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. + * + * @return the new adapter. + * @see org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy + * @generated + */ + public Adapter createAssertionAUTControlsHierarchyAdapter() { + return null; + } + /** * Creates a new adapter for an object of class '{@link org.eclipse.rcptt.ecl.core.Command Command}'. * diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreSwitch.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreSwitch.java old mode 100644 new mode 100755 index c6ee7fa4b..798dcb517 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreSwitch.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreSwitch.java @@ -255,6 +255,13 @@ protected T doSwitch(int classifierID, EObject theEObject) { if (result == null) result = defaultCase(theEObject); return result; } + case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY: { + AssertionAUTControlsHierarchy assertionAUTControlsHierarchy = (AssertionAUTControlsHierarchy)theEObject; + T result = caseAssertionAUTControlsHierarchy(assertionAUTControlsHierarchy); + if (result == null) result = caseCommand(assertionAUTControlsHierarchy); + if (result == null) result = defaultCase(theEObject); + return result; + } default: return defaultCase(theEObject); } } @@ -619,6 +626,21 @@ public T caseTerminateAut(TerminateAut object) { return null; } + /** + * Returns the result of interpreting the object as an instance of 'Assertion AUT Controls Hierarchy'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Assertion AUT Controls Hierarchy'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAssertionAUTControlsHierarchy(AssertionAUTControlsHierarchy object) { + return null; + } + /** * Returns the result of interpreting the object as an instance of 'Command'. * diff --git a/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore b/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore old mode 100644 new mode 100755 index 8a9c67f2c..0e7fc9e81 --- a/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore +++ b/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore @@ -130,4 +130,14 @@ + + + + + + + + + diff --git a/core/org.eclipse.rcptt.core.ecl.core/model/q7core.genmodel b/core/org.eclipse.rcptt.core.ecl.core/model/q7core.genmodel old mode 100644 new mode 100755 diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolFactory.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolFactory.java old mode 100644 new mode 100755 index e6c3456b1..3f5e120e5 --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolFactory.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolFactory.java @@ -992,6 +992,24 @@ public interface ProtocolFactory extends EFactory { */ RapUploadFile createRapUploadFile(); + /** + * Returns a new object of class 'UI Hierarchy Response'. + * + * + * @return a new object of class 'UI Hierarchy Response'. + * @generated + */ + UIHierarchyResponse createUIHierarchyResponse(); + + /** + * Returns a new object of class 'UI Element'. + * + * + * @return a new object of class 'UI Element'. + * @generated + */ + UIElement createUIElement(); + /** * Returns the package supported by this factory. * diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolPackage.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolPackage.java old mode 100644 new mode 100755 index 746aaca07..16337783e --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolPackage.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolPackage.java @@ -5520,6 +5520,125 @@ public interface ProtocolPackage extends EPackage { */ int RAP_UPLOAD_FILE_FEATURE_COUNT = RawPackage.COMMAND_FEATURE_COUNT + 2; + /** + * The meta object id for the '{@link org.eclipse.rcptt.tesla.core.protocol.impl.UIHierarchyResponseImpl UI Hierarchy Response}' class. + * + * + * @see org.eclipse.rcptt.tesla.core.protocol.impl.UIHierarchyResponseImpl + * @see org.eclipse.rcptt.tesla.core.protocol.impl.ProtocolPackageImpl#getUIHierarchyResponse() + * @generated + */ + int UI_HIERARCHY_RESPONSE = 108; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int UI_HIERARCHY_RESPONSE__STATUS = RawPackage.RESPONSE__STATUS; + + /** + * The feature id for the 'Message' attribute. + * + * + * @generated + * @ordered + */ + int UI_HIERARCHY_RESPONSE__MESSAGE = RawPackage.RESPONSE__MESSAGE; + + /** + * The feature id for the 'Advanced Information' containment reference. + * + * + * @generated + * @ordered + */ + int UI_HIERARCHY_RESPONSE__ADVANCED_INFORMATION = RawPackage.RESPONSE__ADVANCED_INFORMATION; + + /** + * The feature id for the 'Ui Elements' reference list. + * + * + * @generated + * @ordered + */ + int UI_HIERARCHY_RESPONSE__UI_ELEMENTS = RawPackage.RESPONSE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'UI Hierarchy Response' class. + * + * + * @generated + * @ordered + */ + int UI_HIERARCHY_RESPONSE_FEATURE_COUNT = RawPackage.RESPONSE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.rcptt.tesla.core.protocol.impl.UIElementImpl UI Element}' class. + * + * + * @see org.eclipse.rcptt.tesla.core.protocol.impl.UIElementImpl + * @see org.eclipse.rcptt.tesla.core.protocol.impl.ProtocolPackageImpl#getUIElement() + * @generated + */ + int UI_ELEMENT = 109; + + /** + * The feature id for the 'Id' attribute. + * + * + * @generated + * @ordered + */ + int UI_ELEMENT__ID = RawPackage.ELEMENT__ID; + + /** + * The feature id for the 'Kind' attribute. + * + * + * @generated + * @ordered + */ + int UI_ELEMENT__KIND = RawPackage.ELEMENT__KIND; + + /** + * The feature id for the 'Description' attribute. + * + * + * @generated + * @ordered + */ + int UI_ELEMENT__DESCRIPTION = RawPackage.ELEMENT__DESCRIPTION; + + /** + * The feature id for the 'Has Children' attribute. + * + * + * @generated + * @ordered + */ + int UI_ELEMENT__HAS_CHILDREN = RawPackage.ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int UI_ELEMENT__NAME = RawPackage.ELEMENT_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'UI Element' class. + * + * + * @generated + * @ordered + */ + int UI_ELEMENT_FEATURE_COUNT = RawPackage.ELEMENT_FEATURE_COUNT + 2; + /** * The meta object id for the '{@link org.eclipse.rcptt.tesla.core.protocol.SWTDialogKind SWT Dialog Kind}' enum. * @@ -5528,7 +5647,7 @@ public interface ProtocolPackage extends EPackage { * @see org.eclipse.rcptt.tesla.core.protocol.impl.ProtocolPackageImpl#getSWTDialogKind() * @generated */ - int SWT_DIALOG_KIND = 108; + int SWT_DIALOG_KIND = 110; /** * The meta object id for the '{@link org.eclipse.rcptt.tesla.core.protocol.AssertKind Assert Kind}' enum. @@ -5538,7 +5657,7 @@ public interface ProtocolPackage extends EPackage { * @see org.eclipse.rcptt.tesla.core.protocol.impl.ProtocolPackageImpl#getAssertKind() * @generated */ - int ASSERT_KIND = 109; + int ASSERT_KIND = 111; /** * The meta object id for the '{@link org.eclipse.rcptt.tesla.core.protocol.DragKind Drag Kind}' enum. @@ -5548,7 +5667,7 @@ public interface ProtocolPackage extends EPackage { * @see org.eclipse.rcptt.tesla.core.protocol.impl.ProtocolPackageImpl#getDragKind() * @generated */ - int DRAG_KIND = 110; + int DRAG_KIND = 112; /** * The meta object id for the '{@link org.eclipse.rcptt.tesla.core.protocol.MouseEventKind Mouse Event Kind}' enum. @@ -5558,7 +5677,7 @@ public interface ProtocolPackage extends EPackage { * @see org.eclipse.rcptt.tesla.core.protocol.impl.ProtocolPackageImpl#getMouseEventKind() * @generated */ - int MOUSE_EVENT_KIND = 111; + int MOUSE_EVENT_KIND = 113; /** @@ -8478,6 +8597,59 @@ public interface ProtocolPackage extends EPackage { */ EAttribute getRapUploadFile_Path(); + /** + * Returns the meta object for class '{@link org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse UI Hierarchy Response}'. + * + * + * @return the meta object for class 'UI Hierarchy Response'. + * @see org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse + * @generated + */ + EClass getUIHierarchyResponse(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getUiElements Ui Elements}'. + * + * + * @return the meta object for the reference list 'Ui Elements'. + * @see org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getUiElements() + * @see #getUIHierarchyResponse() + * @generated + */ + EReference getUIHierarchyResponse_UiElements(); + + /** + * Returns the meta object for class '{@link org.eclipse.rcptt.tesla.core.protocol.UIElement UI Element}'. + * + * + * @return the meta object for class 'UI Element'. + * @see org.eclipse.rcptt.tesla.core.protocol.UIElement + * @generated + */ + EClass getUIElement(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.rcptt.tesla.core.protocol.UIElement#isHasChildren Has Children}'. + * + * + * @return the meta object for the attribute 'Has Children'. + * @see org.eclipse.rcptt.tesla.core.protocol.UIElement#isHasChildren() + * @see #getUIElement() + * @generated + */ + EAttribute getUIElement_HasChildren(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.rcptt.tesla.core.protocol.UIElement#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.rcptt.tesla.core.protocol.UIElement#getName() + * @see #getUIElement() + * @generated + */ + EAttribute getUIElement_Name(); + /** * Returns the meta object for enum '{@link org.eclipse.rcptt.tesla.core.protocol.SWTDialogKind SWT Dialog Kind}'. * @@ -10956,6 +11128,50 @@ interface Literals { */ EAttribute RAP_UPLOAD_FILE__PATH = eINSTANCE.getRapUploadFile_Path(); + /** + * The meta object literal for the '{@link org.eclipse.rcptt.tesla.core.protocol.impl.UIHierarchyResponseImpl UI Hierarchy Response}' class. + * + * + * @see org.eclipse.rcptt.tesla.core.protocol.impl.UIHierarchyResponseImpl + * @see org.eclipse.rcptt.tesla.core.protocol.impl.ProtocolPackageImpl#getUIHierarchyResponse() + * @generated + */ + EClass UI_HIERARCHY_RESPONSE = eINSTANCE.getUIHierarchyResponse(); + + /** + * The meta object literal for the 'Ui Elements' reference list feature. + * + * + * @generated + */ + EReference UI_HIERARCHY_RESPONSE__UI_ELEMENTS = eINSTANCE.getUIHierarchyResponse_UiElements(); + + /** + * The meta object literal for the '{@link org.eclipse.rcptt.tesla.core.protocol.impl.UIElementImpl UI Element}' class. + * + * + * @see org.eclipse.rcptt.tesla.core.protocol.impl.UIElementImpl + * @see org.eclipse.rcptt.tesla.core.protocol.impl.ProtocolPackageImpl#getUIElement() + * @generated + */ + EClass UI_ELEMENT = eINSTANCE.getUIElement(); + + /** + * The meta object literal for the 'Has Children' attribute feature. + * + * + * @generated + */ + EAttribute UI_ELEMENT__HAS_CHILDREN = eINSTANCE.getUIElement_HasChildren(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute UI_ELEMENT__NAME = eINSTANCE.getUIElement_Name(); + /** * The meta object literal for the '{@link org.eclipse.rcptt.tesla.core.protocol.SWTDialogKind SWT Dialog Kind}' enum. * diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIElement.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIElement.java new file mode 100644 index 000000000..516bdf0e1 --- /dev/null +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIElement.java @@ -0,0 +1,77 @@ +/** + */ +package org.eclipse.rcptt.tesla.core.protocol; + +import org.eclipse.rcptt.tesla.core.protocol.raw.Element; + +/** + * + * A representation of the model object 'UI Element'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.rcptt.tesla.core.protocol.UIElement#isHasChildren Has Children}
  • + *
  • {@link org.eclipse.rcptt.tesla.core.protocol.UIElement#getName Name}
  • + *
+ * + * @see org.eclipse.rcptt.tesla.core.protocol.ProtocolPackage#getUIElement() + * @model + * @generated + */ +public interface UIElement extends Element { + /** + * Returns the value of the 'Has Children' attribute. + * + *

+ * If the meaning of the 'Has Children' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Has Children' attribute. + * @see #setHasChildren(boolean) + * @see org.eclipse.rcptt.tesla.core.protocol.ProtocolPackage#getUIElement_HasChildren() + * @model + * @generated + */ + boolean isHasChildren(); + + /** + * Sets the value of the '{@link org.eclipse.rcptt.tesla.core.protocol.UIElement#isHasChildren Has Children}' attribute. + * + * + * @param value the new value of the 'Has Children' attribute. + * @see #isHasChildren() + * @generated + */ + void setHasChildren(boolean value); + + /** + * Returns the value of the 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.rcptt.tesla.core.protocol.ProtocolPackage#getUIElement_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.rcptt.tesla.core.protocol.UIElement#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // UIElement diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIHierarchyResponse.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIHierarchyResponse.java new file mode 100644 index 000000000..909bc6157 --- /dev/null +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIHierarchyResponse.java @@ -0,0 +1,41 @@ +/** + */ +package org.eclipse.rcptt.tesla.core.protocol; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.rcptt.tesla.core.protocol.raw.Response; + +/** + * + * A representation of the model object 'UI Hierarchy Response'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getUiElements Ui Elements}
  • + *
+ * + * @see org.eclipse.rcptt.tesla.core.protocol.ProtocolPackage#getUIHierarchyResponse() + * @model + * @generated + */ +public interface UIHierarchyResponse extends Response { + /** + * Returns the value of the 'Ui Elements' reference list. + * The list contents are of type {@link org.eclipse.rcptt.tesla.core.protocol.UIElement}. + * + *

+ * If the meaning of the 'Ui Elements' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Ui Elements' reference list. + * @see org.eclipse.rcptt.tesla.core.protocol.ProtocolPackage#getUIHierarchyResponse_UiElements() + * @model + * @generated + */ + EList getUiElements(); + +} // UIHierarchyResponse diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolFactoryImpl.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolFactoryImpl.java old mode 100644 new mode 100755 index 799984337..5ee5840a7 --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolFactoryImpl.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolFactoryImpl.java @@ -170,6 +170,8 @@ public EObject create(EClass eClass) { case ProtocolPackage.UPDATE_CONTROL_COMMAND: return createUpdateControlCommand(); case ProtocolPackage.RAP_DOWNLOAD_FILE: return createRapDownloadFile(); case ProtocolPackage.RAP_UPLOAD_FILE: return createRapUploadFile(); + case ProtocolPackage.UI_HIERARCHY_RESPONSE: return createUIHierarchyResponse(); + case ProtocolPackage.UI_ELEMENT: return createUIElement(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -1287,6 +1289,26 @@ public RapUploadFile createRapUploadFile() { return rapUploadFile; } + /** + * + * + * @generated + */ + public UIHierarchyResponse createUIHierarchyResponse() { + UIHierarchyResponseImpl uiHierarchyResponse = new UIHierarchyResponseImpl(); + return uiHierarchyResponse; + } + + /** + * + * + * @generated + */ + public UIElement createUIElement() { + UIElementImpl uiElement = new UIElementImpl(); + return uiElement; + } + /** * * diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolPackageImpl.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolPackageImpl.java old mode 100644 new mode 100755 index 4cb86b7e1..bcbb8de5d --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolPackageImpl.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolPackageImpl.java @@ -121,6 +121,8 @@ import org.eclipse.rcptt.tesla.core.protocol.Type; import org.eclipse.rcptt.tesla.core.protocol.TypeAction; import org.eclipse.rcptt.tesla.core.protocol.TypeText; +import org.eclipse.rcptt.tesla.core.protocol.UIElement; +import org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse; import org.eclipse.rcptt.tesla.core.protocol.UpdateControlCommand; import org.eclipse.rcptt.tesla.core.protocol.WaitForRestart; import org.eclipse.rcptt.tesla.core.protocol.WaitForState; @@ -899,6 +901,20 @@ public class ProtocolPackageImpl extends EPackageImpl implements ProtocolPackage */ private EClass rapUploadFileEClass = null; + /** + * + * + * @generated + */ + private EClass uiHierarchyResponseEClass = null; + + /** + * + * + * @generated + */ + private EClass uiElementEClass = null; + /** * * @@ -3467,6 +3483,51 @@ public EAttribute getRapUploadFile_Path() { return (EAttribute)rapUploadFileEClass.getEStructuralFeatures().get(1); } + /** + * + * + * @generated + */ + public EClass getUIHierarchyResponse() { + return uiHierarchyResponseEClass; + } + + /** + * + * + * @generated + */ + public EReference getUIHierarchyResponse_UiElements() { + return (EReference)uiHierarchyResponseEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getUIElement() { + return uiElementEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getUIElement_HasChildren() { + return (EAttribute)uiElementEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getUIElement_Name() { + return (EAttribute)uiElementEClass.getEStructuralFeatures().get(1); + } + /** * * @@ -3914,6 +3975,13 @@ public void createPackageContents() { createEAttribute(rapUploadFileEClass, RAP_UPLOAD_FILE__BASE64FILE); createEAttribute(rapUploadFileEClass, RAP_UPLOAD_FILE__PATH); + uiHierarchyResponseEClass = createEClass(UI_HIERARCHY_RESPONSE); + createEReference(uiHierarchyResponseEClass, UI_HIERARCHY_RESPONSE__UI_ELEMENTS); + + uiElementEClass = createEClass(UI_ELEMENT); + createEAttribute(uiElementEClass, UI_ELEMENT__HAS_CHILDREN); + createEAttribute(uiElementEClass, UI_ELEMENT__NAME); + // Create enums swtDialogKindEEnum = createEEnum(SWT_DIALOG_KIND); assertKindEEnum = createEEnum(ASSERT_KIND); @@ -4057,6 +4125,8 @@ public void initializePackageContents() { updateControlCommandEClass.getESuperTypes().add(theRawPackage.getCommand()); rapDownloadFileEClass.getESuperTypes().add(theRawPackage.getCommand()); rapUploadFileEClass.getESuperTypes().add(theRawPackage.getCommand()); + uiHierarchyResponseEClass.getESuperTypes().add(theRawPackage.getResponse()); + uiElementEClass.getESuperTypes().add(theRawPackage.getElement()); // Initialize classes and features; add operations and parameters initEClass(selectDataEClass, SelectData.class, "SelectData", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -4442,6 +4512,13 @@ public void initializePackageContents() { initEAttribute(getRapUploadFile_Base64file(), theEcorePackage.getEString(), "base64file", null, 0, 1, RapUploadFile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getRapUploadFile_Path(), theEcorePackage.getEString(), "path", null, 0, 1, RapUploadFile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(uiHierarchyResponseEClass, UIHierarchyResponse.class, "UIHierarchyResponse", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getUIHierarchyResponse_UiElements(), this.getUIElement(), null, "uiElements", null, 0, -1, UIHierarchyResponse.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(uiElementEClass, UIElement.class, "UIElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getUIElement_HasChildren(), theEcorePackage.getEBoolean(), "hasChildren", null, 0, 1, UIElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getUIElement_Name(), theEcorePackage.getEString(), "name", null, 0, 1, UIElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + // Initialize enums and add enum literals initEEnum(swtDialogKindEEnum, SWTDialogKind.class, "SWTDialogKind"); addEEnumLiteral(swtDialogKindEEnum, SWTDialogKind.FILE_SELECTOR); diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIElementImpl.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIElementImpl.java new file mode 100644 index 000000000..a399a242c --- /dev/null +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIElementImpl.java @@ -0,0 +1,218 @@ +/** + */ +package org.eclipse.rcptt.tesla.core.protocol.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.tesla.core.protocol.ProtocolPackage; +import org.eclipse.rcptt.tesla.core.protocol.UIElement; + +import org.eclipse.rcptt.tesla.core.protocol.raw.impl.ElementImpl; + +/** + * + * An implementation of the model object 'UI Element'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.rcptt.tesla.core.protocol.impl.UIElementImpl#isHasChildren Has Children}
  • + *
  • {@link org.eclipse.rcptt.tesla.core.protocol.impl.UIElementImpl#getName Name}
  • + *
+ * + * @generated + */ +public class UIElementImpl extends ElementImpl implements UIElement { + /** + * The default value of the '{@link #isHasChildren() Has Children}' attribute. + * + * + * @see #isHasChildren() + * @generated + * @ordered + */ + protected static final boolean HAS_CHILDREN_EDEFAULT = false; + + /** + * The cached value of the '{@link #isHasChildren() Has Children}' attribute. + * + * + * @see #isHasChildren() + * @generated + * @ordered + */ + protected boolean hasChildren = HAS_CHILDREN_EDEFAULT; + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected UIElementImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProtocolPackage.Literals.UI_ELEMENT; + } + + /** + * + * + * @generated + */ + public boolean isHasChildren() { + return hasChildren; + } + + /** + * + * + * @generated + */ + public void setHasChildren(boolean newHasChildren) { + boolean oldHasChildren = hasChildren; + hasChildren = newHasChildren; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProtocolPackage.UI_ELEMENT__HAS_CHILDREN, oldHasChildren, hasChildren)); + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProtocolPackage.UI_ELEMENT__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ProtocolPackage.UI_ELEMENT__HAS_CHILDREN: + return isHasChildren(); + case ProtocolPackage.UI_ELEMENT__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ProtocolPackage.UI_ELEMENT__HAS_CHILDREN: + setHasChildren((Boolean)newValue); + return; + case ProtocolPackage.UI_ELEMENT__NAME: + setName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ProtocolPackage.UI_ELEMENT__HAS_CHILDREN: + setHasChildren(HAS_CHILDREN_EDEFAULT); + return; + case ProtocolPackage.UI_ELEMENT__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ProtocolPackage.UI_ELEMENT__HAS_CHILDREN: + return hasChildren != HAS_CHILDREN_EDEFAULT; + case ProtocolPackage.UI_ELEMENT__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (hasChildren: "); + result.append(hasChildren); + result.append(", name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //UIElementImpl diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIHierarchyResponseImpl.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIHierarchyResponseImpl.java new file mode 100644 index 000000000..3311a596a --- /dev/null +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIHierarchyResponseImpl.java @@ -0,0 +1,134 @@ +/** + */ +package org.eclipse.rcptt.tesla.core.protocol.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.util.EObjectResolvingEList; + +import org.eclipse.rcptt.tesla.core.protocol.ProtocolPackage; +import org.eclipse.rcptt.tesla.core.protocol.UIElement; +import org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse; + +import org.eclipse.rcptt.tesla.core.protocol.raw.impl.ResponseImpl; + +/** + * + * An implementation of the model object 'UI Hierarchy Response'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.rcptt.tesla.core.protocol.impl.UIHierarchyResponseImpl#getUiElements Ui Elements}
  • + *
+ * + * @generated + */ +public class UIHierarchyResponseImpl extends ResponseImpl implements UIHierarchyResponse { + /** + * The cached value of the '{@link #getUiElements() Ui Elements}' reference list. + * + * + * @see #getUiElements() + * @generated + * @ordered + */ + protected EList uiElements; + + /** + * + * + * @generated + */ + protected UIHierarchyResponseImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProtocolPackage.Literals.UI_HIERARCHY_RESPONSE; + } + + /** + * + * + * @generated + */ + public EList getUiElements() { + if (uiElements == null) { + uiElements = new EObjectResolvingEList(UIElement.class, this, ProtocolPackage.UI_HIERARCHY_RESPONSE__UI_ELEMENTS); + } + return uiElements; + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ProtocolPackage.UI_HIERARCHY_RESPONSE__UI_ELEMENTS: + return getUiElements(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ProtocolPackage.UI_HIERARCHY_RESPONSE__UI_ELEMENTS: + getUiElements().clear(); + getUiElements().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ProtocolPackage.UI_HIERARCHY_RESPONSE__UI_ELEMENTS: + getUiElements().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ProtocolPackage.UI_HIERARCHY_RESPONSE__UI_ELEMENTS: + return uiElements != null && !uiElements.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //UIHierarchyResponseImpl diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/util/UiAdapterFactory.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/util/UiAdapterFactory.java old mode 100644 new mode 100755 diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/util/UiSwitch.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/util/UiSwitch.java old mode 100644 new mode 100755 diff --git a/core/org.eclipse.rcptt.tesla.core/models/protocol.ecore b/core/org.eclipse.rcptt.tesla.core/models/protocol.ecore old mode 100644 new mode 100755 index cb5f87e3e..dc0ba6ab8 --- a/core/org.eclipse.rcptt.tesla.core/models/protocol.ecore +++ b/core/org.eclipse.rcptt.tesla.core/models/protocol.ecore @@ -444,4 +444,12 @@ + + + + + + + diff --git a/core/org.eclipse.rcptt.tesla.core/models/protocol.genmodel b/core/org.eclipse.rcptt.tesla.core/models/protocol.genmodel old mode 100644 new mode 100755 diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/Messages.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/Messages.java old mode 100644 new mode 100755 index 84ee12981..191a7efa3 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/Messages.java +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/Messages.java @@ -27,6 +27,9 @@ public class Messages extends NLS { public static String AssertImageWindow_TextLabel; public static String AssertImageWindow_Tilte; public static String AssertImageWindow_TypeLabel; + public static String AssertionAUTControlsHierarchyDialog_Title; + public static String AssertionAUTControlsHierarchyDialog_ColumnNameName; + public static String AssertionAUTControlsHierarchyDialog_ColumnNameToolTip; public static String AssertionPanelWindow_AddAssertButton; public static String AssertionPanelWindow_AssertImageButton; public static String AssertionPanelWindow_CloseActionName; @@ -130,6 +133,7 @@ public class Messages extends NLS { public static String ControlPanelWindow_RecordShortcutToolTip; public static String ControlPanelWindow_ReplayAction; public static String ControlPanelWindow_ReturnActionTooltip; + public static String ControlPanelWindow_OpenAssertionAUTControlsHierarchyDialogActionToolTip; public static String ControlPanelWindow_SaveAction; public static String ControlPanelWindow_SaveAsAction; public static String ControlPanelWindow_SaveDialogMsg; diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/messages.properties b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/messages.properties old mode 100644 new mode 100755 index e7eb7a319..88b0a062d --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/messages.properties +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/messages.properties @@ -21,6 +21,9 @@ AssertImageWindow_SelectionLabel=Selection: AssertImageWindow_TextLabel=Text: AssertImageWindow_Tilte=Add Image Assertion AssertImageWindow_TypeLabel=Type: +AssertionAUTControlsHierarchyDialog_Title=AssertionAUTControlsHierarchyDialog +AssertionAUTControlsHierarchyDialog_ColumnNameName=Name +AssertionAUTControlsHierarchyDialog_ColumnNameToolTip=Control name AssertionPanelWindow_AddAssertButton=Add AssertionPanelWindow_AssertImageButton=Assert Image AssertionPanelWindow_CloseActionName=Close @@ -128,6 +131,7 @@ ControlPanelWindow_RecordAction=Record ControlPanelWindow_RecordShortcutToolTip={0} to continue recording ControlPanelWindow_ReplayAction=Replay ControlPanelWindow_ReturnActionTooltip=Return to RCPTT +ControlPanelWindow_OpenAssertionAUTControlsHierarchyDialogActionToolTip=Open assertion mode tree dialog ControlPanelWindow_SaveAction=Save ControlPanelWindow_SaveAsAction=Save As... ControlPanelWindow_SaveDialogMsg=Control Panel contains an unsaved test case. Save it? diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionAUTControlsHierarchyDialog.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionAUTControlsHierarchyDialog.java new file mode 100644 index 000000000..cace0b6e3 --- /dev/null +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionAUTControlsHierarchyDialog.java @@ -0,0 +1,323 @@ +package org.eclipse.rcptt.ui.panels.assertion; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.dialogs.TrayDialog; +import org.eclipse.jface.layout.GridLayoutFactory; +import org.eclipse.jface.layout.TreeColumnLayout; +import org.eclipse.jface.viewers.ColumnLabelProvider; +import org.eclipse.jface.viewers.ColumnWeightData; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.ITreeContentProvider; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.viewers.TreeViewerColumn; +import org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy; +import org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState; +import org.eclipse.rcptt.core.ecl.core.model.Q7CoreFactory; +import org.eclipse.rcptt.internal.ui.Messages; +import org.eclipse.rcptt.internal.ui.Q7UIPlugin; +import org.eclipse.rcptt.launching.AutLaunch; +import org.eclipse.rcptt.tesla.core.protocol.ProtocolFactory; +import org.eclipse.rcptt.tesla.core.protocol.UIElement; +import org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse; +import org.eclipse.rcptt.ui.panels.MenuToolbar; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Monitor; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Tree; + +// TODO: other package + +public class AssertionAUTControlsHierarchyDialog extends TrayDialog { + + private final AutLaunch aut; + + private final Shell parentShell; + + private Composite treeViewerComposite = null; + + private TreeViewer viewer; + + private AUTControlsHierarchyContentProvider contentProvider = null; + + public AssertionAUTControlsHierarchyDialog(AutLaunch aut, Shell parentShell) { + super(parentShell); + this.aut = aut; + this.parentShell = parentShell; + setShellStyle(SWT.RESIZE | SWT.CLOSE); + contentProvider = new AUTControlsHierarchyContentProvider(this.aut); + } + + class AUTControlsHierarchyContentProvider implements ITreeContentProvider { + + private final AutLaunch aut; + + // + private Map hierarchy = new HashMap(); + + // + private Map uiElementsMap = new HashMap(); + + public AUTControlsHierarchyContentProvider(AutLaunch aut) { + this.aut = aut; + } + + @Override + public Object[] getElements(Object inputElement) { + if (!(inputElement instanceof UIElement)) { + return null; + } + + UIElement uiElement = (UIElement) inputElement; + UIElement[] uiElements = getUIElements(uiElementsMap.get(hierarchy.get(uiElement.getId()))); + + List list = new ArrayList(Arrays.asList(uiElements)); + list.remove(inputElement); + + uiElements = list.toArray(uiElements); + + return (UIElement[]) list.toArray(new UIElement[list.size()]); + } + + @Override + public Object[] getChildren(Object parentElement) { + if (!(parentElement instanceof UIElement)) { + return null; + } + UIElement uiElement = (UIElement) parentElement; + return getUIElements(uiElement); + } + + @Override + public Object getParent(Object element) { + if (!(element instanceof UIElement)) { + return null; + } + UIElement uiElement = (UIElement) element; + return hierarchy.get(uiElement.getId()); + } + + @Override + public boolean hasChildren(Object element) { + if (!(element instanceof UIElement)) { + return false; + } + UIElement uiElement = (UIElement) element; + return uiElement.isHasChildren(); + } + + public void clear() { + hierarchy.clear(); + uiElementsMap.clear(); + + AssertionAUTControlsHierarchy assertionAUTControlsHierarchy = Q7CoreFactory.eINSTANCE + .createAssertionAUTControlsHierarchy(); + + assertionAUTControlsHierarchy.setState(AssertionAUTControlsHierarchyState.CLEAR); + + try { + this.aut.execute(assertionAUTControlsHierarchy); + } catch (Exception e) { + Q7UIPlugin.log(e); + } + } + + public UIElement[] getUIElements(UIElement parent) { + List list = new ArrayList(); + + AssertionAUTControlsHierarchy assertionAUTControlsHierarchy = Q7CoreFactory.eINSTANCE + .createAssertionAUTControlsHierarchy(); + + if (null == parent) { + assertionAUTControlsHierarchy.setState(AssertionAUTControlsHierarchyState.GET_ROOT); + } else { + assertionAUTControlsHierarchy.setState(AssertionAUTControlsHierarchyState.GET_NODE); + assertionAUTControlsHierarchy.setId(parent.getId()); + } + + try { + Object childAUTObject = this.aut.execute(assertionAUTControlsHierarchy); + if (childAUTObject instanceof UIHierarchyResponse) { + UIHierarchyResponse response = (UIHierarchyResponse) childAUTObject; + + for (UIElement uiElement : response.getUiElements()) { + + if (null == parent) { + hierarchy.put(uiElement.getId(), "-1"); + } else { + hierarchy.put(uiElement.getId(), parent.getId()); + } + + uiElementsMap.put(uiElement.getId(), uiElement); + + System.out.println(uiElement.getId()); + System.out.println(uiElement.getKind()); + System.out.println(uiElement.isHasChildren()); + + list.add(uiElement); + } + } + } catch (Exception e) { + Q7UIPlugin.log(e); + } + + return (UIElement[]) list.toArray(new UIElement[list.size()]); + } + } + + @Override + public boolean close() { + contentProvider.clear(); + return super.close(); + } + + @Override + protected Shell getParentShell() { + return parentShell; + } + + @Override + protected Control createContents(Composite parent) { + initializeDialogUnits(parent); + final Composite composite = new Composite(parent, SWT.NONE); + composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + composite.setLayout(new GridLayout()); + + final Composite toolbarComposite = new Composite(composite, SWT.NONE); + GridLayoutFactory.fillDefaults().numColumns(2).applyTo(toolbarComposite); + toolbarComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); + + final MenuToolbar menu = new MenuToolbar() { + @Override + protected void fill(MenuManager manager) { + manager.add(new Action(Messages.AssertionPanelWindow_CloseActionName) { + @Override + public void run() { + close(); + } + }); + }; + }; + + menu.create(toolbarComposite).setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false)); + + createTreeViewer(composite).setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + UIElement el = ProtocolFactory.eINSTANCE.createUIElement(); + el.setId("-1"); + el.setKind("root"); + el.setDescription("root"); + el.setHasChildren(true); + + viewer.setInput(el); + + return composite; + } + + @Override + protected void configureShell(Shell newShell) { + super.configureShell(newShell); + newShell.setText(Messages.AssertionAUTControlsHierarchyDialog_Title); + newShell.setLayout(new FillLayout()); + GridLayoutFactory.fillDefaults().equalWidth(true).spacing(0, 0).margins(0, 0).applyTo(newShell); + } + + @Override + protected Point getInitialSize() { + Rectangle bounds = getShell().getDisplay().getBounds(); + int height = bounds.height / 2 - bounds.height / 10; + return new Point(450, height); + } + + protected TreeViewerColumn createNameColumn() { + final TreeViewerColumn column = new TreeViewerColumn(viewer, SWT.NONE); + column.getColumn().setText(Messages.AssertionAUTControlsHierarchyDialog_ColumnNameName); + column.getColumn().setToolTipText(Messages.AssertionAUTControlsHierarchyDialog_ColumnNameToolTip); + column.setLabelProvider(new ColumnLabelProvider() { + @Override + public String getText(Object element) { + if (element instanceof UIElement) { + UIElement uiElement = (UIElement) element; + if (null == uiElement.getName()) { + return uiElement.getKind() + " (" + uiElement.getDescription() + ")"; + } + return uiElement.getKind() + " : " + uiElement.getName() + " (" + uiElement.getDescription() + ")"; + } + return null; + } + }); + return column; + } + + protected Rectangle getDisplayBounds(Point loc) { + Monitor[] ms = getShell().getDisplay().getMonitors(); + if (ms.length > 1) { + Rectangle tmp; + for (int i = 0; i < ms.length; i++) { + tmp = ms[i].getBounds(); + if (tmp.contains(loc)) { + return tmp; + } + } + } + return getShell().getDisplay().getBounds(); + } + + protected Control createTreeViewer(Composite parent) { + treeViewerComposite = new Composite(parent, SWT.NONE); + treeViewerComposite.setLayout(new GridLayout()); + + final Composite treeComposite = new Composite(treeViewerComposite, SWT.NONE); + + final TreeColumnLayout layout = new TreeColumnLayout(); + treeComposite.setLayout(layout); + treeComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + final Tree tree = new Tree(treeComposite, SWT.BORDER | SWT.FULL_SELECTION); + tree.setHeaderVisible(true); + + viewer = new TreeViewer(tree); + + layout.setColumnData(createNameColumn().getColumn(), new ColumnWeightData(10)); + + viewer.setContentProvider(contentProvider); + + viewer.addSelectionChangedListener(new ISelectionChangedListener() { + public void selectionChanged(SelectionChangedEvent event) { + if (event.getSelection() instanceof IStructuredSelection) { + IStructuredSelection selection = (IStructuredSelection) event.getSelection(); + for (Iterator iterator = selection.iterator(); iterator.hasNext();) { + UIElement uiElement = (UIElement) iterator.next(); + // TODO: open AssertionPanelWindow + System.out.println("SELECTED:"); + System.out.println(uiElement.getId()); + System.out.println(uiElement.getKind()); + } + } + } + }); + + return treeViewerComposite; + } + + public AutLaunch getAut() { + return this.aut; + } + +} diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/main/ControlPanelWindow.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/main/ControlPanelWindow.java index ca152dbfd..4471f8d7f 100755 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/main/ControlPanelWindow.java +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/main/ControlPanelWindow.java @@ -72,6 +72,7 @@ import org.eclipse.rcptt.ui.editors.ecl.EclSourceViewer; import org.eclipse.rcptt.ui.panels.ActionMenuCreator; import org.eclipse.rcptt.ui.panels.Actions; +import org.eclipse.rcptt.ui.panels.assertion.AssertionAUTControlsHierarchyDialog; import org.eclipse.rcptt.ui.panels.assertion.AssertionPanelWindow; import org.eclipse.rcptt.ui.recording.RecordingContextManager; import org.eclipse.rcptt.ui.recording.RecordingSupport; @@ -121,6 +122,7 @@ public class ControlPanelWindow extends Dialog { private final Listener keyListener = new RecordingShortcutListener(); private AssertionPanelWindow assertionWindow; + private AssertionAUTControlsHierarchyDialog assertionAUTHierarchyDialog; private EmbeddedTabFolder tabFolder; private CoolBar coolBar; private StatusBarComposite statusBar; @@ -161,7 +163,7 @@ private ControlPanelWindow(Shell parentShell, ITestCase testCase) super((Shell) null); this.parentShell = parentShell; - setShellStyle(SWT.RESIZE /* | SWT.TOOL */ | SWT.CLOSE /* | SWT.ON_TOP */); + setShellStyle(SWT.RESIZE | SWT.CLOSE); if (testCase != null) { setModel(testCase); copyContent((Scenario) testCase.getNamedElement(), this.scenario); @@ -286,7 +288,6 @@ public void run() { }; }; statusBar.createControl(parent); - // statusBar.getControl().addKeyListener(keyListener); dbc.bindValue(WidgetProperties.text().observe(getShell()), new ComputedValue() { @Override @@ -374,18 +375,6 @@ private CTabFolder createTabFolder(Composite parent) { tabFolder.setUnselectedCloseVisible(false); tabFolder.setUnselectedImageVisible(true); - // ThemeManagerAdapter themePreferences = new ThemeManagerAdapter( - // PlatformUI.getWorkbench().getThemeManager()); - // - // DefaultThemeListener themeListener = new DefaultThemeListener( - // tabFolder, themePreferences); - // themePreferences.addListener(themeListener); - // PreferenceStoreAdapter apiPreferences = new PreferenceStoreAdapter( - // PrefUtil.getAPIPreferenceStore()); - // new DefaultSimpleTabListener(apiPreferences, - // IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS, - // tabFolder); - final Color c1 = new Color(Display.getCurrent(), 232, 238, 244); final Color c2 = new Color(Display.getCurrent(), 153, 180, 209); CTabFolder control = (CTabFolder) tabFolder; @@ -398,7 +387,6 @@ public void widgetDisposed(DisposeEvent e) { } }); - // tabFolder.getControl().addKeyListener(keyListener); return tabFolder; } @@ -679,7 +667,13 @@ private IAction createAssertingModeFeatureAction() { IAction action = new Action() { @Override public void run() { - System.out.println("ControlPanelWindow.createAssertingModeFeatureAction Action.run test"); + if (assertionAUTHierarchyDialog == null + || assertionAUTHierarchyDialog.getShell() == null + || assertionAUTHierarchyDialog.getShell().isDisposed()) { + assertionAUTHierarchyDialog = new AssertionAUTControlsHierarchyDialog(recordingSupport.getAUT(), + getShell()); + } + assertionAUTHierarchyDialog.open(); } }; dbc.bindValue(Actions.observeImageDescriptor(action), new ComputedValue() { @@ -691,7 +685,7 @@ protected Object calculate() { dbc.bindValue(Actions.observeToolTipText(action), new ComputedValue() { @Override protected Object calculate() { - return Messages.ControlPanelWindow_OpenAssertingModeTreeDialogActionToolTip; + return Messages.ControlPanelWindow_OpenAssertionAUTControlsHierarchyDialogActionToolTip; } }); dbc.bindValue(Actions.observeEnabled(action), new ComputedValue( diff --git a/runtime/org.eclipse.rcptt.runtime.ui/plugin.xml b/runtime/org.eclipse.rcptt.runtime.ui/plugin.xml old mode 100644 new mode 100755 index eef103beb..cfe1f6105 --- a/runtime/org.eclipse.rcptt.runtime.ui/plugin.xml +++ b/runtime/org.eclipse.rcptt.runtime.ui/plugin.xml @@ -52,6 +52,11 @@ name="SetQ7Option" namespace="http://eclipse.org/rcptt/core/ecl"> + + widgetsMap = new HashMap(); + + private int lastIndex = 0; + + private IProcess context; + + private Display display; + + public IStatus service(Command command, IProcess context) + throws InterruptedException, CoreException { + + this.context = context; + + AssertionAUTControlsHierarchy assertionAUTControlsHierarchy = (AssertionAUTControlsHierarchy) command; + String id = assertionAUTControlsHierarchy.getId(); + AssertionAUTControlsHierarchyState state = assertionAUTControlsHierarchy.getState(); + + if (AssertionAUTControlsHierarchyState.CLEAR == state) { + widgetsMap.clear(); + lastIndex = 0; + return Status.OK_STATUS; + } + + this.display = PlatformUI.getWorkbench().getDisplay(); + + if (display.isDisposed()) { + // TODO: return new Status(IStatus.ERROR, Activator.getUniqueIdentifier(), Activator.INTERNAL_ERROR, + // "Display disposed", null); + return Status.OK_STATUS; + } + + final Exception[] ex = new Exception[1]; + + UIHierarchyResponse response = ProtocolFactory.eINSTANCE.createUIHierarchyResponse(); + + if (AssertionAUTControlsHierarchyState.GET_ROOT == state) { + + display.syncExec(new Runnable() { + @Override + public void run() { + SWTUIElement[] swtUIElements = SWTUIPlayer.getPlayer(display).children.collectFor(null, null, + false, null); + + System.out.println("AssertionAUTControlsHierarchyState.GET_ROOT"); + for (SWTUIElement swtUIElement : swtUIElements) { + System.out.println("-------------"); + System.out.println(swtUIElement.getText()); + System.out.println(swtUIElement.getGenerationKind()); + + UIElement uiElement = ProtocolFactory.eINSTANCE.createUIElement(); + + uiElement.setId(String.valueOf(lastIndex)); + uiElement.setKind(swtUIElement.getGenerationKind()); + uiElement.setName(swtUIElement.getText()); + uiElement.setDescription(swtUIElement.widget.getClass().getName()); + + SWTUIElement[] childrenSWTUIElements = SWTUIPlayer.getPlayer(display).children.collectFor( + swtUIElement, null, false, null); + boolean hasChildren = (0 != childrenSWTUIElements.length); + uiElement.setHasChildren(hasChildren); + + addWidgetToMap(swtUIElement.unwrap()); + + response.getUiElements().add(uiElement); + } + + try { + write(response); + } catch (CoreException e) { + e.printStackTrace(); + ex[0] = e; + } + } + }); + + if (null != ex[0]) { + ex[0].printStackTrace(); + } + } + + if (AssertionAUTControlsHierarchyState.GET_NODE == state) { + if (!widgetsMap.containsKey(id)) { + return Status.OK_STATUS; + } + + display.syncExec(new Runnable() { + @Override + public void run() { + + Object widgetObject = widgetsMap.get(id); + + SWTUIElement[] swtUIElements = SWTUIPlayer.getPlayer(display).children.collectFor( + SWTUIPlayer.getPlayer(display).wrap(widgetObject), null, false, + null); + + System.out.println("AssertionAUTControlsHierarchyState.GET_NODE"); + for (SWTUIElement swtUIElement : swtUIElements) { + System.out.println("-------------"); + System.out.println(swtUIElement.getText()); + System.out.println(swtUIElement.getGenerationKind()); + + UIElement uiElement = ProtocolFactory.eINSTANCE.createUIElement(); + + uiElement.setId(String.valueOf(lastIndex)); + uiElement.setKind(swtUIElement.getGenerationKind()); + uiElement.setName(swtUIElement.getText()); + uiElement.setDescription(swtUIElement.widget.getClass().getName()); + + SWTUIElement[] childrenSWTUIElements = SWTUIPlayer.getPlayer(display).children.collectFor( + swtUIElement, null, false, null); + boolean hasChildren = (0 != childrenSWTUIElements.length); + uiElement.setHasChildren(hasChildren); + + addWidgetToMap(swtUIElement.unwrap()); + + response.getUiElements().add(uiElement); + } + + try { + write(response); + } catch (CoreException e) { + e.printStackTrace(); + ex[0] = e; + } + } + }); + + if (null != ex[0]) { + ex[0].printStackTrace(); + } + } + + return Status.OK_STATUS; + } + + private void write(Object object) throws CoreException { + this.context.getOutput().write(object); + } + + private void addWidgetToMap(Object object) { + widgetsMap.put(String.valueOf(lastIndex), object); + lastIndex++; + } +} From d76ed9f2b64e4bfe502c8fb9dc6ed9e46c3b0a1d Mon Sep 17 00:00:00 2001 From: Evgeny Lipkin Date: Fri, 19 Aug 2016 17:13:22 +0700 Subject: [PATCH 03/18] commit fix --- .../protocol/util/ProtocolAdapterFactory.java | 55 +++++++++++++++++ .../core/protocol/util/ProtocolSwitch.java | 60 +++++++++++++++++++ 2 files changed, 115 insertions(+) mode change 100644 => 100755 core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/util/ProtocolAdapterFactory.java mode change 100644 => 100755 core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/util/ProtocolSwitch.java diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/util/ProtocolAdapterFactory.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/util/ProtocolAdapterFactory.java old mode 100644 new mode 100755 index 513730960..a13efcd0d --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/util/ProtocolAdapterFactory.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/util/ProtocolAdapterFactory.java @@ -13,6 +13,7 @@ import org.eclipse.rcptt.tesla.core.protocol.*; import org.eclipse.rcptt.tesla.core.protocol.raw.Command; +import org.eclipse.rcptt.tesla.core.protocol.raw.Element; import org.eclipse.rcptt.tesla.core.protocol.raw.Response; import org.eclipse.emf.common.notify.Adapter; @@ -511,6 +512,14 @@ public Adapter caseRapUploadFile(RapUploadFile object) { return createRapUploadFileAdapter(); } @Override + public Adapter caseUIHierarchyResponse(UIHierarchyResponse object) { + return createUIHierarchyResponseAdapter(); + } + @Override + public Adapter caseUIElement(UIElement object) { + return createUIElementAdapter(); + } + @Override public Adapter caseCommand(Command object) { return createCommandAdapter(); } @@ -519,6 +528,10 @@ public Adapter caseResponse(Response object) { return createResponseAdapter(); } @Override + public Adapter caseElement(Element object) { + return createElementAdapter(); + } + @Override public Adapter defaultCase(EObject object) { return createEObjectAdapter(); } @@ -2050,6 +2063,34 @@ public Adapter createRapUploadFileAdapter() { return null; } + /** + * Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse UI Hierarchy Response}'. + * + * 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. + * + * @return the new adapter. + * @see org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse + * @generated + */ + public Adapter createUIHierarchyResponseAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.UIElement UI Element}'. + * + * 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. + * + * @return the new adapter. + * @see org.eclipse.rcptt.tesla.core.protocol.UIElement + * @generated + */ + public Adapter createUIElementAdapter() { + return null; + } + /** * Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.raw.Command Command}'. * @@ -2078,6 +2119,20 @@ public Adapter createResponseAdapter() { return null; } + /** + * Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.raw.Element Element}'. + * + * 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. + * + * @return the new adapter. + * @see org.eclipse.rcptt.tesla.core.protocol.raw.Element + * @generated + */ + public Adapter createElementAdapter() { + return null; + } + /** * Creates a new adapter for the default case. * diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/util/ProtocolSwitch.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/util/ProtocolSwitch.java old mode 100644 new mode 100755 index 22901211a..0366361cc --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/util/ProtocolSwitch.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/util/ProtocolSwitch.java @@ -13,6 +13,7 @@ import org.eclipse.rcptt.tesla.core.protocol.*; import org.eclipse.rcptt.tesla.core.protocol.raw.Command; +import org.eclipse.rcptt.tesla.core.protocol.raw.Element; import org.eclipse.rcptt.tesla.core.protocol.raw.Response; import java.util.List; @@ -919,6 +920,20 @@ protected T doSwitch(int classifierID, EObject theEObject) { if (result == null) result = defaultCase(theEObject); return result; } + case ProtocolPackage.UI_HIERARCHY_RESPONSE: { + UIHierarchyResponse uiHierarchyResponse = (UIHierarchyResponse)theEObject; + T result = caseUIHierarchyResponse(uiHierarchyResponse); + if (result == null) result = caseResponse(uiHierarchyResponse); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ProtocolPackage.UI_ELEMENT: { + UIElement uiElement = (UIElement)theEObject; + T result = caseUIElement(uiElement); + if (result == null) result = caseElement(uiElement); + if (result == null) result = defaultCase(theEObject); + return result; + } default: return defaultCase(theEObject); } } @@ -2543,6 +2558,36 @@ public T caseRapUploadFile(RapUploadFile object) { return null; } + /** + * Returns the result of interpreting the object as an instance of 'UI Hierarchy Response'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'UI Hierarchy Response'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseUIHierarchyResponse(UIHierarchyResponse object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'UI Element'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'UI Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseUIElement(UIElement object) { + return null; + } + /** * Returns the result of interpreting the object as an instance of 'Command'. * @@ -2573,6 +2618,21 @@ public T caseResponse(Response object) { return null; } + /** + * Returns the result of interpreting the object as an instance of 'Element'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseElement(Element object) { + return null; + } + /** * Returns the result of interpreting the object as an instance of 'EObject'. * From 91fd2b891a0ba813f40e9699980484923d9d9793 Mon Sep 17 00:00:00 2001 From: Evgeny Lipkin Date: Fri, 19 Aug 2016 17:23:18 +0700 Subject: [PATCH 04/18] fix for java6 --- .../runtime/ui/AssertionAUTControlsHierarchyService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AssertionAUTControlsHierarchyService.java b/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AssertionAUTControlsHierarchyService.java index 3bfbb4502..5c24276f5 100644 --- a/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AssertionAUTControlsHierarchyService.java +++ b/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AssertionAUTControlsHierarchyService.java @@ -45,7 +45,7 @@ public IStatus service(Command command, IProcess context) this.context = context; AssertionAUTControlsHierarchy assertionAUTControlsHierarchy = (AssertionAUTControlsHierarchy) command; - String id = assertionAUTControlsHierarchy.getId(); + final String id = assertionAUTControlsHierarchy.getId(); AssertionAUTControlsHierarchyState state = assertionAUTControlsHierarchy.getState(); if (AssertionAUTControlsHierarchyState.CLEAR == state) { @@ -64,7 +64,7 @@ public IStatus service(Command command, IProcess context) final Exception[] ex = new Exception[1]; - UIHierarchyResponse response = ProtocolFactory.eINSTANCE.createUIHierarchyResponse(); + final UIHierarchyResponse response = ProtocolFactory.eINSTANCE.createUIHierarchyResponse(); if (AssertionAUTControlsHierarchyState.GET_ROOT == state) { From 0c8139e48b9934841d714f6512f6226362dda70d Mon Sep 17 00:00:00 2001 From: Evgeny Lipkin Date: Mon, 22 Aug 2016 15:30:17 +0700 Subject: [PATCH 05/18] Added highlighting widget by event of selection item in the AssertionAUTControlsHierarchyDialog --- .../AssertionAUTControlsHierarchyState.java | 37 ++++++++++++++++--- .../core/model/impl/Q7CorePackageImpl.java | 1 + .../model/model.ecore | 5 ++- .../AssertionAUTControlsHierarchyDialog.java | 16 +++++++- .../AssertionAUTControlsHierarchyService.java | 16 ++++++-- .../recording/core/swt/SWTAssertManager.java | 33 +++++++++++++++++ 6 files changed, 96 insertions(+), 12 deletions(-) diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AssertionAUTControlsHierarchyState.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AssertionAUTControlsHierarchyState.java index a75457a71..3a17f9f55 100644 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AssertionAUTControlsHierarchyState.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AssertionAUTControlsHierarchyState.java @@ -26,7 +26,7 @@ public enum AssertionAUTControlsHierarchyState implements Enumerator { * @generated * @ordered */ - GET_ROOT(0, "GetRoot", "GetRoot"), + GET_ROOT(1, "GetRoot", "GetRoot"), /** * The 'Get Node' literal object. @@ -36,7 +36,7 @@ public enum AssertionAUTControlsHierarchyState implements Enumerator { * @generated * @ordered */ - GET_NODE(0, "GetNode", "GetNode"), + GET_NODE(2, "GetNode", "GetNode"), /** * The 'Clear' literal object. @@ -46,7 +46,15 @@ public enum AssertionAUTControlsHierarchyState implements Enumerator { * @generated * @ordered */ - CLEAR(0, "Clear", "Clear"); + CLEAR(0, "Clear", "Clear"), /** + * The 'HIGHLIGHT' literal object. + * + * + * @see #HIGHLIGHT_VALUE + * @generated + * @ordered + */ + HIGHLIGHT(3, "HIGHLIGHT", "HIGHLIGHT"); /** * The 'Get Root' literal value. @@ -61,7 +69,7 @@ public enum AssertionAUTControlsHierarchyState implements Enumerator { * @generated * @ordered */ - public static final int GET_ROOT_VALUE = 0; + public static final int GET_ROOT_VALUE = 1; /** * The 'Get Node' literal value. @@ -76,7 +84,7 @@ public enum AssertionAUTControlsHierarchyState implements Enumerator { * @generated * @ordered */ - public static final int GET_NODE_VALUE = 0; + public static final int GET_NODE_VALUE = 2; /** * The 'Clear' literal value. @@ -93,6 +101,21 @@ public enum AssertionAUTControlsHierarchyState implements Enumerator { */ public static final int CLEAR_VALUE = 0; + /** + * The 'HIGHLIGHT' literal value. + * + *

+ * If the meaning of 'HIGHLIGHT' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #HIGHLIGHT + * @model + * @generated + * @ordered + */ + public static final int HIGHLIGHT_VALUE = 3; + /** * An array of all the 'Assertion AUT Controls Hierarchy State' enumerators. * @@ -104,6 +127,7 @@ public enum AssertionAUTControlsHierarchyState implements Enumerator { GET_ROOT, GET_NODE, CLEAR, + HIGHLIGHT, }; /** @@ -161,6 +185,9 @@ public static AssertionAUTControlsHierarchyState getByName(String name) { public static AssertionAUTControlsHierarchyState get(int value) { switch (value) { case GET_ROOT_VALUE: return GET_ROOT; + case GET_NODE_VALUE: return GET_NODE; + case CLEAR_VALUE: return CLEAR; + case HIGHLIGHT_VALUE: return HIGHLIGHT; } return null; } diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java index fbda81593..c36f7d925 100644 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java @@ -1172,6 +1172,7 @@ public void initializePackageContents() { addEEnumLiteral(assertionAUTControlsHierarchyStateEEnum, AssertionAUTControlsHierarchyState.GET_ROOT); addEEnumLiteral(assertionAUTControlsHierarchyStateEEnum, AssertionAUTControlsHierarchyState.GET_NODE); addEEnumLiteral(assertionAUTControlsHierarchyStateEEnum, AssertionAUTControlsHierarchyState.CLEAR); + addEEnumLiteral(assertionAUTControlsHierarchyStateEEnum, AssertionAUTControlsHierarchyState.HIGHLIGHT); // Create resource createResource(eNS_URI); diff --git a/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore b/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore index 0e7fc9e81..73f7d17c4 100755 --- a/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore +++ b/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore @@ -136,8 +136,9 @@ - - + + + diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionAUTControlsHierarchyDialog.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionAUTControlsHierarchyDialog.java index cace0b6e3..3481766b9 100644 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionAUTControlsHierarchyDialog.java +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionAUTControlsHierarchyDialog.java @@ -304,10 +304,24 @@ public void selectionChanged(SelectionChangedEvent event) { IStructuredSelection selection = (IStructuredSelection) event.getSelection(); for (Iterator iterator = selection.iterator(); iterator.hasNext();) { UIElement uiElement = (UIElement) iterator.next(); - // TODO: open AssertionPanelWindow + System.out.println("SELECTED:"); System.out.println(uiElement.getId()); System.out.println(uiElement.getKind()); + + AssertionAUTControlsHierarchy assertionAUTControlsHierarchy = Q7CoreFactory.eINSTANCE + .createAssertionAUTControlsHierarchy(); + + assertionAUTControlsHierarchy.setState(AssertionAUTControlsHierarchyState.HIGHLIGHT); + assertionAUTControlsHierarchy.setId(uiElement.getId()); + + try { + getAut().execute(assertionAUTControlsHierarchy); + } catch (Exception e) { + Q7UIPlugin.log(e); + } + + // TODO: open AssertionPanelWindow by doubleclick } } } diff --git a/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AssertionAUTControlsHierarchyService.java b/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AssertionAUTControlsHierarchyService.java index 5c24276f5..1da961403 100644 --- a/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AssertionAUTControlsHierarchyService.java +++ b/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AssertionAUTControlsHierarchyService.java @@ -26,12 +26,14 @@ import org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse; import org.eclipse.rcptt.tesla.internal.ui.player.SWTUIElement; import org.eclipse.rcptt.tesla.internal.ui.player.SWTUIPlayer; +import org.eclipse.rcptt.tesla.recording.core.swt.SWTAssertManager; import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Widget; import org.eclipse.ui.PlatformUI; public class AssertionAUTControlsHierarchyService implements ICommandService { - private Map widgetsMap = new HashMap(); + private Map widgetsMap = new HashMap(); private int lastIndex = 0; @@ -45,7 +47,6 @@ public IStatus service(Command command, IProcess context) this.context = context; AssertionAUTControlsHierarchy assertionAUTControlsHierarchy = (AssertionAUTControlsHierarchy) command; - final String id = assertionAUTControlsHierarchy.getId(); AssertionAUTControlsHierarchyState state = assertionAUTControlsHierarchy.getState(); if (AssertionAUTControlsHierarchyState.CLEAR == state) { @@ -54,6 +55,11 @@ public IStatus service(Command command, IProcess context) return Status.OK_STATUS; } + if (AssertionAUTControlsHierarchyState.HIGHLIGHT == state) { + SWTAssertManager.getDefault().highLightWidget(widgetsMap.get(assertionAUTControlsHierarchy.getId())); + return Status.OK_STATUS; + } + this.display = PlatformUI.getWorkbench().getDisplay(); if (display.isDisposed()) { @@ -111,6 +117,8 @@ public void run() { } } + final String id = assertionAUTControlsHierarchy.getId(); + if (AssertionAUTControlsHierarchyState.GET_NODE == state) { if (!widgetsMap.containsKey(id)) { return Status.OK_STATUS; @@ -170,8 +178,8 @@ private void write(Object object) throws CoreException { this.context.getOutput().write(object); } - private void addWidgetToMap(Object object) { - widgetsMap.put(String.valueOf(lastIndex), object); + private void addWidgetToMap(Widget widget) { + widgetsMap.put(String.valueOf(lastIndex), widget); lastIndex++; } } diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/SWTAssertManager.java b/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/SWTAssertManager.java index c10e03974..a1d6f251b 100644 --- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/SWTAssertManager.java +++ b/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/SWTAssertManager.java @@ -47,6 +47,7 @@ import org.eclipse.rcptt.tesla.recording.core.TeslaRecorder; import org.eclipse.rcptt.tesla.recording.core.swt.util.RecordedEvent; import org.eclipse.rcptt.tesla.swt.events.TeslaEventManager; +import org.eclipse.rcptt.tesla.ui.describers.WidgetDescriber; import org.eclipse.rcptt.util.ShellUtilsProvider; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Color; @@ -102,6 +103,15 @@ public class SWTAssertManager implements IRecordingProcessor, private Control beforeFreezeFocus = null; + private static SWTAssertManager swtAssertManager; + + public static SWTAssertManager getDefault() { + if (null == swtAssertManager) { + swtAssertManager = new SWTAssertManager(); + } + return swtAssertManager; + } + public void clear() { lastFocusedWidget = null; freezedCtrl = null; @@ -484,6 +494,24 @@ public void run() { } } + // TODO: + public synchronized void highLightWidget(final Widget widget) { + try { + // SWTEventManager.setShouldProceed(true); // ? + if (widget != null) { + resetAssertSelection(); + widget.getDisplay().asyncExec(new Runnable() { // async? + public void run() { + synchronized (widget) { + updateHover(widget); + } + } + }); + } + } finally { + // SWTEventManager.setShouldProceed(false); + } + } public boolean isShortcutRequest(Event e, String[] shortcuts) { if (shortcuts == null) { @@ -806,6 +834,11 @@ public void run() { } } + private synchronized void updateHover(Widget widget) { + WidgetDescriber descr = new WidgetDescriber(widget); + updateHover(descr.getBounds(), descr.getPoint(), true, true); + } + private void updateHoverAccordingTo(IRecordingDescriber descr, int x, int y) { if (selectionShell == null) { From afd0910bf5d18d43c87d9de188d7c49631f15e5a Mon Sep 17 00:00:00 2001 From: Evgeny Lipkin Date: Wed, 24 Aug 2016 18:23:04 +0700 Subject: [PATCH 06/18] composed AssertionPanelWindow and AssertionAUTControlsHierarchyDialog --- .../AssertionAUTControlsHierarchyDialog.java | 7 ++- .../assertion/AssertionPanelWindow.java | 26 +++++++---- .../ui/panels/main/ControlPanelWindow.java | 39 +--------------- .../AssertionAUTControlsHierarchyService.java | 45 ++++++++++++++++++- .../recording/aspects/SWTEventManager.java | 16 +++++++ .../recording/core/swt/SWTAssertManager.java | 6 +-- 6 files changed, 85 insertions(+), 54 deletions(-) diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionAUTControlsHierarchyDialog.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionAUTControlsHierarchyDialog.java index 3481766b9..37054300b 100644 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionAUTControlsHierarchyDialog.java +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionAUTControlsHierarchyDialog.java @@ -305,16 +305,13 @@ public void selectionChanged(SelectionChangedEvent event) { for (Iterator iterator = selection.iterator(); iterator.hasNext();) { UIElement uiElement = (UIElement) iterator.next(); - System.out.println("SELECTED:"); - System.out.println(uiElement.getId()); - System.out.println(uiElement.getKind()); - AssertionAUTControlsHierarchy assertionAUTControlsHierarchy = Q7CoreFactory.eINSTANCE .createAssertionAUTControlsHierarchy(); assertionAUTControlsHierarchy.setState(AssertionAUTControlsHierarchyState.HIGHLIGHT); assertionAUTControlsHierarchy.setId(uiElement.getId()); + try { getAut().execute(assertionAUTControlsHierarchy); } catch (Exception e) { @@ -322,6 +319,8 @@ public void selectionChanged(SelectionChangedEvent event) { } // TODO: open AssertionPanelWindow by doubleclick + + // TODO: add commands recordingSupport } } } diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java index b2c6303ad..7523303a0 100644 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java @@ -461,11 +461,24 @@ protected void processCheck(Object element, boolean checked) { @Override protected Control createContents(Composite parent) { initializeDialogUnits(parent); + final Composite composite = new Composite(parent, SWT.NONE); + GridLayoutFactory.fillDefaults().numColumns(2).applyTo(composite); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); - composite.setLayout(new GridLayout()); + + final Composite autControlsWidgetComposite = new Composite(composite, SWT.NONE); + GridLayoutFactory.fillDefaults().numColumns(2).applyTo(autControlsWidgetComposite); + autControlsWidgetComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + final AssertionAUTControlsHierarchyDialog autControlsWidget = new AssertionAUTControlsHierarchyDialog( + autControlsWidgetComposite, recordingSupport.getAUT()); + autControlsWidget.createContents(); - final Composite toolbarComposite = new Composite(composite, SWT.NONE); + final Composite assertionComposite = new Composite(composite, SWT.NONE); + assertionComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + assertionComposite.setLayout(new GridLayout()); + + final Composite toolbarComposite = new Composite(assertionComposite, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(2).applyTo(toolbarComposite); toolbarComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); @@ -505,9 +518,10 @@ public void run() { }; menu.create(toolbarComposite).setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false)); - createTreeViewer(composite).setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + createTreeViewer(assertionComposite).setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + createButtonPanel(assertionComposite).setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - createButtonPanel(composite).setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); return composite; } @@ -988,9 +1002,6 @@ public void setInput(CommandSet commands) { setBlockOnOpen(false); open(); } else { - Point size = getShell().getSize(); - Point loc = getInitialLocation(size); - getShell().setLocation(loc); getShell().setVisible(true); } currentInput = createAssertTree(commands); @@ -1000,7 +1011,6 @@ public void setInput(CommandSet commands) { } else { viewer.expandToLevel(1); } - // updateVerificationButton(); } else if (getShell() != null && !getShell().isDisposed()) { getShell().setVisible(false); viewer.setInput(AssertInput.EMPTY); diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/main/ControlPanelWindow.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/main/ControlPanelWindow.java index 4471f8d7f..817a355f4 100755 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/main/ControlPanelWindow.java +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/main/ControlPanelWindow.java @@ -72,7 +72,6 @@ import org.eclipse.rcptt.ui.editors.ecl.EclSourceViewer; import org.eclipse.rcptt.ui.panels.ActionMenuCreator; import org.eclipse.rcptt.ui.panels.Actions; -import org.eclipse.rcptt.ui.panels.assertion.AssertionAUTControlsHierarchyDialog; import org.eclipse.rcptt.ui.panels.assertion.AssertionPanelWindow; import org.eclipse.rcptt.ui.recording.RecordingContextManager; import org.eclipse.rcptt.ui.recording.RecordingSupport; @@ -122,7 +121,6 @@ public class ControlPanelWindow extends Dialog { private final Listener keyListener = new RecordingShortcutListener(); private AssertionPanelWindow assertionWindow; - private AssertionAUTControlsHierarchyDialog assertionAUTHierarchyDialog; private EmbeddedTabFolder tabFolder; private CoolBar coolBar; private StatusBarComposite statusBar; @@ -489,7 +487,6 @@ protected Object calculate() { if (Q7UIPlugin.isImageRecognitionAllowed()) { manager.add(createImageRecognitionModeAction()); } - manager.add(createAssertingModeFeatureAction()); coolBarManager.add(manager); } coolBar = coolBarManager.createControl(toolbarComposite); @@ -663,41 +660,6 @@ protected Boolean calculate() { return action; } - private IAction createAssertingModeFeatureAction() { - IAction action = new Action() { - @Override - public void run() { - if (assertionAUTHierarchyDialog == null - || assertionAUTHierarchyDialog.getShell() == null - || assertionAUTHierarchyDialog.getShell().isDisposed()) { - assertionAUTHierarchyDialog = new AssertionAUTControlsHierarchyDialog(recordingSupport.getAUT(), - getShell()); - } - assertionAUTHierarchyDialog.open(); - } - }; - dbc.bindValue(Actions.observeImageDescriptor(action), new ComputedValue() { - @Override - protected Object calculate() { - return Images.getImageDescriptor(Images.ECLIPSE); - } - }); - dbc.bindValue(Actions.observeToolTipText(action), new ComputedValue() { - @Override - protected Object calculate() { - return Messages.ControlPanelWindow_OpenAssertionAUTControlsHierarchyDialogActionToolTip; - } - }); - dbc.bindValue(Actions.observeEnabled(action), new ComputedValue( - Boolean.TYPE) { - @Override - protected Boolean calculate() { - return recordingSupport.getMode() == RecordingMode.Asserting; - } - }); - return action; - } - private IAction createImageRecognitionModeAction() { IAction action = new Action("", IAction.AS_RADIO_BUTTON) { //$NON-NLS-1$ @Override @@ -1068,6 +1030,7 @@ private String getStopRecordShortcutMessage() { return ""; } + // TODO: remove private void updateAssetionWindow() { switch (recordingSupport.getMode()) { case Asserting: diff --git a/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AssertionAUTControlsHierarchyService.java b/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AssertionAUTControlsHierarchyService.java index 1da961403..d09d5e8f2 100644 --- a/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AssertionAUTControlsHierarchyService.java +++ b/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AssertionAUTControlsHierarchyService.java @@ -27,7 +27,9 @@ import org.eclipse.rcptt.tesla.internal.ui.player.SWTUIElement; import org.eclipse.rcptt.tesla.internal.ui.player.SWTUIPlayer; import org.eclipse.rcptt.tesla.recording.core.swt.SWTAssertManager; +import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Widget; import org.eclipse.ui.PlatformUI; @@ -56,7 +58,48 @@ public IStatus service(Command command, IProcess context) } if (AssertionAUTControlsHierarchyState.HIGHLIGHT == state) { - SWTAssertManager.getDefault().highLightWidget(widgetsMap.get(assertionAUTControlsHierarchy.getId())); + + final String id = assertionAUTControlsHierarchy.getId(); + if (!widgetsMap.containsKey(id)) { + return Status.OK_STATUS; + } + + // SWTAssertManager.getDefault().highLightWidget(widgetsMap.get(id)); + // widgetsMap.get(assertionAUTControlsHierarchy.getId()).getDisplay().post(event) + this.display = PlatformUI.getWorkbench().getDisplay(); + // SWTAssertManager.getDefault().callCreateHover(true, + // SWTAssertManager.getDefault().getShell(widgetsMap.get(id))); + final Event event = new Event(); + event.button = 1; + event.x = 500; + event.y = 500; + this.display = PlatformUI.getWorkbench().getDisplay(); + display.syncExec(new Runnable() { + @Override + public void run() { + SWTAssertManager.getDefault().handleEventInFreeze(widgetsMap.get(id), SWT.MouseUp, event); + } + }); + /* + * this.display.syncExec(new Runnable() { + * + * @Override + * public void run() { + * widgetsMap.get(id).notifyListeners(SWT.Selection, new Event()); + * } + * }); + */ + return Status.OK_STATUS; + } + + if (AssertionAUTControlsHierarchyState.HIGHLIGHT == state) { + + final String id = assertionAUTControlsHierarchy.getId(); + if (!widgetsMap.containsKey(id)) { + return Status.OK_STATUS; + } + + SWTAssertManager.getDefault().highLightWidget(widgetsMap.get(id)); return Status.OK_STATUS; } diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.swt/src/org/eclipse/rcptt/tesla/recording/aspects/SWTEventManager.java b/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.swt/src/org/eclipse/rcptt/tesla/recording/aspects/SWTEventManager.java index 26ca4a346..a814101c4 100644 --- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.swt/src/org/eclipse/rcptt/tesla/recording/aspects/SWTEventManager.java +++ b/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.swt/src/org/eclipse/rcptt/tesla/recording/aspects/SWTEventManager.java @@ -178,6 +178,22 @@ public static boolean handleEventInFreeze(Widget widget, int type, return finalResult; } + public static boolean selectWidget(Widget widget) { + boolean finalResult = false; + for (IAssertSWTEventListener listener : getListeners(IAssertSWTEventListener.class)) { + finalResult = finalResult || listener.selectWidget(widget); + } + return finalResult; + } + + public static boolean openAssertionPanelWindow(Widget widget) { + boolean finalResult = false; + for (IAssertSWTEventListener listener : getListeners(IAssertSWTEventListener.class)) { + finalResult = finalResult || listener.openAssertionPanelWindow(widget); + } + return finalResult; + } + public static void recordCombo(CCombo combo) { comboList.add(new WeakReference(combo)); // Remove disposed ones diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/SWTAssertManager.java b/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/SWTAssertManager.java index a1d6f251b..5c96561a3 100644 --- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/SWTAssertManager.java +++ b/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/SWTAssertManager.java @@ -105,7 +105,7 @@ public class SWTAssertManager implements IRecordingProcessor, private static SWTAssertManager swtAssertManager; - public static SWTAssertManager getDefault() { + public static SWTAssertManager getDefault() { // thread safely ? if (null == swtAssertManager) { swtAssertManager = new SWTAssertManager(); } @@ -663,7 +663,7 @@ private void showMenuAt(Event event, Control c, Menu menu) { menuShell.open(); } - private Shell getShell(Widget widget) { + public Shell getShell(Widget widget) { if (widget instanceof TreeItem) { return (((TreeItem) widget).getParent()).getShell(); } @@ -769,7 +769,7 @@ private synchronized void updateHover(Rectangle bounds, Point point, selectionShell.setAlpha(127); } - private synchronized void callCreateHover(final boolean value, Shell parent) { + public synchronized void callCreateHover(final boolean value, Shell parent) { if (!menuShells.isEmpty()) { return; } From 33f28b4c79250d363927f2922feb74ae0eb09caf Mon Sep 17 00:00:00 2001 From: Evgeny Lipkin Date: Mon, 5 Sep 2016 13:55:28 +0700 Subject: [PATCH 07/18] updated AssertionTree --- .../META-INF/MANIFEST.MF | 1 + .../ecl/core/model/AUTControlsHierarchy.java | 137 +++++++ ...te.java => AUTControlsHierarchyState.java} | 116 +++--- .../model/AssertionAUTControlsHierarchy.java | 81 ----- .../core/ecl/core/model/Q7CoreFactory.java | 6 +- .../core/ecl/core/model/Q7CorePackage.java | 136 ++++--- .../model/impl/AUTControlsHierarchyImpl.java | 327 +++++++++++++++++ .../AssertionAUTControlsHierarchyImpl.java | 219 ------------ .../core/model/impl/Q7CoreFactoryImpl.java | 22 +- .../core/model/impl/Q7CorePackageImpl.java | 78 ++-- .../core/model/util/Q7CoreAdapterFactory.java | 10 +- .../ecl/core/model/util/Q7CoreSwitch.java | 14 +- .../model/model.ecore | 18 +- .../tesla/core/protocol/ProtocolPackage.java | 76 +++- .../rcptt/tesla/core/protocol/UIElement.java | 27 ++ .../core/protocol/UIHierarchyResponse.java | 39 +- .../protocol/impl/ProtocolPackageImpl.java | 28 +- .../core/protocol/impl/UIElementImpl.java | 54 +++ .../impl/UIHierarchyResponseImpl.java | 97 ++++- .../models/protocol.ecore | 4 +- rcp/org.eclipse.rcptt.ui/icons/panel/tree.gif | Bin 0 -> 1031 bytes rcp/org.eclipse.rcptt.ui/plugin.xml | 10 + .../org/eclipse/rcptt/internal/ui/Images.java | 1 + .../eclipse/rcptt/internal/ui/Messages.java | 1 + .../rcptt/internal/ui/messages.properties | 5 +- .../assertion/AUTControlsHierarchyView.java | 265 ++++++++++++++ .../AssertionAUTControlsHierarchyDialog.java | 336 ------------------ .../assertion/AssertionPanelWindow.java | 77 ++-- .../UIHierarchyResponseUtilities.java | 102 ++++++ .../tree/AssertionTreeContentProvider.java | 64 ++++ .../tree/AssertionTreeDefferedAdapter.java | 20 ++ .../tree/AssertionTreeDefferedModel.java | 61 ++++ .../tree/AssertionTreeLabelProvider.java | 13 + .../assertion/tree/AssertionTreeModel.java | 72 ++++ .../assertion/tree/AssertionTreeViewer.java | 16 + .../META-INF/MANIFEST.MF | 4 +- .../org.eclipse.rcptt.runtime.ui/plugin.xml | 4 +- .../ui/AUTControlsHierarchyService.java | 178 ++++++++++ .../ui/AUTControlsHierarchyUtilities.java | 152 ++++++++ .../AssertionAUTControlsHierarchyService.java | 228 ------------ .../aspects/IAssertSWTEventListener.java | 10 + .../recording/aspects/SWTEventManager.java | 30 +- .../META-INF/MANIFEST.MF | 1 + .../recording/core/swt/SWTAssertManager.java | 114 +++--- 44 files changed, 2088 insertions(+), 1166 deletions(-) create mode 100644 core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchy.java rename core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/{AssertionAUTControlsHierarchyState.java => AUTControlsHierarchyState.java} (54%) delete mode 100644 core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AssertionAUTControlsHierarchy.java create mode 100644 core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AUTControlsHierarchyImpl.java delete mode 100644 core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AssertionAUTControlsHierarchyImpl.java create mode 100644 rcp/org.eclipse.rcptt.ui/icons/panel/tree.gif create mode 100644 rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AUTControlsHierarchyView.java delete mode 100644 rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionAUTControlsHierarchyDialog.java create mode 100644 rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/UIHierarchyResponseUtilities.java create mode 100644 rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeContentProvider.java create mode 100644 rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeDefferedAdapter.java create mode 100644 rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeDefferedModel.java create mode 100644 rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeLabelProvider.java create mode 100644 rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeModel.java create mode 100644 rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeViewer.java create mode 100644 runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AUTControlsHierarchyService.java create mode 100644 runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AUTControlsHierarchyUtilities.java delete mode 100644 runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AssertionAUTControlsHierarchyService.java diff --git a/core/org.eclipse.rcptt.core.ecl.core/META-INF/MANIFEST.MF b/core/org.eclipse.rcptt.core.ecl.core/META-INF/MANIFEST.MF index d51533b7e..40e8a3f48 100644 --- a/core/org.eclipse.rcptt.core.ecl.core/META-INF/MANIFEST.MF +++ b/core/org.eclipse.rcptt.core.ecl.core/META-INF/MANIFEST.MF @@ -14,6 +14,7 @@ Export-Package: org.eclipse.rcptt.core.ecl.core.model, Require-Bundle: org.eclipse.core.runtime, org.eclipse.emf.ecore;visibility:=reexport, org.eclipse.rcptt.ecl.core;bundle-version="[2.2.0,3.0.0)";visibility:=reexport, + org.eclipse.rcptt.core.scenario;visibility:=reexport, org.eclipse.rcptt.tesla.core;bundle-version="[2.2.0,3.0.0)";visibility:=reexport, org.eclipse.rcptt.core;bundle-version="[2.2.0,3.0.0)";visibility:=reexport, org.eclipse.rcptt.watson.core;bundle-version="[2.2.0,3.0.0)";visibility:=reexport, diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchy.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchy.java new file mode 100644 index 000000000..ed79fb894 --- /dev/null +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchy.java @@ -0,0 +1,137 @@ +/** + */ +package org.eclipse.rcptt.core.ecl.core.model; + +import org.eclipse.rcptt.ecl.core.Command; + +/** + * + * A representation of the model object 'Assertion AUT Controls Hierarchy'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getId Id}
  • + *
  • {@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getState State}
  • + *
  • {@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getDescription Description}
  • + *
  • {@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getKind Kind}
  • + *
+ * + * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAUTControlsHierarchy() + * @model + * @generated + */ +public interface AUTControlsHierarchy extends Command { + /** + * Returns the value of the 'Id' attribute. + * The default value is "". + * + *

+ * If the meaning of the 'Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Id' attribute. + * @see #setId(String) + * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAUTControlsHierarchy_Id() + * @model default="" + * @generated + */ + String getId(); + + /** + * Sets the value of the '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getId Id}' attribute. + * + * + * @param value the new value of the 'Id' attribute. + * @see #getId() + * @generated + */ + void setId(String value); + + /** + * Returns the value of the 'State' attribute. + * The literals are from the enumeration {@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState}. + * + *

+ * If the meaning of the 'State' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'State' attribute. + * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState + * @see #setState(AUTControlsHierarchyState) + * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAUTControlsHierarchy_State() + * @model + * @generated + */ + AUTControlsHierarchyState getState(); + + /** + * Sets the value of the '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getState State}' attribute. + * + * + * @param value the new value of the 'State' attribute. + * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState + * @see #getState() + * @generated + */ + void setState(AUTControlsHierarchyState value); + + /** + * Returns the value of the 'Description' attribute. + * The default value is "". + * + *

+ * If the meaning of the 'Description' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Description' attribute. + * @see #setDescription(String) + * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAUTControlsHierarchy_Description() + * @model default="" + * @generated + */ + String getDescription(); + + /** + * Sets the value of the '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getDescription Description}' attribute. + * + * + * @param value the new value of the 'Description' attribute. + * @see #getDescription() + * @generated + */ + void setDescription(String value); + + /** + * Returns the value of the 'Kind' attribute. + * The default value is "". + * + *

+ * If the meaning of the 'Kind' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Kind' attribute. + * @see #setKind(String) + * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAUTControlsHierarchy_Kind() + * @model default="" + * @generated + */ + String getKind(); + + /** + * Sets the value of the '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getKind Kind}' attribute. + * + * + * @param value the new value of the 'Kind' attribute. + * @see #getKind() + * @generated + */ + void setKind(String value); + +} // AssertionAUTControlsHierarchy diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AssertionAUTControlsHierarchyState.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchyState.java similarity index 54% rename from core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AssertionAUTControlsHierarchyState.java rename to core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchyState.java index 3a17f9f55..37177b6a2 100644 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AssertionAUTControlsHierarchyState.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchyState.java @@ -10,145 +10,147 @@ /** * - * A representation of the literals of the enumeration 'Assertion AUT Controls Hierarchy State', + * A representation of the literals of the enumeration 'AUT Controls Hierarchy State', * and utility methods for working with them. * - * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAssertionAUTControlsHierarchyState() + * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAUTControlsHierarchyState() * @model * @generated */ -public enum AssertionAUTControlsHierarchyState implements Enumerator { +public enum AUTControlsHierarchyState implements Enumerator { /** - * The 'Get Root' literal object. + * The 'HIGHLIGHT WIDGET' literal object. * * - * @see #GET_ROOT_VALUE + * @see #HIGHLIGHT_WIDGET_VALUE * @generated * @ordered */ - GET_ROOT(1, "GetRoot", "GetRoot"), + HIGHLIGHT_WIDGET(0, "HIGHLIGHT_WIDGET", "HIGHLIGHT_WIDGET"), /** - * The 'Get Node' literal object. + * The 'UPDATE ASSERT WINDOW' literal object. * * - * @see #GET_NODE_VALUE + * @see #UPDATE_ASSERT_WINDOW_VALUE * @generated * @ordered */ - GET_NODE(2, "GetNode", "GetNode"), + UPDATE_ASSERT_WINDOW(1, "UPDATE_ASSERT_WINDOW", "UPDATE_ASSERT_WINDOW"), /** - * The 'Clear' literal object. + * The 'GET ELEMENT' literal object. * * - * @see #CLEAR_VALUE + * @see #GET_ELEMENT_VALUE * @generated * @ordered */ - CLEAR(0, "Clear", "Clear"), /** - * The 'HIGHLIGHT' literal object. + GET_ELEMENT(2, "GET_ELEMENT", "GET_ELEMENT"), + + /** + * The 'GET PARENT' literal object. * * - * @see #HIGHLIGHT_VALUE + * @see #GET_PARENT_VALUE * @generated * @ordered */ - HIGHLIGHT(3, "HIGHLIGHT", "HIGHLIGHT"); + GET_PARENT(3, "GET_PARENT", "GET_PARENT"); /** - * The 'Get Root' literal value. + * The 'HIGHLIGHT WIDGET' literal value. * *

- * If the meaning of 'Get Root' literal object isn't clear, + * If the meaning of 'HIGHLIGHT WIDGET' literal object isn't clear, * there really should be more of a description here... *

* - * @see #GET_ROOT - * @model name="GetRoot" + * @see #HIGHLIGHT_WIDGET + * @model * @generated * @ordered */ - public static final int GET_ROOT_VALUE = 1; + public static final int HIGHLIGHT_WIDGET_VALUE = 0; /** - * The 'Get Node' literal value. + * The 'UPDATE ASSERT WINDOW' literal value. * *

- * If the meaning of 'Get Node' literal object isn't clear, + * If the meaning of 'UPDATE ASSERT WINDOW' literal object isn't clear, * there really should be more of a description here... *

* - * @see #GET_NODE - * @model name="GetNode" + * @see #UPDATE_ASSERT_WINDOW + * @model * @generated * @ordered */ - public static final int GET_NODE_VALUE = 2; + public static final int UPDATE_ASSERT_WINDOW_VALUE = 1; /** - * The 'Clear' literal value. + * The 'GET ELEMENT' literal value. * *

- * If the meaning of 'Clear' literal object isn't clear, + * If the meaning of 'GET ELEMENT' literal object isn't clear, * there really should be more of a description here... *

* - * @see #CLEAR - * @model name="Clear" + * @see #GET_ELEMENT + * @model * @generated * @ordered */ - public static final int CLEAR_VALUE = 0; + public static final int GET_ELEMENT_VALUE = 2; /** - * The 'HIGHLIGHT' literal value. + * The 'GET PARENT' literal value. * *

- * If the meaning of 'HIGHLIGHT' literal object isn't clear, + * If the meaning of 'GET PARENT' literal object isn't clear, * there really should be more of a description here... *

* - * @see #HIGHLIGHT + * @see #GET_PARENT * @model * @generated * @ordered */ - public static final int HIGHLIGHT_VALUE = 3; + public static final int GET_PARENT_VALUE = 3; /** - * An array of all the 'Assertion AUT Controls Hierarchy State' enumerators. + * An array of all the 'AUT Controls Hierarchy State' enumerators. * * * @generated */ - private static final AssertionAUTControlsHierarchyState[] VALUES_ARRAY = - new AssertionAUTControlsHierarchyState[] { - GET_ROOT, - GET_NODE, - CLEAR, - HIGHLIGHT, + private static final AUTControlsHierarchyState[] VALUES_ARRAY = + new AUTControlsHierarchyState[] { + HIGHLIGHT_WIDGET, + UPDATE_ASSERT_WINDOW, + GET_ELEMENT, + GET_PARENT, }; /** - * A public read-only list of all the 'Assertion AUT Controls Hierarchy State' enumerators. + * A public read-only list of all the 'AUT Controls Hierarchy State' enumerators. * * * @generated */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** - * Returns the 'Assertion AUT Controls Hierarchy State' literal with the specified literal value. + * Returns the 'AUT Controls Hierarchy State' literal with the specified literal value. * * * @param literal the literal. * @return the matching enumerator or null. * @generated */ - public static AssertionAUTControlsHierarchyState get(String literal) { + public static AUTControlsHierarchyState get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { - AssertionAUTControlsHierarchyState result = VALUES_ARRAY[i]; + AUTControlsHierarchyState result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } @@ -157,16 +159,16 @@ public static AssertionAUTControlsHierarchyState get(String literal) { } /** - * Returns the 'Assertion AUT Controls Hierarchy State' literal with the specified name. + * Returns the 'AUT Controls Hierarchy State' literal with the specified name. * * * @param name the name. * @return the matching enumerator or null. * @generated */ - public static AssertionAUTControlsHierarchyState getByName(String name) { + public static AUTControlsHierarchyState getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { - AssertionAUTControlsHierarchyState result = VALUES_ARRAY[i]; + AUTControlsHierarchyState result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } @@ -175,19 +177,19 @@ public static AssertionAUTControlsHierarchyState getByName(String name) { } /** - * Returns the 'Assertion AUT Controls Hierarchy State' literal with the specified integer value. + * Returns the 'AUT Controls Hierarchy State' literal with the specified integer value. * * * @param value the integer value. * @return the matching enumerator or null. * @generated */ - public static AssertionAUTControlsHierarchyState get(int value) { + public static AUTControlsHierarchyState get(int value) { switch (value) { - case GET_ROOT_VALUE: return GET_ROOT; - case GET_NODE_VALUE: return GET_NODE; - case CLEAR_VALUE: return CLEAR; - case HIGHLIGHT_VALUE: return HIGHLIGHT; + case HIGHLIGHT_WIDGET_VALUE: return HIGHLIGHT_WIDGET; + case UPDATE_ASSERT_WINDOW_VALUE: return UPDATE_ASSERT_WINDOW; + case GET_ELEMENT_VALUE: return GET_ELEMENT; + case GET_PARENT_VALUE: return GET_PARENT; } return null; } @@ -219,7 +221,7 @@ public static AssertionAUTControlsHierarchyState get(int value) { * * @generated */ - private AssertionAUTControlsHierarchyState(int value, String name, String literal) { + private AUTControlsHierarchyState(int value, String name, String literal) { this.value = value; this.name = name; this.literal = literal; @@ -263,4 +265,4 @@ public String toString() { return literal; } -} //AssertionAUTControlsHierarchyState +} //AUTControlsHierarchyState diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AssertionAUTControlsHierarchy.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AssertionAUTControlsHierarchy.java deleted file mode 100644 index 52eddc314..000000000 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AssertionAUTControlsHierarchy.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - */ -package org.eclipse.rcptt.core.ecl.core.model; - -import org.eclipse.rcptt.ecl.core.Command; - -/** - * - * A representation of the model object 'Assertion AUT Controls Hierarchy'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy#getId Id}
  • - *
  • {@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy#getState State}
  • - *
- * - * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAssertionAUTControlsHierarchy() - * @model - * @generated - */ -public interface AssertionAUTControlsHierarchy extends Command { - /** - * Returns the value of the 'Id' attribute. - * The default value is "". - * - *

- * If the meaning of the 'Id' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Id' attribute. - * @see #setId(String) - * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAssertionAUTControlsHierarchy_Id() - * @model default="" - * @generated - */ - String getId(); - - /** - * Sets the value of the '{@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy#getId Id}' attribute. - * - * - * @param value the new value of the 'Id' attribute. - * @see #getId() - * @generated - */ - void setId(String value); - - /** - * Returns the value of the 'State' attribute. - * The literals are from the enumeration {@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState}. - * - *

- * If the meaning of the 'State' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'State' attribute. - * @see org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState - * @see #setState(AssertionAUTControlsHierarchyState) - * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAssertionAUTControlsHierarchy_State() - * @model - * @generated - */ - AssertionAUTControlsHierarchyState getState(); - - /** - * Sets the value of the '{@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy#getState State}' attribute. - * - * - * @param value the new value of the 'State' attribute. - * @see org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState - * @see #getState() - * @generated - */ - void setState(AssertionAUTControlsHierarchyState value); - -} // AssertionAUTControlsHierarchy diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CoreFactory.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CoreFactory.java index d06530dd2..ce4dc5f29 100755 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CoreFactory.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CoreFactory.java @@ -246,13 +246,13 @@ public interface Q7CoreFactory extends EFactory { TerminateAut createTerminateAut(); /** - * Returns a new object of class 'Assertion AUT Controls Hierarchy'. + * Returns a new object of class 'AUT Controls Hierarchy'. * * - * @return a new object of class 'Assertion AUT Controls Hierarchy'. + * @return a new object of class 'AUT Controls Hierarchy'. * @generated */ - AssertionAUTControlsHierarchy createAssertionAUTControlsHierarchy(); + AUTControlsHierarchy createAUTControlsHierarchy(); /** * Returns the package supported by this factory. diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CorePackage.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CorePackage.java index 031a161ad..6f964e449 100755 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CorePackage.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CorePackage.java @@ -1180,14 +1180,14 @@ public interface Q7CorePackage extends EPackage { int TERMINATE_AUT_FEATURE_COUNT = CorePackage.COMMAND_FEATURE_COUNT + 0; /** - * The meta object id for the '{@link org.eclipse.rcptt.core.ecl.core.model.impl.AssertionAUTControlsHierarchyImpl Assertion AUT Controls Hierarchy}' class. + * The meta object id for the '{@link org.eclipse.rcptt.core.ecl.core.model.impl.AUTControlsHierarchyImpl AUT Controls Hierarchy}' class. * * - * @see org.eclipse.rcptt.core.ecl.core.model.impl.AssertionAUTControlsHierarchyImpl - * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getAssertionAUTControlsHierarchy() + * @see org.eclipse.rcptt.core.ecl.core.model.impl.AUTControlsHierarchyImpl + * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getAUTControlsHierarchy() * @generated */ - int ASSERTION_AUT_CONTROLS_HIERARCHY = 24; + int AUT_CONTROLS_HIERARCHY = 24; /** * The feature id for the 'Host' attribute. @@ -1196,7 +1196,7 @@ public interface Q7CorePackage extends EPackage { * @generated * @ordered */ - int ASSERTION_AUT_CONTROLS_HIERARCHY__HOST = CorePackage.COMMAND__HOST; + int AUT_CONTROLS_HIERARCHY__HOST = CorePackage.COMMAND__HOST; /** * The feature id for the 'Bindings' containment reference list. @@ -1205,7 +1205,7 @@ public interface Q7CorePackage extends EPackage { * @generated * @ordered */ - int ASSERTION_AUT_CONTROLS_HIERARCHY__BINDINGS = CorePackage.COMMAND__BINDINGS; + int AUT_CONTROLS_HIERARCHY__BINDINGS = CorePackage.COMMAND__BINDINGS; /** * The feature id for the 'Id' attribute. @@ -1214,7 +1214,7 @@ public interface Q7CorePackage extends EPackage { * @generated * @ordered */ - int ASSERTION_AUT_CONTROLS_HIERARCHY__ID = CorePackage.COMMAND_FEATURE_COUNT + 0; + int AUT_CONTROLS_HIERARCHY__ID = CorePackage.COMMAND_FEATURE_COUNT + 0; /** * The feature id for the 'State' attribute. @@ -1223,16 +1223,34 @@ public interface Q7CorePackage extends EPackage { * @generated * @ordered */ - int ASSERTION_AUT_CONTROLS_HIERARCHY__STATE = CorePackage.COMMAND_FEATURE_COUNT + 1; + int AUT_CONTROLS_HIERARCHY__STATE = CorePackage.COMMAND_FEATURE_COUNT + 1; /** - * The number of structural features of the 'Assertion AUT Controls Hierarchy' class. + * The feature id for the 'Description' attribute. * * * @generated * @ordered */ - int ASSERTION_AUT_CONTROLS_HIERARCHY_FEATURE_COUNT = CorePackage.COMMAND_FEATURE_COUNT + 2; + int AUT_CONTROLS_HIERARCHY__DESCRIPTION = CorePackage.COMMAND_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Kind' attribute. + * + * + * @generated + * @ordered + */ + int AUT_CONTROLS_HIERARCHY__KIND = CorePackage.COMMAND_FEATURE_COUNT + 3; + + /** + * The number of structural features of the 'AUT Controls Hierarchy' class. + * + * + * @generated + * @ordered + */ + int AUT_CONTROLS_HIERARCHY_FEATURE_COUNT = CorePackage.COMMAND_FEATURE_COUNT + 4; /** * The meta object id for the '{@link org.eclipse.rcptt.core.ecl.core.model.ExecutionPhase Execution Phase}' enum. @@ -1245,14 +1263,14 @@ public interface Q7CorePackage extends EPackage { int EXECUTION_PHASE = 25; /** - * The meta object id for the '{@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState Assertion AUT Controls Hierarchy State}' enum. + * The meta object id for the '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState AUT Controls Hierarchy State}' enum. * * - * @see org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState - * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getAssertionAUTControlsHierarchyState() + * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState + * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getAUTControlsHierarchyState() * @generated */ - int ASSERTION_AUT_CONTROLS_HIERARCHY_STATE = 26; + int AUT_CONTROLS_HIERARCHY_STATE = 26; /** * Returns the meta object for class '{@link org.eclipse.rcptt.core.ecl.core.model.EnterContext Enter Context}'. @@ -1891,36 +1909,58 @@ public interface Q7CorePackage extends EPackage { EClass getTerminateAut(); /** - * Returns the meta object for class '{@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy Assertion AUT Controls Hierarchy}'. + * Returns the meta object for class '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy AUT Controls Hierarchy}'. * * - * @return the meta object for class 'Assertion AUT Controls Hierarchy'. - * @see org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy + * @return the meta object for class 'AUT Controls Hierarchy'. + * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy * @generated */ - EClass getAssertionAUTControlsHierarchy(); + EClass getAUTControlsHierarchy(); /** - * Returns the meta object for the attribute '{@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy#getId Id}'. + * Returns the meta object for the attribute '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getId Id}'. * * * @return the meta object for the attribute 'Id'. - * @see org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy#getId() - * @see #getAssertionAUTControlsHierarchy() + * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getId() + * @see #getAUTControlsHierarchy() * @generated */ - EAttribute getAssertionAUTControlsHierarchy_Id(); + EAttribute getAUTControlsHierarchy_Id(); /** - * Returns the meta object for the attribute '{@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy#getState State}'. + * Returns the meta object for the attribute '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getState State}'. * * * @return the meta object for the attribute 'State'. - * @see org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy#getState() - * @see #getAssertionAUTControlsHierarchy() + * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getState() + * @see #getAUTControlsHierarchy() * @generated */ - EAttribute getAssertionAUTControlsHierarchy_State(); + EAttribute getAUTControlsHierarchy_State(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getDescription Description}'. + * + * + * @return the meta object for the attribute 'Description'. + * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getDescription() + * @see #getAUTControlsHierarchy() + * @generated + */ + EAttribute getAUTControlsHierarchy_Description(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getKind Kind}'. + * + * + * @return the meta object for the attribute 'Kind'. + * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getKind() + * @see #getAUTControlsHierarchy() + * @generated + */ + EAttribute getAUTControlsHierarchy_Kind(); /** * Returns the meta object for enum '{@link org.eclipse.rcptt.core.ecl.core.model.ExecutionPhase Execution Phase}'. @@ -1933,14 +1973,14 @@ public interface Q7CorePackage extends EPackage { EEnum getExecutionPhase(); /** - * Returns the meta object for enum '{@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState Assertion AUT Controls Hierarchy State}'. + * Returns the meta object for enum '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState AUT Controls Hierarchy State}'. * * - * @return the meta object for enum 'Assertion AUT Controls Hierarchy State'. - * @see org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState + * @return the meta object for enum 'AUT Controls Hierarchy State'. + * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState * @generated */ - EEnum getAssertionAUTControlsHierarchyState(); + EEnum getAUTControlsHierarchyState(); /** * Returns the factory that creates the instances of the model. @@ -2493,14 +2533,14 @@ interface Literals { EClass TERMINATE_AUT = eINSTANCE.getTerminateAut(); /** - * The meta object literal for the '{@link org.eclipse.rcptt.core.ecl.core.model.impl.AssertionAUTControlsHierarchyImpl Assertion AUT Controls Hierarchy}' class. + * The meta object literal for the '{@link org.eclipse.rcptt.core.ecl.core.model.impl.AUTControlsHierarchyImpl AUT Controls Hierarchy}' class. * * - * @see org.eclipse.rcptt.core.ecl.core.model.impl.AssertionAUTControlsHierarchyImpl - * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getAssertionAUTControlsHierarchy() + * @see org.eclipse.rcptt.core.ecl.core.model.impl.AUTControlsHierarchyImpl + * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getAUTControlsHierarchy() * @generated */ - EClass ASSERTION_AUT_CONTROLS_HIERARCHY = eINSTANCE.getAssertionAUTControlsHierarchy(); + EClass AUT_CONTROLS_HIERARCHY = eINSTANCE.getAUTControlsHierarchy(); /** * The meta object literal for the 'Id' attribute feature. @@ -2508,7 +2548,7 @@ interface Literals { * * @generated */ - EAttribute ASSERTION_AUT_CONTROLS_HIERARCHY__ID = eINSTANCE.getAssertionAUTControlsHierarchy_Id(); + EAttribute AUT_CONTROLS_HIERARCHY__ID = eINSTANCE.getAUTControlsHierarchy_Id(); /** * The meta object literal for the 'State' attribute feature. @@ -2516,7 +2556,23 @@ interface Literals { * * @generated */ - EAttribute ASSERTION_AUT_CONTROLS_HIERARCHY__STATE = eINSTANCE.getAssertionAUTControlsHierarchy_State(); + EAttribute AUT_CONTROLS_HIERARCHY__STATE = eINSTANCE.getAUTControlsHierarchy_State(); + + /** + * The meta object literal for the 'Description' attribute feature. + * + * + * @generated + */ + EAttribute AUT_CONTROLS_HIERARCHY__DESCRIPTION = eINSTANCE.getAUTControlsHierarchy_Description(); + + /** + * The meta object literal for the 'Kind' attribute feature. + * + * + * @generated + */ + EAttribute AUT_CONTROLS_HIERARCHY__KIND = eINSTANCE.getAUTControlsHierarchy_Kind(); /** * The meta object literal for the '{@link org.eclipse.rcptt.core.ecl.core.model.ExecutionPhase Execution Phase}' enum. @@ -2529,14 +2585,14 @@ interface Literals { EEnum EXECUTION_PHASE = eINSTANCE.getExecutionPhase(); /** - * The meta object literal for the '{@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState Assertion AUT Controls Hierarchy State}' enum. + * The meta object literal for the '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState AUT Controls Hierarchy State}' enum. * * - * @see org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState - * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getAssertionAUTControlsHierarchyState() + * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState + * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getAUTControlsHierarchyState() * @generated */ - EEnum ASSERTION_AUT_CONTROLS_HIERARCHY_STATE = eINSTANCE.getAssertionAUTControlsHierarchyState(); + EEnum AUT_CONTROLS_HIERARCHY_STATE = eINSTANCE.getAUTControlsHierarchyState(); } diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AUTControlsHierarchyImpl.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AUTControlsHierarchyImpl.java new file mode 100644 index 000000000..1559b10c7 --- /dev/null +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AUTControlsHierarchyImpl.java @@ -0,0 +1,327 @@ +/** + */ +package org.eclipse.rcptt.core.ecl.core.model.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.core.ecl.core.model.AUTControlsHierarchy; +import org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState; +import org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage; + +import org.eclipse.rcptt.ecl.core.impl.CommandImpl; + +/** + * + * An implementation of the model object 'AUT Controls Hierarchy'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.rcptt.core.ecl.core.model.impl.AUTControlsHierarchyImpl#getId Id}
  • + *
  • {@link org.eclipse.rcptt.core.ecl.core.model.impl.AUTControlsHierarchyImpl#getState State}
  • + *
  • {@link org.eclipse.rcptt.core.ecl.core.model.impl.AUTControlsHierarchyImpl#getDescription Description}
  • + *
  • {@link org.eclipse.rcptt.core.ecl.core.model.impl.AUTControlsHierarchyImpl#getKind Kind}
  • + *
+ * + * @generated + */ +public class AUTControlsHierarchyImpl extends CommandImpl implements AUTControlsHierarchy { + /** + * The default value of the '{@link #getId() Id}' attribute. + * + * + * @see #getId() + * @generated + * @ordered + */ + protected static final String ID_EDEFAULT = ""; + + /** + * The cached value of the '{@link #getId() Id}' attribute. + * + * + * @see #getId() + * @generated + * @ordered + */ + protected String id = ID_EDEFAULT; + + /** + * The default value of the '{@link #getState() State}' attribute. + * + * + * @see #getState() + * @generated + * @ordered + */ + protected static final AUTControlsHierarchyState STATE_EDEFAULT = AUTControlsHierarchyState.HIGHLIGHT_WIDGET; + + /** + * The cached value of the '{@link #getState() State}' attribute. + * + * + * @see #getState() + * @generated + * @ordered + */ + protected AUTControlsHierarchyState state = STATE_EDEFAULT; + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = ""; + + /** + * The cached value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * The default value of the '{@link #getKind() Kind}' attribute. + * + * + * @see #getKind() + * @generated + * @ordered + */ + protected static final String KIND_EDEFAULT = ""; + + /** + * The cached value of the '{@link #getKind() Kind}' attribute. + * + * + * @see #getKind() + * @generated + * @ordered + */ + protected String kind = KIND_EDEFAULT; + + /** + * + * + * @generated + */ + protected AUTControlsHierarchyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Q7CorePackage.Literals.AUT_CONTROLS_HIERARCHY; + } + + /** + * + * + * @generated + */ + public String getId() { + return id; + } + + /** + * + * + * @generated + */ + public void setId(String newId) { + String oldId = id; + id = newId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.AUT_CONTROLS_HIERARCHY__ID, oldId, id)); + } + + /** + * + * + * @generated + */ + public AUTControlsHierarchyState getState() { + return state; + } + + /** + * + * + * @generated + */ + public void setState(AUTControlsHierarchyState newState) { + AUTControlsHierarchyState oldState = state; + state = newState == null ? STATE_EDEFAULT : newState; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.AUT_CONTROLS_HIERARCHY__STATE, oldState, state)); + } + + /** + * + * + * @generated + */ + public String getDescription() { + return description; + } + + /** + * + * + * @generated + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.AUT_CONTROLS_HIERARCHY__DESCRIPTION, oldDescription, description)); + } + + /** + * + * + * @generated + */ + public String getKind() { + return kind; + } + + /** + * + * + * @generated + */ + public void setKind(String newKind) { + String oldKind = kind; + kind = newKind; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.AUT_CONTROLS_HIERARCHY__KIND, oldKind, kind)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Q7CorePackage.AUT_CONTROLS_HIERARCHY__ID: + return getId(); + case Q7CorePackage.AUT_CONTROLS_HIERARCHY__STATE: + return getState(); + case Q7CorePackage.AUT_CONTROLS_HIERARCHY__DESCRIPTION: + return getDescription(); + case Q7CorePackage.AUT_CONTROLS_HIERARCHY__KIND: + return getKind(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Q7CorePackage.AUT_CONTROLS_HIERARCHY__ID: + setId((String)newValue); + return; + case Q7CorePackage.AUT_CONTROLS_HIERARCHY__STATE: + setState((AUTControlsHierarchyState)newValue); + return; + case Q7CorePackage.AUT_CONTROLS_HIERARCHY__DESCRIPTION: + setDescription((String)newValue); + return; + case Q7CorePackage.AUT_CONTROLS_HIERARCHY__KIND: + setKind((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Q7CorePackage.AUT_CONTROLS_HIERARCHY__ID: + setId(ID_EDEFAULT); + return; + case Q7CorePackage.AUT_CONTROLS_HIERARCHY__STATE: + setState(STATE_EDEFAULT); + return; + case Q7CorePackage.AUT_CONTROLS_HIERARCHY__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case Q7CorePackage.AUT_CONTROLS_HIERARCHY__KIND: + setKind(KIND_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Q7CorePackage.AUT_CONTROLS_HIERARCHY__ID: + return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); + case Q7CorePackage.AUT_CONTROLS_HIERARCHY__STATE: + return state != STATE_EDEFAULT; + case Q7CorePackage.AUT_CONTROLS_HIERARCHY__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case Q7CorePackage.AUT_CONTROLS_HIERARCHY__KIND: + return KIND_EDEFAULT == null ? kind != null : !KIND_EDEFAULT.equals(kind); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (id: "); + result.append(id); + result.append(", state: "); + result.append(state); + result.append(", description: "); + result.append(description); + result.append(", kind: "); + result.append(kind); + result.append(')'); + return result.toString(); + } + +} //AUTControlsHierarchyImpl diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AssertionAUTControlsHierarchyImpl.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AssertionAUTControlsHierarchyImpl.java deleted file mode 100644 index a3c6b5e71..000000000 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AssertionAUTControlsHierarchyImpl.java +++ /dev/null @@ -1,219 +0,0 @@ -/** - */ -package org.eclipse.rcptt.core.ecl.core.model.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.core.ecl.core.model.AssertionAUTControlsHierarchy; -import org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState; -import org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage; - -import org.eclipse.rcptt.ecl.core.impl.CommandImpl; - -/** - * - * An implementation of the model object 'Assertion AUT Controls Hierarchy'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link org.eclipse.rcptt.core.ecl.core.model.impl.AssertionAUTControlsHierarchyImpl#getId Id}
  • - *
  • {@link org.eclipse.rcptt.core.ecl.core.model.impl.AssertionAUTControlsHierarchyImpl#getState State}
  • - *
- * - * @generated - */ -public class AssertionAUTControlsHierarchyImpl extends CommandImpl implements AssertionAUTControlsHierarchy { - /** - * The default value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected static final String ID_EDEFAULT = ""; - - /** - * The cached value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected String id = ID_EDEFAULT; - - /** - * The default value of the '{@link #getState() State}' attribute. - * - * - * @see #getState() - * @generated - * @ordered - */ - protected static final AssertionAUTControlsHierarchyState STATE_EDEFAULT = AssertionAUTControlsHierarchyState.GET_ROOT; - - /** - * The cached value of the '{@link #getState() State}' attribute. - * - * - * @see #getState() - * @generated - * @ordered - */ - protected AssertionAUTControlsHierarchyState state = STATE_EDEFAULT; - - /** - * - * - * @generated - */ - protected AssertionAUTControlsHierarchyImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Q7CorePackage.Literals.ASSERTION_AUT_CONTROLS_HIERARCHY; - } - - /** - * - * - * @generated - */ - public String getId() { - return id; - } - - /** - * - * - * @generated - */ - public void setId(String newId) { - String oldId = id; - id = newId; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY__ID, oldId, id)); - } - - /** - * - * - * @generated - */ - public AssertionAUTControlsHierarchyState getState() { - return state; - } - - /** - * - * - * @generated - */ - public void setState(AssertionAUTControlsHierarchyState newState) { - AssertionAUTControlsHierarchyState oldState = state; - state = newState == null ? STATE_EDEFAULT : newState; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY__STATE, oldState, state)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY__ID: - return getId(); - case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY__STATE: - return getState(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY__ID: - setId((String)newValue); - return; - case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY__STATE: - setState((AssertionAUTControlsHierarchyState)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY__ID: - setId(ID_EDEFAULT); - return; - case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY__STATE: - setState(STATE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY__ID: - return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); - case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY__STATE: - return state != STATE_EDEFAULT; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (id: "); - result.append(id); - result.append(", state: "); - result.append(state); - result.append(')'); - return result.toString(); - } - -} //AssertionAUTControlsHierarchyImpl diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CoreFactoryImpl.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CoreFactoryImpl.java index 31b3e6193..afdca6a4f 100755 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CoreFactoryImpl.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CoreFactoryImpl.java @@ -89,7 +89,7 @@ public EObject create(EClass eClass) { case Q7CorePackage.CREATE_VERIFICATION: return createCreateVerification(); case Q7CorePackage.CREATE_WIDGET_VERIFICATION_PARAM: return createCreateWidgetVerificationParam(); case Q7CorePackage.TERMINATE_AUT: return createTerminateAut(); - case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY: return createAssertionAUTControlsHierarchy(); + case Q7CorePackage.AUT_CONTROLS_HIERARCHY: return createAUTControlsHierarchy(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -105,8 +105,8 @@ public Object createFromString(EDataType eDataType, String initialValue) { switch (eDataType.getClassifierID()) { case Q7CorePackage.EXECUTION_PHASE: return createExecutionPhaseFromString(eDataType, initialValue); - case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY_STATE: - return createAssertionAUTControlsHierarchyStateFromString(eDataType, initialValue); + case Q7CorePackage.AUT_CONTROLS_HIERARCHY_STATE: + return createAUTControlsHierarchyStateFromString(eDataType, initialValue); default: throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); } @@ -122,8 +122,8 @@ public String convertToString(EDataType eDataType, Object instanceValue) { switch (eDataType.getClassifierID()) { case Q7CorePackage.EXECUTION_PHASE: return convertExecutionPhaseToString(eDataType, instanceValue); - case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY_STATE: - return convertAssertionAUTControlsHierarchyStateToString(eDataType, instanceValue); + case Q7CorePackage.AUT_CONTROLS_HIERARCHY_STATE: + return convertAUTControlsHierarchyStateToString(eDataType, instanceValue); default: throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); } @@ -374,9 +374,9 @@ public TerminateAut createTerminateAut() { * * @generated */ - public AssertionAUTControlsHierarchy createAssertionAUTControlsHierarchy() { - AssertionAUTControlsHierarchyImpl assertionAUTControlsHierarchy = new AssertionAUTControlsHierarchyImpl(); - return assertionAUTControlsHierarchy; + public AUTControlsHierarchy createAUTControlsHierarchy() { + AUTControlsHierarchyImpl autControlsHierarchy = new AUTControlsHierarchyImpl(); + return autControlsHierarchy; } /** @@ -404,8 +404,8 @@ public String convertExecutionPhaseToString(EDataType eDataType, Object instance * * @generated */ - public AssertionAUTControlsHierarchyState createAssertionAUTControlsHierarchyStateFromString(EDataType eDataType, String initialValue) { - AssertionAUTControlsHierarchyState result = AssertionAUTControlsHierarchyState.get(initialValue); + public AUTControlsHierarchyState createAUTControlsHierarchyStateFromString(EDataType eDataType, String initialValue) { + AUTControlsHierarchyState result = AUTControlsHierarchyState.get(initialValue); if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); return result; } @@ -415,7 +415,7 @@ public AssertionAUTControlsHierarchyState createAssertionAUTControlsHierarchySta * * @generated */ - public String convertAssertionAUTControlsHierarchyStateToString(EDataType eDataType, Object instanceValue) { + public String convertAUTControlsHierarchyStateToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); } diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java index c36f7d925..1bbc526d4 100644 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java @@ -8,11 +8,9 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.EcorePackage; - import org.eclipse.emf.ecore.impl.EPackageImpl; - -import org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy; -import org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState; +import org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy; +import org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState; import org.eclipse.rcptt.core.ecl.core.model.BeginReportNode; import org.eclipse.rcptt.core.ecl.core.model.CreateContext; import org.eclipse.rcptt.core.ecl.core.model.CreateReport; @@ -40,13 +38,9 @@ import org.eclipse.rcptt.core.ecl.core.model.TerminateAut; import org.eclipse.rcptt.core.ecl.core.model.ViewInfo; import org.eclipse.rcptt.core.ecl.core.model.ViewList; - import org.eclipse.rcptt.core.scenario.ScenarioPackage; - import org.eclipse.rcptt.ecl.core.CorePackage; - import org.eclipse.rcptt.reporting.ReportingPackage; - import org.eclipse.rcptt.sherlock.core.model.sherlock.report.ReportPackage; /** @@ -229,7 +223,7 @@ public class Q7CorePackageImpl extends EPackageImpl implements Q7CorePackage { * * @generated */ - private EClass assertionAUTControlsHierarchyEClass = null; + private EClass autControlsHierarchyEClass = null; /** * @@ -243,7 +237,7 @@ public class Q7CorePackageImpl extends EPackageImpl implements Q7CorePackage { * * @generated */ - private EEnum assertionAUTControlsHierarchyStateEEnum = null; + private EEnum autControlsHierarchyStateEEnum = null; /** * Creates an instance of the model Package, registered with @@ -856,8 +850,26 @@ public EClass getTerminateAut() { * * @generated */ - public EClass getAssertionAUTControlsHierarchy() { - return assertionAUTControlsHierarchyEClass; + public EClass getAUTControlsHierarchy() { + return autControlsHierarchyEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getAUTControlsHierarchy_Id() { + return (EAttribute)autControlsHierarchyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getAUTControlsHierarchy_State() { + return (EAttribute)autControlsHierarchyEClass.getEStructuralFeatures().get(1); } /** @@ -865,8 +877,8 @@ public EClass getAssertionAUTControlsHierarchy() { * * @generated */ - public EAttribute getAssertionAUTControlsHierarchy_Id() { - return (EAttribute)assertionAUTControlsHierarchyEClass.getEStructuralFeatures().get(0); + public EAttribute getAUTControlsHierarchy_Description() { + return (EAttribute)autControlsHierarchyEClass.getEStructuralFeatures().get(2); } /** @@ -874,8 +886,8 @@ public EAttribute getAssertionAUTControlsHierarchy_Id() { * * @generated */ - public EAttribute getAssertionAUTControlsHierarchy_State() { - return (EAttribute)assertionAUTControlsHierarchyEClass.getEStructuralFeatures().get(1); + public EAttribute getAUTControlsHierarchy_Kind() { + return (EAttribute)autControlsHierarchyEClass.getEStructuralFeatures().get(3); } /** @@ -892,8 +904,8 @@ public EEnum getExecutionPhase() { * * @generated */ - public EEnum getAssertionAUTControlsHierarchyState() { - return assertionAUTControlsHierarchyStateEEnum; + public EEnum getAUTControlsHierarchyState() { + return autControlsHierarchyStateEEnum; } /** @@ -1008,13 +1020,15 @@ public void createPackageContents() { terminateAutEClass = createEClass(TERMINATE_AUT); - assertionAUTControlsHierarchyEClass = createEClass(ASSERTION_AUT_CONTROLS_HIERARCHY); - createEAttribute(assertionAUTControlsHierarchyEClass, ASSERTION_AUT_CONTROLS_HIERARCHY__ID); - createEAttribute(assertionAUTControlsHierarchyEClass, ASSERTION_AUT_CONTROLS_HIERARCHY__STATE); + autControlsHierarchyEClass = createEClass(AUT_CONTROLS_HIERARCHY); + createEAttribute(autControlsHierarchyEClass, AUT_CONTROLS_HIERARCHY__ID); + createEAttribute(autControlsHierarchyEClass, AUT_CONTROLS_HIERARCHY__STATE); + createEAttribute(autControlsHierarchyEClass, AUT_CONTROLS_HIERARCHY__DESCRIPTION); + createEAttribute(autControlsHierarchyEClass, AUT_CONTROLS_HIERARCHY__KIND); // Create enums executionPhaseEEnum = createEEnum(EXECUTION_PHASE); - assertionAUTControlsHierarchyStateEEnum = createEEnum(ASSERTION_AUT_CONTROLS_HIERARCHY_STATE); + autControlsHierarchyStateEEnum = createEEnum(AUT_CONTROLS_HIERARCHY_STATE); } /** @@ -1070,7 +1084,7 @@ public void initializePackageContents() { resetVerificationsEClass.getESuperTypes().add(theCorePackage.getCommand()); createVerificationEClass.getESuperTypes().add(theCorePackage.getCommand()); terminateAutEClass.getESuperTypes().add(theCorePackage.getCommand()); - assertionAUTControlsHierarchyEClass.getESuperTypes().add(theCorePackage.getCommand()); + autControlsHierarchyEClass.getESuperTypes().add(theCorePackage.getCommand()); // Initialize classes and features; add operations and parameters initEClass(enterContextEClass, EnterContext.class, "EnterContext", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -1157,9 +1171,11 @@ public void initializePackageContents() { initEClass(terminateAutEClass, TerminateAut.class, "TerminateAut", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEClass(assertionAUTControlsHierarchyEClass, AssertionAUTControlsHierarchy.class, "AssertionAUTControlsHierarchy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getAssertionAUTControlsHierarchy_Id(), theEcorePackage.getEString(), "id", "", 0, 1, AssertionAUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getAssertionAUTControlsHierarchy_State(), this.getAssertionAUTControlsHierarchyState(), "state", null, 0, 1, AssertionAUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(autControlsHierarchyEClass, AUTControlsHierarchy.class, "AUTControlsHierarchy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getAUTControlsHierarchy_Id(), theEcorePackage.getEString(), "id", "", 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAUTControlsHierarchy_State(), this.getAUTControlsHierarchyState(), "state", null, 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAUTControlsHierarchy_Description(), theEcorePackage.getEString(), "description", "", 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAUTControlsHierarchy_Kind(), theEcorePackage.getEString(), "kind", "", 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); // Initialize enums and add enum literals initEEnum(executionPhaseEEnum, ExecutionPhase.class, "ExecutionPhase"); @@ -1168,11 +1184,11 @@ public void initializePackageContents() { addEEnumLiteral(executionPhaseEEnum, ExecutionPhase.RUN); addEEnumLiteral(executionPhaseEEnum, ExecutionPhase.FINISH); - initEEnum(assertionAUTControlsHierarchyStateEEnum, AssertionAUTControlsHierarchyState.class, "AssertionAUTControlsHierarchyState"); - addEEnumLiteral(assertionAUTControlsHierarchyStateEEnum, AssertionAUTControlsHierarchyState.GET_ROOT); - addEEnumLiteral(assertionAUTControlsHierarchyStateEEnum, AssertionAUTControlsHierarchyState.GET_NODE); - addEEnumLiteral(assertionAUTControlsHierarchyStateEEnum, AssertionAUTControlsHierarchyState.CLEAR); - addEEnumLiteral(assertionAUTControlsHierarchyStateEEnum, AssertionAUTControlsHierarchyState.HIGHLIGHT); + initEEnum(autControlsHierarchyStateEEnum, AUTControlsHierarchyState.class, "AUTControlsHierarchyState"); + addEEnumLiteral(autControlsHierarchyStateEEnum, AUTControlsHierarchyState.HIGHLIGHT_WIDGET); + addEEnumLiteral(autControlsHierarchyStateEEnum, AUTControlsHierarchyState.UPDATE_ASSERT_WINDOW); + addEEnumLiteral(autControlsHierarchyStateEEnum, AUTControlsHierarchyState.GET_ELEMENT); + addEEnumLiteral(autControlsHierarchyStateEEnum, AUTControlsHierarchyState.GET_PARENT); // Create resource createResource(eNS_URI); diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreAdapterFactory.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreAdapterFactory.java index 7234b8c86..1b8e47da9 100755 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreAdapterFactory.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreAdapterFactory.java @@ -174,8 +174,8 @@ public Adapter caseTerminateAut(TerminateAut object) { return createTerminateAutAdapter(); } @Override - public Adapter caseAssertionAUTControlsHierarchy(AssertionAUTControlsHierarchy object) { - return createAssertionAUTControlsHierarchyAdapter(); + public Adapter caseAUTControlsHierarchy(AUTControlsHierarchy object) { + return createAUTControlsHierarchyAdapter(); } @Override public Adapter caseCommand(Command object) { @@ -538,16 +538,16 @@ public Adapter createTerminateAutAdapter() { } /** - * Creates a new adapter for an object of class '{@link org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy Assertion AUT Controls Hierarchy}'. + * Creates a new adapter for an object of class '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy AUT Controls Hierarchy}'. * * 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. * * @return the new adapter. - * @see org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy + * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy * @generated */ - public Adapter createAssertionAUTControlsHierarchyAdapter() { + public Adapter createAUTControlsHierarchyAdapter() { return null; } diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreSwitch.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreSwitch.java index 798dcb517..3be472aa0 100755 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreSwitch.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreSwitch.java @@ -255,10 +255,10 @@ protected T doSwitch(int classifierID, EObject theEObject) { if (result == null) result = defaultCase(theEObject); return result; } - case Q7CorePackage.ASSERTION_AUT_CONTROLS_HIERARCHY: { - AssertionAUTControlsHierarchy assertionAUTControlsHierarchy = (AssertionAUTControlsHierarchy)theEObject; - T result = caseAssertionAUTControlsHierarchy(assertionAUTControlsHierarchy); - if (result == null) result = caseCommand(assertionAUTControlsHierarchy); + case Q7CorePackage.AUT_CONTROLS_HIERARCHY: { + AUTControlsHierarchy autControlsHierarchy = (AUTControlsHierarchy)theEObject; + T result = caseAUTControlsHierarchy(autControlsHierarchy); + if (result == null) result = caseCommand(autControlsHierarchy); if (result == null) result = defaultCase(theEObject); return result; } @@ -627,17 +627,17 @@ public T caseTerminateAut(TerminateAut object) { } /** - * Returns the result of interpreting the object as an instance of 'Assertion AUT Controls Hierarchy'. + * Returns the result of interpreting the object as an instance of 'AUT Controls Hierarchy'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Assertion AUT Controls Hierarchy'. + * @return the result of interpreting the object as an instance of 'AUT Controls Hierarchy'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseAssertionAUTControlsHierarchy(AssertionAUTControlsHierarchy object) { + public T caseAUTControlsHierarchy(AUTControlsHierarchy object) { return null; } diff --git a/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore b/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore index 73f7d17c4..ec6de2303 100755 --- a/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore +++ b/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore @@ -130,15 +130,19 @@ - + - + + + - - - - - + + + + + diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolPackage.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolPackage.java index 16337783e..c1f9740ec 100755 --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolPackage.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolPackage.java @@ -5558,13 +5558,22 @@ public interface ProtocolPackage extends EPackage { int UI_HIERARCHY_RESPONSE__ADVANCED_INFORMATION = RawPackage.RESPONSE__ADVANCED_INFORMATION; /** - * The feature id for the 'Ui Elements' reference list. + * The feature id for the 'Chilren' reference list. * * * @generated * @ordered */ - int UI_HIERARCHY_RESPONSE__UI_ELEMENTS = RawPackage.RESPONSE_FEATURE_COUNT + 0; + int UI_HIERARCHY_RESPONSE__CHILREN = RawPackage.RESPONSE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Ui Element' reference. + * + * + * @generated + * @ordered + */ + int UI_HIERARCHY_RESPONSE__UI_ELEMENT = RawPackage.RESPONSE_FEATURE_COUNT + 1; /** * The number of structural features of the 'UI Hierarchy Response' class. @@ -5573,7 +5582,7 @@ public interface ProtocolPackage extends EPackage { * @generated * @ordered */ - int UI_HIERARCHY_RESPONSE_FEATURE_COUNT = RawPackage.RESPONSE_FEATURE_COUNT + 1; + int UI_HIERARCHY_RESPONSE_FEATURE_COUNT = RawPackage.RESPONSE_FEATURE_COUNT + 2; /** * The meta object id for the '{@link org.eclipse.rcptt.tesla.core.protocol.impl.UIElementImpl UI Element}' class. @@ -5630,6 +5639,15 @@ public interface ProtocolPackage extends EPackage { */ int UI_ELEMENT__NAME = RawPackage.ELEMENT_FEATURE_COUNT + 1; + /** + * The feature id for the 'Generation Kind' attribute. + * + * + * @generated + * @ordered + */ + int UI_ELEMENT__GENERATION_KIND = RawPackage.ELEMENT_FEATURE_COUNT + 2; + /** * The number of structural features of the 'UI Element' class. * @@ -5637,7 +5655,7 @@ public interface ProtocolPackage extends EPackage { * @generated * @ordered */ - int UI_ELEMENT_FEATURE_COUNT = RawPackage.ELEMENT_FEATURE_COUNT + 2; + int UI_ELEMENT_FEATURE_COUNT = RawPackage.ELEMENT_FEATURE_COUNT + 3; /** * The meta object id for the '{@link org.eclipse.rcptt.tesla.core.protocol.SWTDialogKind SWT Dialog Kind}' enum. @@ -8608,15 +8626,26 @@ public interface ProtocolPackage extends EPackage { EClass getUIHierarchyResponse(); /** - * Returns the meta object for the reference list '{@link org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getUiElements Ui Elements}'. + * Returns the meta object for the reference list '{@link org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getChilren Chilren}'. + * + * + * @return the meta object for the reference list 'Chilren'. + * @see org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getChilren() + * @see #getUIHierarchyResponse() + * @generated + */ + EReference getUIHierarchyResponse_Chilren(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getUiElement Ui Element}'. * * - * @return the meta object for the reference list 'Ui Elements'. - * @see org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getUiElements() + * @return the meta object for the reference 'Ui Element'. + * @see org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getUiElement() * @see #getUIHierarchyResponse() * @generated */ - EReference getUIHierarchyResponse_UiElements(); + EReference getUIHierarchyResponse_UiElement(); /** * Returns the meta object for class '{@link org.eclipse.rcptt.tesla.core.protocol.UIElement UI Element}'. @@ -8650,6 +8679,17 @@ public interface ProtocolPackage extends EPackage { */ EAttribute getUIElement_Name(); + /** + * Returns the meta object for the attribute '{@link org.eclipse.rcptt.tesla.core.protocol.UIElement#getGenerationKind Generation Kind}'. + * + * + * @return the meta object for the attribute 'Generation Kind'. + * @see org.eclipse.rcptt.tesla.core.protocol.UIElement#getGenerationKind() + * @see #getUIElement() + * @generated + */ + EAttribute getUIElement_GenerationKind(); + /** * Returns the meta object for enum '{@link org.eclipse.rcptt.tesla.core.protocol.SWTDialogKind SWT Dialog Kind}'. * @@ -11139,12 +11179,20 @@ interface Literals { EClass UI_HIERARCHY_RESPONSE = eINSTANCE.getUIHierarchyResponse(); /** - * The meta object literal for the 'Ui Elements' reference list feature. + * The meta object literal for the 'Chilren' reference list feature. + * + * + * @generated + */ + EReference UI_HIERARCHY_RESPONSE__CHILREN = eINSTANCE.getUIHierarchyResponse_Chilren(); + + /** + * The meta object literal for the 'Ui Element' reference feature. * * * @generated */ - EReference UI_HIERARCHY_RESPONSE__UI_ELEMENTS = eINSTANCE.getUIHierarchyResponse_UiElements(); + EReference UI_HIERARCHY_RESPONSE__UI_ELEMENT = eINSTANCE.getUIHierarchyResponse_UiElement(); /** * The meta object literal for the '{@link org.eclipse.rcptt.tesla.core.protocol.impl.UIElementImpl UI Element}' class. @@ -11172,6 +11220,14 @@ interface Literals { */ EAttribute UI_ELEMENT__NAME = eINSTANCE.getUIElement_Name(); + /** + * The meta object literal for the 'Generation Kind' attribute feature. + * + * + * @generated + */ + EAttribute UI_ELEMENT__GENERATION_KIND = eINSTANCE.getUIElement_GenerationKind(); + /** * The meta object literal for the '{@link org.eclipse.rcptt.tesla.core.protocol.SWTDialogKind SWT Dialog Kind}' enum. * diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIElement.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIElement.java index 516bdf0e1..dfc0f5cc8 100644 --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIElement.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIElement.java @@ -15,6 +15,7 @@ *
    *
  • {@link org.eclipse.rcptt.tesla.core.protocol.UIElement#isHasChildren Has Children}
  • *
  • {@link org.eclipse.rcptt.tesla.core.protocol.UIElement#getName Name}
  • + *
  • {@link org.eclipse.rcptt.tesla.core.protocol.UIElement#getGenerationKind Generation Kind}
  • *
* * @see org.eclipse.rcptt.tesla.core.protocol.ProtocolPackage#getUIElement() @@ -74,4 +75,30 @@ public interface UIElement extends Element { */ void setName(String value); + /** + * Returns the value of the 'Generation Kind' attribute. + * + *

+ * If the meaning of the 'Generation Kind' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Generation Kind' attribute. + * @see #setGenerationKind(String) + * @see org.eclipse.rcptt.tesla.core.protocol.ProtocolPackage#getUIElement_GenerationKind() + * @model + * @generated + */ + String getGenerationKind(); + + /** + * Sets the value of the '{@link org.eclipse.rcptt.tesla.core.protocol.UIElement#getGenerationKind Generation Kind}' attribute. + * + * + * @param value the new value of the 'Generation Kind' attribute. + * @see #getGenerationKind() + * @generated + */ + void setGenerationKind(String value); + } // UIElement diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIHierarchyResponse.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIHierarchyResponse.java index 909bc6157..e717785cf 100644 --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIHierarchyResponse.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIHierarchyResponse.java @@ -14,7 +14,8 @@ * The following features are supported: *

*
    - *
  • {@link org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getUiElements Ui Elements}
  • + *
  • {@link org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getChilren Chilren}
  • + *
  • {@link org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getUiElement Ui Element}
  • *
* * @see org.eclipse.rcptt.tesla.core.protocol.ProtocolPackage#getUIHierarchyResponse() @@ -23,19 +24,45 @@ */ public interface UIHierarchyResponse extends Response { /** - * Returns the value of the 'Ui Elements' reference list. + * Returns the value of the 'Chilren' reference list. * The list contents are of type {@link org.eclipse.rcptt.tesla.core.protocol.UIElement}. * *

- * If the meaning of the 'Ui Elements' reference list isn't clear, + * If the meaning of the 'Chilren' reference list isn't clear, * there really should be more of a description here... *

* - * @return the value of the 'Ui Elements' reference list. - * @see org.eclipse.rcptt.tesla.core.protocol.ProtocolPackage#getUIHierarchyResponse_UiElements() + * @return the value of the 'Chilren' reference list. + * @see org.eclipse.rcptt.tesla.core.protocol.ProtocolPackage#getUIHierarchyResponse_Chilren() * @model * @generated */ - EList getUiElements(); + EList getChilren(); + + /** + * Returns the value of the 'Ui Element' reference. + * + *

+ * If the meaning of the 'Ui Element' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Ui Element' reference. + * @see #setUiElement(UIElement) + * @see org.eclipse.rcptt.tesla.core.protocol.ProtocolPackage#getUIHierarchyResponse_UiElement() + * @model + * @generated + */ + UIElement getUiElement(); + + /** + * Sets the value of the '{@link org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getUiElement Ui Element}' reference. + * + * + * @param value the new value of the 'Ui Element' reference. + * @see #getUiElement() + * @generated + */ + void setUiElement(UIElement value); } // UIHierarchyResponse diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolPackageImpl.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolPackageImpl.java index bcbb8de5d..f38982401 100755 --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolPackageImpl.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolPackageImpl.java @@ -3497,10 +3497,19 @@ public EClass getUIHierarchyResponse() { * * @generated */ - public EReference getUIHierarchyResponse_UiElements() { + public EReference getUIHierarchyResponse_Chilren() { return (EReference)uiHierarchyResponseEClass.getEStructuralFeatures().get(0); } + /** + * + * + * @generated + */ + public EReference getUIHierarchyResponse_UiElement() { + return (EReference)uiHierarchyResponseEClass.getEStructuralFeatures().get(1); + } + /** * * @@ -3528,6 +3537,15 @@ public EAttribute getUIElement_Name() { return (EAttribute)uiElementEClass.getEStructuralFeatures().get(1); } + /** + * + * + * @generated + */ + public EAttribute getUIElement_GenerationKind() { + return (EAttribute)uiElementEClass.getEStructuralFeatures().get(2); + } + /** * * @@ -3976,11 +3994,13 @@ public void createPackageContents() { createEAttribute(rapUploadFileEClass, RAP_UPLOAD_FILE__PATH); uiHierarchyResponseEClass = createEClass(UI_HIERARCHY_RESPONSE); - createEReference(uiHierarchyResponseEClass, UI_HIERARCHY_RESPONSE__UI_ELEMENTS); + createEReference(uiHierarchyResponseEClass, UI_HIERARCHY_RESPONSE__CHILREN); + createEReference(uiHierarchyResponseEClass, UI_HIERARCHY_RESPONSE__UI_ELEMENT); uiElementEClass = createEClass(UI_ELEMENT); createEAttribute(uiElementEClass, UI_ELEMENT__HAS_CHILDREN); createEAttribute(uiElementEClass, UI_ELEMENT__NAME); + createEAttribute(uiElementEClass, UI_ELEMENT__GENERATION_KIND); // Create enums swtDialogKindEEnum = createEEnum(SWT_DIALOG_KIND); @@ -4513,11 +4533,13 @@ public void initializePackageContents() { initEAttribute(getRapUploadFile_Path(), theEcorePackage.getEString(), "path", null, 0, 1, RapUploadFile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(uiHierarchyResponseEClass, UIHierarchyResponse.class, "UIHierarchyResponse", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getUIHierarchyResponse_UiElements(), this.getUIElement(), null, "uiElements", null, 0, -1, UIHierarchyResponse.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getUIHierarchyResponse_Chilren(), this.getUIElement(), null, "chilren", null, 0, -1, UIHierarchyResponse.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getUIHierarchyResponse_UiElement(), this.getUIElement(), null, "uiElement", null, 0, 1, UIHierarchyResponse.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(uiElementEClass, UIElement.class, "UIElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getUIElement_HasChildren(), theEcorePackage.getEBoolean(), "hasChildren", null, 0, 1, UIElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getUIElement_Name(), theEcorePackage.getEString(), "name", null, 0, 1, UIElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getUIElement_GenerationKind(), theEcorePackage.getEString(), "generationKind", null, 0, 1, UIElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); // Initialize enums and add enum literals initEEnum(swtDialogKindEEnum, SWTDialogKind.class, "SWTDialogKind"); diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIElementImpl.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIElementImpl.java index a399a242c..7a59daf70 100644 --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIElementImpl.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIElementImpl.java @@ -23,6 +23,7 @@ *
    *
  • {@link org.eclipse.rcptt.tesla.core.protocol.impl.UIElementImpl#isHasChildren Has Children}
  • *
  • {@link org.eclipse.rcptt.tesla.core.protocol.impl.UIElementImpl#getName Name}
  • + *
  • {@link org.eclipse.rcptt.tesla.core.protocol.impl.UIElementImpl#getGenerationKind Generation Kind}
  • *
* * @generated @@ -68,6 +69,26 @@ public class UIElementImpl extends ElementImpl implements UIElement { */ protected String name = NAME_EDEFAULT; + /** + * The default value of the '{@link #getGenerationKind() Generation Kind}' attribute. + * + * + * @see #getGenerationKind() + * @generated + * @ordered + */ + protected static final String GENERATION_KIND_EDEFAULT = null; + + /** + * The cached value of the '{@link #getGenerationKind() Generation Kind}' attribute. + * + * + * @see #getGenerationKind() + * @generated + * @ordered + */ + protected String generationKind = GENERATION_KIND_EDEFAULT; + /** * * @@ -129,6 +150,27 @@ public void setName(String newName) { eNotify(new ENotificationImpl(this, Notification.SET, ProtocolPackage.UI_ELEMENT__NAME, oldName, name)); } + /** + * + * + * @generated + */ + public String getGenerationKind() { + return generationKind; + } + + /** + * + * + * @generated + */ + public void setGenerationKind(String newGenerationKind) { + String oldGenerationKind = generationKind; + generationKind = newGenerationKind; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProtocolPackage.UI_ELEMENT__GENERATION_KIND, oldGenerationKind, generationKind)); + } + /** * * @@ -141,6 +183,8 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { return isHasChildren(); case ProtocolPackage.UI_ELEMENT__NAME: return getName(); + case ProtocolPackage.UI_ELEMENT__GENERATION_KIND: + return getGenerationKind(); } return super.eGet(featureID, resolve, coreType); } @@ -159,6 +203,9 @@ public void eSet(int featureID, Object newValue) { case ProtocolPackage.UI_ELEMENT__NAME: setName((String)newValue); return; + case ProtocolPackage.UI_ELEMENT__GENERATION_KIND: + setGenerationKind((String)newValue); + return; } super.eSet(featureID, newValue); } @@ -177,6 +224,9 @@ public void eUnset(int featureID) { case ProtocolPackage.UI_ELEMENT__NAME: setName(NAME_EDEFAULT); return; + case ProtocolPackage.UI_ELEMENT__GENERATION_KIND: + setGenerationKind(GENERATION_KIND_EDEFAULT); + return; } super.eUnset(featureID); } @@ -193,6 +243,8 @@ public boolean eIsSet(int featureID) { return hasChildren != HAS_CHILDREN_EDEFAULT; case ProtocolPackage.UI_ELEMENT__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case ProtocolPackage.UI_ELEMENT__GENERATION_KIND: + return GENERATION_KIND_EDEFAULT == null ? generationKind != null : !GENERATION_KIND_EDEFAULT.equals(generationKind); } return super.eIsSet(featureID); } @@ -211,6 +263,8 @@ public String toString() { result.append(hasChildren); result.append(", name: "); result.append(name); + result.append(", generationKind: "); + result.append(generationKind); result.append(')'); return result.toString(); } diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIHierarchyResponseImpl.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIHierarchyResponseImpl.java index 3311a596a..1faa4c787 100644 --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIHierarchyResponseImpl.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIHierarchyResponseImpl.java @@ -4,10 +4,13 @@ import java.util.Collection; +import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.util.EObjectResolvingEList; import org.eclipse.rcptt.tesla.core.protocol.ProtocolPackage; @@ -24,22 +27,31 @@ * The following features are implemented: *

*
    - *
  • {@link org.eclipse.rcptt.tesla.core.protocol.impl.UIHierarchyResponseImpl#getUiElements Ui Elements}
  • + *
  • {@link org.eclipse.rcptt.tesla.core.protocol.impl.UIHierarchyResponseImpl#getChilren Chilren}
  • + *
  • {@link org.eclipse.rcptt.tesla.core.protocol.impl.UIHierarchyResponseImpl#getUiElement Ui Element}
  • *
* * @generated */ public class UIHierarchyResponseImpl extends ResponseImpl implements UIHierarchyResponse { /** - * The cached value of the '{@link #getUiElements() Ui Elements}' reference list. + * The cached value of the '{@link #getChilren() Chilren}' reference list. * * - * @see #getUiElements() + * @see #getChilren() * @generated * @ordered */ - protected EList uiElements; - + protected EList chilren; + /** + * The cached value of the '{@link #getUiElement() Ui Element}' reference. + * + * + * @see #getUiElement() + * @generated + * @ordered + */ + protected UIElement uiElement; /** * * @@ -64,11 +76,49 @@ protected EClass eStaticClass() { * * @generated */ - public EList getUiElements() { - if (uiElements == null) { - uiElements = new EObjectResolvingEList(UIElement.class, this, ProtocolPackage.UI_HIERARCHY_RESPONSE__UI_ELEMENTS); + public EList getChilren() { + if (chilren == null) { + chilren = new EObjectResolvingEList(UIElement.class, this, ProtocolPackage.UI_HIERARCHY_RESPONSE__CHILREN); + } + return chilren; + } + + /** + * + * + * @generated + */ + public UIElement getUiElement() { + if (uiElement != null && uiElement.eIsProxy()) { + InternalEObject oldUiElement = (InternalEObject)uiElement; + uiElement = (UIElement)eResolveProxy(oldUiElement); + if (uiElement != oldUiElement) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProtocolPackage.UI_HIERARCHY_RESPONSE__UI_ELEMENT, oldUiElement, uiElement)); + } } - return uiElements; + return uiElement; + } + + /** + * + * + * @generated + */ + public UIElement basicGetUiElement() { + return uiElement; + } + + /** + * + * + * @generated + */ + public void setUiElement(UIElement newUiElement) { + UIElement oldUiElement = uiElement; + uiElement = newUiElement; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProtocolPackage.UI_HIERARCHY_RESPONSE__UI_ELEMENT, oldUiElement, uiElement)); } /** @@ -79,8 +129,11 @@ public EList getUiElements() { @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case ProtocolPackage.UI_HIERARCHY_RESPONSE__UI_ELEMENTS: - return getUiElements(); + case ProtocolPackage.UI_HIERARCHY_RESPONSE__CHILREN: + return getChilren(); + case ProtocolPackage.UI_HIERARCHY_RESPONSE__UI_ELEMENT: + if (resolve) return getUiElement(); + return basicGetUiElement(); } return super.eGet(featureID, resolve, coreType); } @@ -94,9 +147,12 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case ProtocolPackage.UI_HIERARCHY_RESPONSE__UI_ELEMENTS: - getUiElements().clear(); - getUiElements().addAll((Collection)newValue); + case ProtocolPackage.UI_HIERARCHY_RESPONSE__CHILREN: + getChilren().clear(); + getChilren().addAll((Collection)newValue); + return; + case ProtocolPackage.UI_HIERARCHY_RESPONSE__UI_ELEMENT: + setUiElement((UIElement)newValue); return; } super.eSet(featureID, newValue); @@ -110,8 +166,11 @@ public void eSet(int featureID, Object newValue) { @Override public void eUnset(int featureID) { switch (featureID) { - case ProtocolPackage.UI_HIERARCHY_RESPONSE__UI_ELEMENTS: - getUiElements().clear(); + case ProtocolPackage.UI_HIERARCHY_RESPONSE__CHILREN: + getChilren().clear(); + return; + case ProtocolPackage.UI_HIERARCHY_RESPONSE__UI_ELEMENT: + setUiElement((UIElement)null); return; } super.eUnset(featureID); @@ -125,8 +184,10 @@ public void eUnset(int featureID) { @Override public boolean eIsSet(int featureID) { switch (featureID) { - case ProtocolPackage.UI_HIERARCHY_RESPONSE__UI_ELEMENTS: - return uiElements != null && !uiElements.isEmpty(); + case ProtocolPackage.UI_HIERARCHY_RESPONSE__CHILREN: + return chilren != null && !chilren.isEmpty(); + case ProtocolPackage.UI_HIERARCHY_RESPONSE__UI_ELEMENT: + return uiElement != null; } return super.eIsSet(featureID); } diff --git a/core/org.eclipse.rcptt.tesla.core/models/protocol.ecore b/core/org.eclipse.rcptt.tesla.core/models/protocol.ecore index dc0ba6ab8..201c08605 100755 --- a/core/org.eclipse.rcptt.tesla.core/models/protocol.ecore +++ b/core/org.eclipse.rcptt.tesla.core/models/protocol.ecore @@ -445,11 +445,13 @@
- + + diff --git a/rcp/org.eclipse.rcptt.ui/icons/panel/tree.gif b/rcp/org.eclipse.rcptt.ui/icons/panel/tree.gif new file mode 100644 index 0000000000000000000000000000000000000000..bac72b53937044a7fe58522353acd30797775861 GIT binary patch literal 1031 zcmbW0RZlAh07j8AiWh?0O>qjtZMeG>hHG#OPJ!S$ip#}qxDJEah=`b&n1qCc zl$4Z=jEtO|oPvS^1Oib~Qc_V-QBzaX(9qD*($dk<(bLm2FfcGOGBPnSF*7r>u&}VQ zvVQya4Gadev9YnUvvY88aB^~TadB~TbMx@<@bdCPAP_!2K7M|F0RaI)K|vuQAz@)* z5fKqlQBg55F>!Hm2?+^FNl7UwDQRhG85tQ_Sy?$bIeB?`1qB5~MMWhgC1qu06%`d# zRaG@LH4P07O-)TLEiG+rZ5P3V`F1$Yinm`XK!!s;Nals=;-9+gwj^=I-w9 z;o;%w>FMR=+9#|=kMBeM3V-V`F1eQ&V$ub4yE0Yiny;TU&d3dq+n{XJ=_ ze*r&B{x5%hLJ^3;0h3XwLZRhxKnn6$fF>F#hh?=N`2n|<^4%M3kUEP_K75$_DcLAK3`6tuAL3 zgnwzTELI{5{GAv5cfc{K86Tj%_-ChtS(yzVaHSlEnJMgqQywDvu)m=D*-+GZo>maU zY)mSHXk*NZ-z)p26~b#nQ@{8xDyXz?IF37|>ACiA{NFj0wx)hqv%>0EYpO^DN~9I} j*U|fNYV^DiY$H5K%oH^D&k%uEm3lwY?{FIr4@c%dWx&x{ literal 0 HcmV?d00001 diff --git a/rcp/org.eclipse.rcptt.ui/plugin.xml b/rcp/org.eclipse.rcptt.ui/plugin.xml index f56bd840a..ac21d85ee 100644 --- a/rcp/org.eclipse.rcptt.ui/plugin.xml +++ b/rcp/org.eclipse.rcptt.ui/plugin.xml @@ -1130,4 +1130,14 @@ + + + + + + + diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/Images.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/Images.java index fcc2bddce..f88f411a3 100644 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/Images.java +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/Images.java @@ -88,6 +88,7 @@ public class Images { public static final String PANEL_DESELECT_ALL_DISABLED = PREFIX + "panel/d-deselectall.gif"; //$NON-NLS-1$ public static final String PANEL_FILTER = PREFIX + "panel/filter.gif"; //$NON-NLS-1$ + public static final String TREE_VISIBLE = PREFIX + "panel/tree.gif"; //$NON-NLS-1$ // // Preferences diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/Messages.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/Messages.java index 191a7efa3..5db6d2bad 100755 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/Messages.java +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/Messages.java @@ -33,6 +33,7 @@ public class Messages extends NLS { public static String AssertionPanelWindow_AddAssertButton; public static String AssertionPanelWindow_AssertImageButton; public static String AssertionPanelWindow_CloseActionName; + public static String AssertionPanelWindow_TreeVisibleToolTip; public static String AssertionPanelWindow_CollapseAllActionToolTip; public static String AssertionPanelWindow_ColumnOperationName; public static String AssertionPanelWindow_ColumnOperationToolTip; diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/messages.properties b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/messages.properties index 88b0a062d..7bf71b116 100755 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/messages.properties +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/messages.properties @@ -22,8 +22,8 @@ AssertImageWindow_TextLabel=Text: AssertImageWindow_Tilte=Add Image Assertion AssertImageWindow_TypeLabel=Type: AssertionAUTControlsHierarchyDialog_Title=AssertionAUTControlsHierarchyDialog -AssertionAUTControlsHierarchyDialog_ColumnNameName=Name -AssertionAUTControlsHierarchyDialog_ColumnNameToolTip=Control name +AssertionAUTControlsHierarchyDialog_ColumnNameName=Controls hierarchy +AssertionAUTControlsHierarchyDialog_ColumnNameToolTip=AUT controls hierarchy AssertionPanelWindow_AddAssertButton=Add AssertionPanelWindow_AssertImageButton=Assert Image AssertionPanelWindow_CloseActionName=Close @@ -31,6 +31,7 @@ AssertionPanelWindow_CollapseAllActionToolTip=Collapse All AssertionPanelWindow_ColumnOperationName=Operation AssertionPanelWindow_ColumnOperationToolTip=Assertion operation AssertionPanelWindow_ColumnPropertyName=Property +AssertionPanelWindow_TreeVisibleToolTip=Show/hide controls hierarchy AssertionPanelWindow_ColumnPropertyToolTip=Control property to assert AssertionPanelWindow_DeselectAllActionToolTip=Deselect All AssertionPanelWindow_ExpandAllActionToolTip=Expand All diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AUTControlsHierarchyView.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AUTControlsHierarchyView.java new file mode 100644 index 000000000..601397f15 --- /dev/null +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AUTControlsHierarchyView.java @@ -0,0 +1,265 @@ +package org.eclipse.rcptt.ui.panels.assertion; + +import java.util.Iterator; +import java.util.Objects; +import java.util.Stack; +import java.util.concurrent.atomic.AtomicBoolean; + +import org.eclipse.core.runtime.jobs.IJobChangeEvent; +import org.eclipse.core.runtime.jobs.IJobChangeListener; +import org.eclipse.jface.layout.TreeColumnLayout; +import org.eclipse.jface.viewers.ColumnLabelProvider; +import org.eclipse.jface.viewers.ColumnWeightData; +import org.eclipse.jface.viewers.DoubleClickEvent; +import org.eclipse.jface.viewers.IDoubleClickListener; +import org.eclipse.jface.viewers.IElementComparer; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.viewers.TreeViewerColumn; +import org.eclipse.rcptt.internal.ui.Messages; +import org.eclipse.rcptt.launching.AutLaunch; +import org.eclipse.rcptt.tesla.core.protocol.ProtocolFactory; +import org.eclipse.rcptt.tesla.core.protocol.UIElement; +import org.eclipse.rcptt.tesla.core.protocol.raw.Element; +import org.eclipse.rcptt.ui.panels.assertion.tree.AssertionTreeContentProvider; +import org.eclipse.rcptt.ui.panels.assertion.tree.AssertionTreeLabelProvider; +import org.eclipse.rcptt.ui.panels.assertion.tree.AssertionTreeModel; +import org.eclipse.rcptt.ui.panels.assertion.tree.AssertionTreeViewer; +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Tree; + +public class AUTControlsHierarchyView { + + /** + * The ID of the view as specified by the extension. + */ + public static final String ID = "org.eclipse.rcptt.ui.panels.assertion.AUTControlsHierarchyView"; //$NON-NLS-1$ + + private final AutLaunch aut; + + private AssertionTreeViewer viewer; + + private boolean isUpdated = false; + + private AssertionTreeContentProvider contentProvider; + + private Stack parentsStack; + + private IJobChangeListener listener; + + private AtomicBoolean canExpanding = new AtomicBoolean(false); + + public AUTControlsHierarchyView(AutLaunch aut) { + this.aut = aut; + } + + public void createPartControl(Composite parent) { + + final Composite treeComposite = new Composite(parent, SWT.NONE); + final TreeColumnLayout layout = new TreeColumnLayout(); + treeComposite.setLayout(layout); + treeComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + final Tree tree = new Tree(treeComposite, SWT.BORDER | SWT.FULL_SELECTION); + tree.setHeaderVisible(true); + + viewer = new AssertionTreeViewer(tree); + + viewer.setComparer(new IElementComparer() { + @Override + public int hashCode(Object element) { + if (element instanceof AssertionTreeModel) { + AssertionTreeModel model = (AssertionTreeModel) element; + return model.getUIElement().getId().hashCode(); + } + return element.hashCode(); + } + + @Override + public boolean equals(Object a, Object b) { + if (a instanceof AssertionTreeModel && b instanceof AssertionTreeModel) { + AssertionTreeModel model1 = (AssertionTreeModel) a; + AssertionTreeModel model2 = (AssertionTreeModel) b; + if (model1.getUIElement() == null || model2.getUIElement() == null) { + return model1.getUIElement() == model2.getUIElement(); + } + if (model1.getUIElement().getId() == null || model2.getUIElement().getId() == null) { + return model1.getUIElement().getId() == model2.getUIElement().getId(); + } + return model1.getUIElement().getId().equals(model2.getUIElement().getId()); + } + return Objects.equals(a, b); + } + }); + + layout.setColumnData(createNameColumn().getColumn(), new ColumnWeightData(10)); + + contentProvider = new AssertionTreeContentProvider(); + + viewer.setContentProvider(contentProvider); + viewer.setLabelProvider(new AssertionTreeLabelProvider()); + + viewer.addSelectionChangedListener(new ISelectionChangedListener() { + public void selectionChanged(SelectionChangedEvent event) { + if (event.getSelection() instanceof IStructuredSelection) { + IStructuredSelection selection = (IStructuredSelection) event.getSelection(); + for (Iterator iterator = selection.iterator(); iterator.hasNext();) { + + Object object = iterator.next(); + + if (object instanceof AssertionTreeModel) { + AssertionTreeModel model = (AssertionTreeModel) object; + + UIHierarchyResponseUtilities.highlightWidget(getAut(), model.getUIElement()); + UIHierarchyResponseUtilities.updateAssertionPanelWindow(getAut(), model.getUIElement()); + + isUpdated = true; + } + } + } + } + }); + + viewer.addDoubleClickListener(new IDoubleClickListener() { + public void doubleClick(DoubleClickEvent event) { + if (event.getSelection() instanceof IStructuredSelection) { + IStructuredSelection selection = (IStructuredSelection) event.getSelection(); + for (Iterator iterator = selection.iterator(); iterator.hasNext();) { + + Object object = iterator.next(); + + if (object instanceof AssertionTreeModel) { + AssertionTreeModel model = (AssertionTreeModel) object; + viewer.setExpandedState(model, !viewer.getExpandedState(model)); + } + } + } + } + }); + + AssertionTreeModel input = new AssertionTreeModel(aut, + UIHierarchyResponseUtilities.getUIHierarchyElement(aut, null).getUiElement()); + viewer.setInput(input); + + listener = new IJobChangeListener() { + @Override + public void aboutToRun(IJobChangeEvent event) { + } + + @Override + public void awake(IJobChangeEvent event) { + } + + @Override + public void done(IJobChangeEvent event) { + if (!canExpanding.get()) { + canExpanding.set(true); + } + if (null != parentsStack && !parentsStack.isEmpty()) { + expand(parentsStack.pop()); + } + } + + @Override + public void running(IJobChangeEvent event) { + } + + @Override + public void scheduled(IJobChangeEvent event) { + } + + @Override + public void sleeping(IJobChangeEvent event) { + } + }; + contentProvider.addUpdateCompleteListener(listener); + + } + + protected TreeViewerColumn createNameColumn() { + final TreeViewerColumn column = new TreeViewerColumn(viewer, SWT.NONE); + column.getColumn().setText(Messages.AssertionAUTControlsHierarchyDialog_ColumnNameName); + column.getColumn().setToolTipText(Messages.AssertionAUTControlsHierarchyDialog_ColumnNameToolTip); + column.setLabelProvider(new ColumnLabelProvider() { + @Override + public String getText(Object object) { + if (object instanceof UIElement) { + UIElement uiElement = (UIElement) object; + return UIHierarchyResponseUtilities.getUIElementCaption(uiElement); + } + return null; + } + }); + return column; + } + + public void setFocus() { + viewer.getControl().setFocus(); + } + + public AutLaunch getAut() { + return this.aut; + } + + public void expandToElement(Element element) { + if (isUpdated) { + isUpdated = false; + return; + } + + UIElement uiElement = ProtocolFactory.eINSTANCE.createUIElement(); + + uiElement.setId(element.getId()); + uiElement.setKind(element.getKind()); + + uiElement = UIHierarchyResponseUtilities.getUIHierarchyElement(aut, uiElement).getUiElement(); + + AssertionTreeModel model = new AssertionTreeModel(getAut(), uiElement); + + parentsStack = new Stack(); + parentsStack.push(model); + setParentsForExpand(model, parentsStack); + + if (canExpanding.get()) { + expand(parentsStack.pop()); + } + } + + private void expand(AssertionTreeModel model) { + if (parentsStack.empty()) { + viewer.setSelection(new StructuredSelection(model), true); + } else { + viewer.setExpandedState(model, true); + } + } + + private void setParentsForExpand(AssertionTreeModel model, Stack parents) { + if (null == model || null == model.getUIElement()) { + return; + } + + AssertionTreeModel parent = (AssertionTreeModel) model.getParent(); + if (null == parent || null == parent.getUIElement()) { + return; + } + + if (!viewer.isItemExists(parent)) { + parents.push(parent); + setParentsForExpand(parent, parents); + return; + } + + if (!viewer.isItemExists(model)) { + parents.push(parent); + setParentsForExpand(parent, parents); + } + + if (!viewer.getExpandedState(parent)) { + viewer.setExpandedState(parent, true); + } + } +} \ No newline at end of file diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionAUTControlsHierarchyDialog.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionAUTControlsHierarchyDialog.java deleted file mode 100644 index 37054300b..000000000 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionAUTControlsHierarchyDialog.java +++ /dev/null @@ -1,336 +0,0 @@ -package org.eclipse.rcptt.ui.panels.assertion; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.eclipse.jface.action.Action; -import org.eclipse.jface.action.MenuManager; -import org.eclipse.jface.dialogs.TrayDialog; -import org.eclipse.jface.layout.GridLayoutFactory; -import org.eclipse.jface.layout.TreeColumnLayout; -import org.eclipse.jface.viewers.ColumnLabelProvider; -import org.eclipse.jface.viewers.ColumnWeightData; -import org.eclipse.jface.viewers.ISelectionChangedListener; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.ITreeContentProvider; -import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.jface.viewers.TreeViewer; -import org.eclipse.jface.viewers.TreeViewerColumn; -import org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy; -import org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState; -import org.eclipse.rcptt.core.ecl.core.model.Q7CoreFactory; -import org.eclipse.rcptt.internal.ui.Messages; -import org.eclipse.rcptt.internal.ui.Q7UIPlugin; -import org.eclipse.rcptt.launching.AutLaunch; -import org.eclipse.rcptt.tesla.core.protocol.ProtocolFactory; -import org.eclipse.rcptt.tesla.core.protocol.UIElement; -import org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse; -import org.eclipse.rcptt.ui.panels.MenuToolbar; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Monitor; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Tree; - -// TODO: other package - -public class AssertionAUTControlsHierarchyDialog extends TrayDialog { - - private final AutLaunch aut; - - private final Shell parentShell; - - private Composite treeViewerComposite = null; - - private TreeViewer viewer; - - private AUTControlsHierarchyContentProvider contentProvider = null; - - public AssertionAUTControlsHierarchyDialog(AutLaunch aut, Shell parentShell) { - super(parentShell); - this.aut = aut; - this.parentShell = parentShell; - setShellStyle(SWT.RESIZE | SWT.CLOSE); - contentProvider = new AUTControlsHierarchyContentProvider(this.aut); - } - - class AUTControlsHierarchyContentProvider implements ITreeContentProvider { - - private final AutLaunch aut; - - // - private Map hierarchy = new HashMap(); - - // - private Map uiElementsMap = new HashMap(); - - public AUTControlsHierarchyContentProvider(AutLaunch aut) { - this.aut = aut; - } - - @Override - public Object[] getElements(Object inputElement) { - if (!(inputElement instanceof UIElement)) { - return null; - } - - UIElement uiElement = (UIElement) inputElement; - UIElement[] uiElements = getUIElements(uiElementsMap.get(hierarchy.get(uiElement.getId()))); - - List list = new ArrayList(Arrays.asList(uiElements)); - list.remove(inputElement); - - uiElements = list.toArray(uiElements); - - return (UIElement[]) list.toArray(new UIElement[list.size()]); - } - - @Override - public Object[] getChildren(Object parentElement) { - if (!(parentElement instanceof UIElement)) { - return null; - } - UIElement uiElement = (UIElement) parentElement; - return getUIElements(uiElement); - } - - @Override - public Object getParent(Object element) { - if (!(element instanceof UIElement)) { - return null; - } - UIElement uiElement = (UIElement) element; - return hierarchy.get(uiElement.getId()); - } - - @Override - public boolean hasChildren(Object element) { - if (!(element instanceof UIElement)) { - return false; - } - UIElement uiElement = (UIElement) element; - return uiElement.isHasChildren(); - } - - public void clear() { - hierarchy.clear(); - uiElementsMap.clear(); - - AssertionAUTControlsHierarchy assertionAUTControlsHierarchy = Q7CoreFactory.eINSTANCE - .createAssertionAUTControlsHierarchy(); - - assertionAUTControlsHierarchy.setState(AssertionAUTControlsHierarchyState.CLEAR); - - try { - this.aut.execute(assertionAUTControlsHierarchy); - } catch (Exception e) { - Q7UIPlugin.log(e); - } - } - - public UIElement[] getUIElements(UIElement parent) { - List list = new ArrayList(); - - AssertionAUTControlsHierarchy assertionAUTControlsHierarchy = Q7CoreFactory.eINSTANCE - .createAssertionAUTControlsHierarchy(); - - if (null == parent) { - assertionAUTControlsHierarchy.setState(AssertionAUTControlsHierarchyState.GET_ROOT); - } else { - assertionAUTControlsHierarchy.setState(AssertionAUTControlsHierarchyState.GET_NODE); - assertionAUTControlsHierarchy.setId(parent.getId()); - } - - try { - Object childAUTObject = this.aut.execute(assertionAUTControlsHierarchy); - if (childAUTObject instanceof UIHierarchyResponse) { - UIHierarchyResponse response = (UIHierarchyResponse) childAUTObject; - - for (UIElement uiElement : response.getUiElements()) { - - if (null == parent) { - hierarchy.put(uiElement.getId(), "-1"); - } else { - hierarchy.put(uiElement.getId(), parent.getId()); - } - - uiElementsMap.put(uiElement.getId(), uiElement); - - System.out.println(uiElement.getId()); - System.out.println(uiElement.getKind()); - System.out.println(uiElement.isHasChildren()); - - list.add(uiElement); - } - } - } catch (Exception e) { - Q7UIPlugin.log(e); - } - - return (UIElement[]) list.toArray(new UIElement[list.size()]); - } - } - - @Override - public boolean close() { - contentProvider.clear(); - return super.close(); - } - - @Override - protected Shell getParentShell() { - return parentShell; - } - - @Override - protected Control createContents(Composite parent) { - initializeDialogUnits(parent); - final Composite composite = new Composite(parent, SWT.NONE); - composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); - composite.setLayout(new GridLayout()); - - final Composite toolbarComposite = new Composite(composite, SWT.NONE); - GridLayoutFactory.fillDefaults().numColumns(2).applyTo(toolbarComposite); - toolbarComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - - final MenuToolbar menu = new MenuToolbar() { - @Override - protected void fill(MenuManager manager) { - manager.add(new Action(Messages.AssertionPanelWindow_CloseActionName) { - @Override - public void run() { - close(); - } - }); - }; - }; - - menu.create(toolbarComposite).setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false)); - - createTreeViewer(composite).setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); - - UIElement el = ProtocolFactory.eINSTANCE.createUIElement(); - el.setId("-1"); - el.setKind("root"); - el.setDescription("root"); - el.setHasChildren(true); - - viewer.setInput(el); - - return composite; - } - - @Override - protected void configureShell(Shell newShell) { - super.configureShell(newShell); - newShell.setText(Messages.AssertionAUTControlsHierarchyDialog_Title); - newShell.setLayout(new FillLayout()); - GridLayoutFactory.fillDefaults().equalWidth(true).spacing(0, 0).margins(0, 0).applyTo(newShell); - } - - @Override - protected Point getInitialSize() { - Rectangle bounds = getShell().getDisplay().getBounds(); - int height = bounds.height / 2 - bounds.height / 10; - return new Point(450, height); - } - - protected TreeViewerColumn createNameColumn() { - final TreeViewerColumn column = new TreeViewerColumn(viewer, SWT.NONE); - column.getColumn().setText(Messages.AssertionAUTControlsHierarchyDialog_ColumnNameName); - column.getColumn().setToolTipText(Messages.AssertionAUTControlsHierarchyDialog_ColumnNameToolTip); - column.setLabelProvider(new ColumnLabelProvider() { - @Override - public String getText(Object element) { - if (element instanceof UIElement) { - UIElement uiElement = (UIElement) element; - if (null == uiElement.getName()) { - return uiElement.getKind() + " (" + uiElement.getDescription() + ")"; - } - return uiElement.getKind() + " : " + uiElement.getName() + " (" + uiElement.getDescription() + ")"; - } - return null; - } - }); - return column; - } - - protected Rectangle getDisplayBounds(Point loc) { - Monitor[] ms = getShell().getDisplay().getMonitors(); - if (ms.length > 1) { - Rectangle tmp; - for (int i = 0; i < ms.length; i++) { - tmp = ms[i].getBounds(); - if (tmp.contains(loc)) { - return tmp; - } - } - } - return getShell().getDisplay().getBounds(); - } - - protected Control createTreeViewer(Composite parent) { - treeViewerComposite = new Composite(parent, SWT.NONE); - treeViewerComposite.setLayout(new GridLayout()); - - final Composite treeComposite = new Composite(treeViewerComposite, SWT.NONE); - - final TreeColumnLayout layout = new TreeColumnLayout(); - treeComposite.setLayout(layout); - treeComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); - - final Tree tree = new Tree(treeComposite, SWT.BORDER | SWT.FULL_SELECTION); - tree.setHeaderVisible(true); - - viewer = new TreeViewer(tree); - - layout.setColumnData(createNameColumn().getColumn(), new ColumnWeightData(10)); - - viewer.setContentProvider(contentProvider); - - viewer.addSelectionChangedListener(new ISelectionChangedListener() { - public void selectionChanged(SelectionChangedEvent event) { - if (event.getSelection() instanceof IStructuredSelection) { - IStructuredSelection selection = (IStructuredSelection) event.getSelection(); - for (Iterator iterator = selection.iterator(); iterator.hasNext();) { - UIElement uiElement = (UIElement) iterator.next(); - - AssertionAUTControlsHierarchy assertionAUTControlsHierarchy = Q7CoreFactory.eINSTANCE - .createAssertionAUTControlsHierarchy(); - - assertionAUTControlsHierarchy.setState(AssertionAUTControlsHierarchyState.HIGHLIGHT); - assertionAUTControlsHierarchy.setId(uiElement.getId()); - - - try { - getAut().execute(assertionAUTControlsHierarchy); - } catch (Exception e) { - Q7UIPlugin.log(e); - } - - // TODO: open AssertionPanelWindow by doubleclick - - // TODO: add commands recordingSupport - } - } - } - }); - - return treeViewerComposite; - } - - public AutLaunch getAut() { - return this.aut; - } - -} diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java index 7523303a0..c1c7f7c6d 100644 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java @@ -122,6 +122,28 @@ public class AssertionPanelWindow extends Dialog { private final ImageManager imageManager = new ImageManager(); private final WritableValue hasAssert = new WritableValue(false, Boolean.class); + private final RecordingSupport recordingSupport; + private final Shell parentShell; + + private WidgetDetailsDialog widgetDetailsDialog; + private CommandSet commands; + private AssertInput currentInput; + private IObservableSet checkedObservable; + private Button appendButton; + private List collapsed; + private List references; + private CCombo filterCombo; + private Text filterText; + private String filterValue = ""; + + private CheckboxTreeViewer viewer; + private FontMetrics fontMetrics; + + private Composite treeViewerComposite; + private Composite autControlsWidgetComposite; + private GridData autControlsWidgetCompositeGridData; + private AUTControlsHierarchyView autControlsView; + private final IAction collapseAll = new Action() { { setImageDescriptor(Images.getImageDescriptor(Images.PANEL_COLLAPSE_ALL)); @@ -175,19 +197,19 @@ public void run() { }; }; - private final RecordingSupport recordingSupport; - private final Shell parentShell; + private final IAction treeVisible = new Action() { + { + setImageDescriptor(Images.getImageDescriptor(Images.TREE_VISIBLE)); + setToolTipText(Messages.AssertionPanelWindow_TreeVisibleToolTip); + } - private WidgetDetailsDialog widgetDetailsDialog; - private CommandSet commands; - private AssertInput currentInput; - private IObservableSet checkedObservable; - private Button appendButton; - private List collapsed; - private List references; - private CCombo filterCombo; - private Text filterText; - private String filterValue = ""; + @Override + public void run() { + autControlsWidgetComposite.setVisible(autControlsWidgetCompositeGridData.exclude); + autControlsWidgetCompositeGridData.exclude = !autControlsWidgetCompositeGridData.exclude; + autControlsWidgetComposite.getParent().layout(true, true); + }; + }; public AssertionPanelWindow(RecordingSupport recordingSupport, Shell parentShell) { super(parentShell); @@ -325,10 +347,6 @@ protected Point getInitialSize() { } } - private CheckboxTreeViewer viewer; - - private FontMetrics fontMetrics; - protected TreeViewerColumn createPropertyColumn() { final TreeViewerColumn column = new TreeViewerColumn(viewer, SWT.NONE); column.getColumn().setText(Messages.AssertionPanelWindow_ColumnPropertyName); @@ -465,14 +483,18 @@ protected Control createContents(Composite parent) { final Composite composite = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(2).applyTo(composite); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); - - final Composite autControlsWidgetComposite = new Composite(composite, SWT.NONE); + + autControlsWidgetComposite = new Composite(composite, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(2).applyTo(autControlsWidgetComposite); autControlsWidgetComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); - final AssertionAUTControlsHierarchyDialog autControlsWidget = new AssertionAUTControlsHierarchyDialog( - autControlsWidgetComposite, recordingSupport.getAUT()); - autControlsWidget.createContents(); + autControlsWidgetCompositeGridData = new GridData(SWT.FILL, SWT.FILL, true, true); + autControlsWidgetCompositeGridData.exclude = true; + autControlsWidgetComposite.setLayoutData(autControlsWidgetCompositeGridData); + autControlsWidgetComposite.setVisible(false); + + autControlsView = new AUTControlsHierarchyView(recordingSupport.getAUT()); + autControlsView.createPartControl(autControlsWidgetComposite); final Composite assertionComposite = new Composite(composite, SWT.NONE); assertionComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); @@ -490,12 +512,8 @@ protected void fill(ToolBarManager manager) { manager.add(new Separator()); manager.add(expandAll); manager.add(collapseAll); - // if - // ("true".equalsIgnoreCase(Q7Features.getInstance().getValue( - // Q7Features.Q7_IMAGE_ASSERT_SUPPORT))) { - // manager.add(new Separator()); - // manager.add(newImageAssert); - // } + manager.add(new Separator()); + manager.add(treeVisible); dbc.bindValue(Actions.observeEnabled(selectAll), hasAssert); dbc.bindValue(Actions.observeEnabled(deselectAll), hasAssert); @@ -599,8 +617,6 @@ private interface ITreeViewerFilter { public boolean isVisible(AssertImpl object); } - Composite treeViewerComposite = null; - protected Control createTreeViewer(Composite parent) { treeViewerComposite = new Composite(parent, SWT.NONE); treeViewerComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); @@ -1004,6 +1020,9 @@ public void setInput(CommandSet commands) { } else { getShell().setVisible(true); } + + autControlsView.expandToElement(commands.getElement()); + currentInput = createAssertTree(commands); viewer.setInput(currentInput); if (currentInput != null && currentInput.getAsserts() != null && currentInput.getAsserts().size() > 0) { diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/UIHierarchyResponseUtilities.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/UIHierarchyResponseUtilities.java new file mode 100644 index 000000000..9c4146e5f --- /dev/null +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/UIHierarchyResponseUtilities.java @@ -0,0 +1,102 @@ +package org.eclipse.rcptt.ui.panels.assertion; + +import org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy; +import org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState; +import org.eclipse.rcptt.core.ecl.core.model.Q7CoreFactory; +import org.eclipse.rcptt.internal.ui.Q7UIPlugin; +import org.eclipse.rcptt.launching.AutLaunch; +import org.eclipse.rcptt.tesla.core.protocol.UIElement; +import org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse; + +public class UIHierarchyResponseUtilities { + + public static UIHierarchyResponse getUIHierarchyElement(AutLaunch aut, UIElement uiElement) { + + AUTControlsHierarchy assertionAUTControlsHierarchy = Q7CoreFactory.eINSTANCE + .createAUTControlsHierarchy(); + + if (null != uiElement) { + setAUTControlsHierarchyCommandByUIElement(assertionAUTControlsHierarchy, uiElement); + } + + assertionAUTControlsHierarchy.setState(AUTControlsHierarchyState.GET_ELEMENT); + + try { + Object childAUTObject = aut.execute(assertionAUTControlsHierarchy); + if (childAUTObject instanceof UIHierarchyResponse) { + return (UIHierarchyResponse) childAUTObject; + } + } catch (Exception e) { + Q7UIPlugin.log(e); + } + return null; + } + + public static UIHierarchyResponse getUIHierarchyParent(AutLaunch aut, UIElement uiElement) { + + AUTControlsHierarchy assertionAUTControlsHierarchy = Q7CoreFactory.eINSTANCE + .createAUTControlsHierarchy(); + + if (null != uiElement) { + setAUTControlsHierarchyCommandByUIElement(assertionAUTControlsHierarchy, uiElement); + } + + assertionAUTControlsHierarchy.setState(AUTControlsHierarchyState.GET_PARENT); + + try { + Object childAUTObject = aut.execute(assertionAUTControlsHierarchy); + if (childAUTObject instanceof UIHierarchyResponse) { + return (UIHierarchyResponse) childAUTObject; + } + } catch (Exception e) { + Q7UIPlugin.log(e); + } + return null; + } + + public static String getUIElementCaption(UIElement uiElement) { + if (null == uiElement.getName()) { + return uiElement.getKind() + " (" + uiElement.getDescription() + ")"; //$NON-NLS-1$ $NON-NLS-2$ + } + return uiElement.getKind() + " : " + uiElement.getName() + //$NON-NLS-1$ + " (" + uiElement.getDescription() + ")"; //$NON-NLS-1$ $NON-NLS-2$ + } + + public static void highlightWidget(AutLaunch aut, UIElement uiElement) { + + AUTControlsHierarchy assertionAUTControlsHierarchy = Q7CoreFactory.eINSTANCE + .createAUTControlsHierarchy(); + + assertionAUTControlsHierarchy.setState(AUTControlsHierarchyState.HIGHLIGHT_WIDGET); + setAUTControlsHierarchyCommandByUIElement(assertionAUTControlsHierarchy, uiElement); + + try { + aut.execute(assertionAUTControlsHierarchy); + } catch (Exception e) { + Q7UIPlugin.log(e); + } + } + + public static void updateAssertionPanelWindow(AutLaunch aut, UIElement uiElement) { + + AUTControlsHierarchy assertionAUTControlsHierarchy = Q7CoreFactory.eINSTANCE + .createAUTControlsHierarchy(); + + assertionAUTControlsHierarchy.setState(AUTControlsHierarchyState.UPDATE_ASSERT_WINDOW); + setAUTControlsHierarchyCommandByUIElement(assertionAUTControlsHierarchy, uiElement); + + try { + aut.execute(assertionAUTControlsHierarchy); + } catch (Exception e) { + Q7UIPlugin.log(e); + } + } + + public static void setAUTControlsHierarchyCommandByUIElement( + AUTControlsHierarchy autControlsHierarchyCommand, UIElement uiElement) { + + autControlsHierarchyCommand.setId(uiElement.getId()); + autControlsHierarchyCommand.setKind(uiElement.getKind()); + autControlsHierarchyCommand.setDescription(uiElement.getDescription()); + } +} diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeContentProvider.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeContentProvider.java new file mode 100644 index 000000000..06ba8de4e --- /dev/null +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeContentProvider.java @@ -0,0 +1,64 @@ +package org.eclipse.rcptt.ui.panels.assertion.tree; + +import org.eclipse.core.runtime.jobs.IJobChangeListener; +import org.eclipse.jface.viewers.AbstractTreeViewer; +import org.eclipse.jface.viewers.ITreeContentProvider; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.ui.progress.DeferredTreeContentManager; + +public class AssertionTreeContentProvider implements ITreeContentProvider { + + private DeferredTreeContentManager manager = null; + + private Object input = null; + + public AssertionTreeContentProvider() { + } + + public void addUpdateCompleteListener(IJobChangeListener listener) { + manager.addUpdateCompleteListener(listener); + } + + @Override + public void dispose() { + + } + + @Override + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + input = newInput; + manager = new DeferredTreeContentManager((AbstractTreeViewer) viewer); + } + + @Override + public Object[] getElements(Object object) { + return getChildren(object); + } + + @Override + public Object[] getChildren(Object object) { + return manager.getChildren(object); + } + + @Override + public Object getParent(Object object) { + if (object instanceof AssertionTreeModel) { + return input; + } + + AssertionTreeModel model = (AssertionTreeModel) object; + if (null == model || null == model.getUIElement()) { + return input; + } + AssertionTreeModel parent = (AssertionTreeModel) model.getParent(); + if (null == parent || null == parent.getUIElement()) { + return input; + } + return parent; + } + + @Override + public boolean hasChildren(Object object) { + return manager.mayHaveChildren(object); + } +} \ No newline at end of file diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeDefferedAdapter.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeDefferedAdapter.java new file mode 100644 index 000000000..c10faa1a9 --- /dev/null +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeDefferedAdapter.java @@ -0,0 +1,20 @@ +package org.eclipse.rcptt.ui.panels.assertion.tree; + +import org.eclipse.core.runtime.IAdapterFactory; + +public class AssertionTreeDefferedAdapter implements IAdapterFactory { + + @Override + public Object getAdapter(Object adaptableObject, Class adapterType) { + if (adaptableObject instanceof AssertionTreeModel) { + return new AssertionTreeDefferedModel((AssertionTreeModel) adaptableObject); + } + return null; + } + + @Override + public Class[] getAdapterList() { + return new Class[] { AssertionTreeModel.class }; + } + +} diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeDefferedModel.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeDefferedModel.java new file mode 100644 index 000000000..d99e05f28 --- /dev/null +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeDefferedModel.java @@ -0,0 +1,61 @@ +package org.eclipse.rcptt.ui.panels.assertion.tree; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.jobs.ISchedulingRule; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.progress.IDeferredWorkbenchAdapter; +import org.eclipse.ui.progress.IElementCollector; + +public class AssertionTreeDefferedModel implements IDeferredWorkbenchAdapter { + + private final AssertionTreeModel model; + private Object[] cache; + + public AssertionTreeDefferedModel(AssertionTreeModel model) { + this.model = model; + } + + @Override + public Object[] getChildren(Object object) { + return getCheckedChildren(); + } + + @Override + public ImageDescriptor getImageDescriptor(Object object) { + return null; + } + + @Override + public String getLabel(Object object) { + return model.getLabel(); + } + + @Override + public Object getParent(Object object) { + return model.getParent(); + } + + @Override + public void fetchDeferredChildren(Object object, IElementCollector collector, IProgressMonitor monitor) { + Object[] children = getChildren(object); + collector.add(children, monitor); + } + + @Override + public boolean isContainer() { + return getCheckedChildren().length > 0; + } + + @Override + public ISchedulingRule getRule(Object object) { + return null; + } + + private Object[] getCheckedChildren() { + if (cache == null) { + cache = model.getChildren(); + } + return cache; + } + +} \ No newline at end of file diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeLabelProvider.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeLabelProvider.java new file mode 100644 index 000000000..80c85099e --- /dev/null +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeLabelProvider.java @@ -0,0 +1,13 @@ +package org.eclipse.rcptt.ui.panels.assertion.tree; + +import org.eclipse.jface.viewers.LabelProvider; + +public class AssertionTreeLabelProvider extends LabelProvider { + @Override + public String getText(Object object) { + if (object instanceof AssertionTreeModel) { + return ((AssertionTreeModel) object).getLabel(); + } + return super.getText(object); + } +} \ No newline at end of file diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeModel.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeModel.java new file mode 100644 index 000000000..52997b65e --- /dev/null +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeModel.java @@ -0,0 +1,72 @@ +package org.eclipse.rcptt.ui.panels.assertion.tree; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.rcptt.launching.AutLaunch; +import org.eclipse.rcptt.tesla.core.protocol.UIElement; +import org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse; +import org.eclipse.rcptt.ui.panels.assertion.UIHierarchyResponseUtilities; + +public class AssertionTreeModel { + + private final AutLaunch aut; + private final UIElement uiElement; + + public AssertionTreeModel(AutLaunch aut, UIElement uiElement) { + this.aut = aut; + this.uiElement = uiElement; + } + + public UIElement getUIElement() { + return uiElement; + } + + public String getLabel() { + return UIHierarchyResponseUtilities.getUIElementCaption(uiElement); + } + + public Object[] getChildren() { + List list = new ArrayList(); + for (Object object : getChildren(uiElement)) { + list.add(new AssertionTreeModel(aut, (UIElement) object)); + } + return (AssertionTreeModel[]) list.toArray(new AssertionTreeModel[list.size()]); + } + + public Object getParent() { + return new AssertionTreeModel(aut, (UIElement) getParent(uiElement)); + } + + public boolean hasChildren() { + return hasChildren(uiElement); + } + + private Object[] getChildren(Object parent) { + if (!(parent instanceof UIElement)) { + return null; + } + UIHierarchyResponse response = UIHierarchyResponseUtilities.getUIHierarchyElement(aut, (UIElement) parent); + List list = new ArrayList(); + for (UIElement uiElement : response.getChilren()) { + list.add(uiElement); + } + return (UIElement[]) list.toArray(new UIElement[list.size()]); + } + + private Object getParent(Object object) { + if (!(object instanceof UIElement)) { + return null; + } + UIHierarchyResponse response = UIHierarchyResponseUtilities.getUIHierarchyParent(aut, (UIElement) object); + return response.getUiElement(); + } + + private boolean hasChildren(Object object) { + if (!(object instanceof UIElement)) { + return false; + } + UIElement uiElement = (UIElement) object; + return uiElement.isHasChildren(); + } +} \ No newline at end of file diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeViewer.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeViewer.java new file mode 100644 index 000000000..160a0fb55 --- /dev/null +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeViewer.java @@ -0,0 +1,16 @@ +package org.eclipse.rcptt.ui.panels.assertion.tree; + +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.swt.widgets.Tree; + +public class AssertionTreeViewer extends TreeViewer { + + public AssertionTreeViewer(Tree tree) { + super(tree); + } + + public boolean isItemExists(Object object) { + return null != findItem(object); + } + +} diff --git a/runtime/org.eclipse.rcptt.runtime.ui/META-INF/MANIFEST.MF b/runtime/org.eclipse.rcptt.runtime.ui/META-INF/MANIFEST.MF index 23e08ed47..6ccd388a9 100644 --- a/runtime/org.eclipse.rcptt.runtime.ui/META-INF/MANIFEST.MF +++ b/runtime/org.eclipse.rcptt.runtime.ui/META-INF/MANIFEST.MF @@ -25,8 +25,10 @@ Require-Bundle: org.eclipse.ui, org.eclipse.rcptt.tesla.ui.ide.aspects;bundle-version="[2.2.0,3.0.0)", org.eclipse.rcptt.core.launching;bundle-version="[2.2.0,3.0.0)", org.eclipse.rcptt.util;bundle-version="[2.2.0,3.0.0)", - org.eclipse.rcptt.core.swt;bundle-version="[2.2.0,3.0.0)" + org.eclipse.rcptt.core.swt;bundle-version="[2.2.0,3.0.0)", + org.eclipse.rcptt.tesla.recording.aspects.swt;bundle-version="[2.2.0,3.0.0)" Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-ActivationPolicy: lazy Export-Package: org.eclipse.rcptt.internal.runtime.ui, org.eclipse.rcptt.runtime.ui +Import-Package: org.eclipse.rcptt.tesla.recording.core.swt diff --git a/runtime/org.eclipse.rcptt.runtime.ui/plugin.xml b/runtime/org.eclipse.rcptt.runtime.ui/plugin.xml index cfe1f6105..909126970 100755 --- a/runtime/org.eclipse.rcptt.runtime.ui/plugin.xml +++ b/runtime/org.eclipse.rcptt.runtime.ui/plugin.xml @@ -53,8 +53,8 @@ namespace="http://eclipse.org/rcptt/core/ecl"> getParentsList(Display display, SWTUIElement swtuiElement) { + Map references = EclipseWorkbenchProvider.getProvider() + .getWorkbenchReference(SWTUIPlayer.getPlayer(display)); + List parents = SWTUIPlayer.getPlayer(display).collectParents(unwrapWidget(swtuiElement), references); + List elements = new ArrayList(); + for (Widget widget : parents) { + SWTUIElement e = null; + if (references.containsKey(widget)) { + e = references.get(widget); + } else { + e = SWTUIPlayer.getPlayer(display).wrap(widget); + } + if (e != null) { + if (!isGoodKind(e.getKind())) { + continue; + } + if (SWTUIPlayer.getPlayer(display).isVisible(e)) { + elements.add(e); + } + } + } + return elements; + } + + public static SWTUIElement getSWTUIParent(Display display, SWTUIElement uiElement) { + List parentsList = getParentsList(display, uiElement); + if (parentsList.size() > 0) { + return parentsList.get(0); + } + return null; + } + + public static boolean isGoodKind(GenericElementKind kind) { + if (kind.is(ElementKind.Unknown) || kind.is(ElementKind.Editor) || kind.is(ElementKind.View)) { + return false; + } + return true; + } +} diff --git a/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AssertionAUTControlsHierarchyService.java b/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AssertionAUTControlsHierarchyService.java deleted file mode 100644 index d09d5e8f2..000000000 --- a/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AssertionAUTControlsHierarchyService.java +++ /dev/null @@ -1,228 +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.internal.runtime.ui; - -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchy; -import org.eclipse.rcptt.core.ecl.core.model.AssertionAUTControlsHierarchyState; -import org.eclipse.rcptt.ecl.core.Command; -import org.eclipse.rcptt.ecl.runtime.ICommandService; -import org.eclipse.rcptt.ecl.runtime.IProcess; -import org.eclipse.rcptt.tesla.core.protocol.ProtocolFactory; -import org.eclipse.rcptt.tesla.core.protocol.UIElement; -import org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse; -import org.eclipse.rcptt.tesla.internal.ui.player.SWTUIElement; -import org.eclipse.rcptt.tesla.internal.ui.player.SWTUIPlayer; -import org.eclipse.rcptt.tesla.recording.core.swt.SWTAssertManager; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Widget; -import org.eclipse.ui.PlatformUI; - -public class AssertionAUTControlsHierarchyService implements ICommandService { - - private Map widgetsMap = new HashMap(); - - private int lastIndex = 0; - - private IProcess context; - - private Display display; - - public IStatus service(Command command, IProcess context) - throws InterruptedException, CoreException { - - this.context = context; - - AssertionAUTControlsHierarchy assertionAUTControlsHierarchy = (AssertionAUTControlsHierarchy) command; - AssertionAUTControlsHierarchyState state = assertionAUTControlsHierarchy.getState(); - - if (AssertionAUTControlsHierarchyState.CLEAR == state) { - widgetsMap.clear(); - lastIndex = 0; - return Status.OK_STATUS; - } - - if (AssertionAUTControlsHierarchyState.HIGHLIGHT == state) { - - final String id = assertionAUTControlsHierarchy.getId(); - if (!widgetsMap.containsKey(id)) { - return Status.OK_STATUS; - } - - // SWTAssertManager.getDefault().highLightWidget(widgetsMap.get(id)); - // widgetsMap.get(assertionAUTControlsHierarchy.getId()).getDisplay().post(event) - this.display = PlatformUI.getWorkbench().getDisplay(); - // SWTAssertManager.getDefault().callCreateHover(true, - // SWTAssertManager.getDefault().getShell(widgetsMap.get(id))); - final Event event = new Event(); - event.button = 1; - event.x = 500; - event.y = 500; - this.display = PlatformUI.getWorkbench().getDisplay(); - display.syncExec(new Runnable() { - @Override - public void run() { - SWTAssertManager.getDefault().handleEventInFreeze(widgetsMap.get(id), SWT.MouseUp, event); - } - }); - /* - * this.display.syncExec(new Runnable() { - * - * @Override - * public void run() { - * widgetsMap.get(id).notifyListeners(SWT.Selection, new Event()); - * } - * }); - */ - return Status.OK_STATUS; - } - - if (AssertionAUTControlsHierarchyState.HIGHLIGHT == state) { - - final String id = assertionAUTControlsHierarchy.getId(); - if (!widgetsMap.containsKey(id)) { - return Status.OK_STATUS; - } - - SWTAssertManager.getDefault().highLightWidget(widgetsMap.get(id)); - return Status.OK_STATUS; - } - - this.display = PlatformUI.getWorkbench().getDisplay(); - - if (display.isDisposed()) { - // TODO: return new Status(IStatus.ERROR, Activator.getUniqueIdentifier(), Activator.INTERNAL_ERROR, - // "Display disposed", null); - return Status.OK_STATUS; - } - - final Exception[] ex = new Exception[1]; - - final UIHierarchyResponse response = ProtocolFactory.eINSTANCE.createUIHierarchyResponse(); - - if (AssertionAUTControlsHierarchyState.GET_ROOT == state) { - - display.syncExec(new Runnable() { - @Override - public void run() { - SWTUIElement[] swtUIElements = SWTUIPlayer.getPlayer(display).children.collectFor(null, null, - false, null); - - System.out.println("AssertionAUTControlsHierarchyState.GET_ROOT"); - for (SWTUIElement swtUIElement : swtUIElements) { - System.out.println("-------------"); - System.out.println(swtUIElement.getText()); - System.out.println(swtUIElement.getGenerationKind()); - - UIElement uiElement = ProtocolFactory.eINSTANCE.createUIElement(); - - uiElement.setId(String.valueOf(lastIndex)); - uiElement.setKind(swtUIElement.getGenerationKind()); - uiElement.setName(swtUIElement.getText()); - uiElement.setDescription(swtUIElement.widget.getClass().getName()); - - SWTUIElement[] childrenSWTUIElements = SWTUIPlayer.getPlayer(display).children.collectFor( - swtUIElement, null, false, null); - boolean hasChildren = (0 != childrenSWTUIElements.length); - uiElement.setHasChildren(hasChildren); - - addWidgetToMap(swtUIElement.unwrap()); - - response.getUiElements().add(uiElement); - } - - try { - write(response); - } catch (CoreException e) { - e.printStackTrace(); - ex[0] = e; - } - } - }); - - if (null != ex[0]) { - ex[0].printStackTrace(); - } - } - - final String id = assertionAUTControlsHierarchy.getId(); - - if (AssertionAUTControlsHierarchyState.GET_NODE == state) { - if (!widgetsMap.containsKey(id)) { - return Status.OK_STATUS; - } - - display.syncExec(new Runnable() { - @Override - public void run() { - - Object widgetObject = widgetsMap.get(id); - - SWTUIElement[] swtUIElements = SWTUIPlayer.getPlayer(display).children.collectFor( - SWTUIPlayer.getPlayer(display).wrap(widgetObject), null, false, - null); - - System.out.println("AssertionAUTControlsHierarchyState.GET_NODE"); - for (SWTUIElement swtUIElement : swtUIElements) { - System.out.println("-------------"); - System.out.println(swtUIElement.getText()); - System.out.println(swtUIElement.getGenerationKind()); - - UIElement uiElement = ProtocolFactory.eINSTANCE.createUIElement(); - - uiElement.setId(String.valueOf(lastIndex)); - uiElement.setKind(swtUIElement.getGenerationKind()); - uiElement.setName(swtUIElement.getText()); - uiElement.setDescription(swtUIElement.widget.getClass().getName()); - - SWTUIElement[] childrenSWTUIElements = SWTUIPlayer.getPlayer(display).children.collectFor( - swtUIElement, null, false, null); - boolean hasChildren = (0 != childrenSWTUIElements.length); - uiElement.setHasChildren(hasChildren); - - addWidgetToMap(swtUIElement.unwrap()); - - response.getUiElements().add(uiElement); - } - - try { - write(response); - } catch (CoreException e) { - e.printStackTrace(); - ex[0] = e; - } - } - }); - - if (null != ex[0]) { - ex[0].printStackTrace(); - } - } - - return Status.OK_STATUS; - } - - private void write(Object object) throws CoreException { - this.context.getOutput().write(object); - } - - private void addWidgetToMap(Widget widget) { - widgetsMap.put(String.valueOf(lastIndex), widget); - lastIndex++; - } -} diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.swt/src/org/eclipse/rcptt/tesla/recording/aspects/IAssertSWTEventListener.java b/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.swt/src/org/eclipse/rcptt/tesla/recording/aspects/IAssertSWTEventListener.java index 9e9a1973f..e673c17f6 100644 --- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.swt/src/org/eclipse/rcptt/tesla/recording/aspects/IAssertSWTEventListener.java +++ b/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.swt/src/org/eclipse/rcptt/tesla/recording/aspects/IAssertSWTEventListener.java @@ -10,6 +10,8 @@ *******************************************************************************/ package org.eclipse.rcptt.tesla.recording.aspects; +import org.eclipse.rcptt.tesla.core.protocol.raw.Element; +import org.eclipse.rcptt.tesla.internal.ui.player.SWTUIElement; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Widget; @@ -17,4 +19,12 @@ public interface IAssertSWTEventListener extends IAbstractSWTEventListener { public boolean handleEventInFreeze(Widget widget, int type, Event event); + public boolean highlightWidget(Widget widget); + + public boolean updateAssertionPanelWindow(Widget widget); + + public SWTUIElement getSWTUIElement(Element element); + + public Element getElement(SWTUIElement swtUIElement); + } diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.swt/src/org/eclipse/rcptt/tesla/recording/aspects/SWTEventManager.java b/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.swt/src/org/eclipse/rcptt/tesla/recording/aspects/SWTEventManager.java index a814101c4..e6cdca6e3 100644 --- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.swt/src/org/eclipse/rcptt/tesla/recording/aspects/SWTEventManager.java +++ b/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.swt/src/org/eclipse/rcptt/tesla/recording/aspects/SWTEventManager.java @@ -19,6 +19,8 @@ import java.util.Set; import java.util.WeakHashMap; +import org.eclipse.rcptt.tesla.core.protocol.raw.Element; +import org.eclipse.rcptt.tesla.internal.ui.player.SWTUIElement; import org.eclipse.swt.custom.CCombo; import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.widgets.Control; @@ -178,22 +180,42 @@ public static boolean handleEventInFreeze(Widget widget, int type, return finalResult; } - public static boolean selectWidget(Widget widget) { + public static boolean highlightWidget(Widget widget) { boolean finalResult = false; for (IAssertSWTEventListener listener : getListeners(IAssertSWTEventListener.class)) { - finalResult = finalResult || listener.selectWidget(widget); + finalResult = finalResult || listener.highlightWidget(widget); } return finalResult; } - public static boolean openAssertionPanelWindow(Widget widget) { + public static boolean updateAssertionPanelWindow(Widget widget) { boolean finalResult = false; for (IAssertSWTEventListener listener : getListeners(IAssertSWTEventListener.class)) { - finalResult = finalResult || listener.openAssertionPanelWindow(widget); + finalResult = finalResult || listener.updateAssertionPanelWindow(widget); } return finalResult; } + public static SWTUIElement getSWTUIElement(Element element) { + for (IAssertSWTEventListener listener : getListeners(IAssertSWTEventListener.class)) { + SWTUIElement result = listener.getSWTUIElement(element); + if (null != result) { + return result; + } + } + return null; + } + + public static Element getElement(SWTUIElement swtUIElement) { + for (IAssertSWTEventListener listener : getListeners(IAssertSWTEventListener.class)) { + Element result = listener.getElement(swtUIElement); + if (null != result) { + return result; + } + } + return null; + } + public static void recordCombo(CCombo combo) { comboList.add(new WeakReference(combo)); // Remove disposed ones 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 e766f1d27..a5fd1e462 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 @@ -29,3 +29,4 @@ Bundle-ActivationPolicy: lazy Export-Package: org.eclipse.rcptt.tesla.recording.core.swt, org.eclipse.rcptt.tesla.recording.core.swt.peg, org.eclipse.rcptt.tesla.recording.core.swt.util +Import-Package: org.eclipse.rcptt.tesla.ecl.impl diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/SWTAssertManager.java b/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/SWTAssertManager.java index 5c96561a3..c1747a1be 100644 --- a/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/SWTAssertManager.java +++ b/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt/src/org/eclipse/rcptt/tesla/recording/core/swt/SWTAssertManager.java @@ -36,6 +36,8 @@ import org.eclipse.rcptt.tesla.core.protocol.raw.RawFactory; import org.eclipse.rcptt.tesla.core.protocol.raw.SetMode; 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.SWTUIElement; import org.eclipse.rcptt.tesla.internal.ui.player.SWTUIPlayer; import org.eclipse.rcptt.tesla.internal.ui.processors.SWTUIProcessor; import org.eclipse.rcptt.tesla.recording.aspects.IAssertSWTEventListener; @@ -47,7 +49,8 @@ import org.eclipse.rcptt.tesla.recording.core.TeslaRecorder; import org.eclipse.rcptt.tesla.recording.core.swt.util.RecordedEvent; import org.eclipse.rcptt.tesla.swt.events.TeslaEventManager; -import org.eclipse.rcptt.tesla.ui.describers.WidgetDescriber; +import org.eclipse.rcptt.tesla.ui.describers.DescriberManager; +import org.eclipse.rcptt.tesla.ui.describers.IWidgetDescriber; import org.eclipse.rcptt.util.ShellUtilsProvider; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Color; @@ -103,15 +106,6 @@ public class SWTAssertManager implements IRecordingProcessor, private Control beforeFreezeFocus = null; - private static SWTAssertManager swtAssertManager; - - public static SWTAssertManager getDefault() { // thread safely ? - if (null == swtAssertManager) { - swtAssertManager = new SWTAssertManager(); - } - return swtAssertManager; - } - public void clear() { lastFocusedWidget = null; freezedCtrl = null; @@ -494,23 +488,50 @@ public void run() { } } - // TODO: - public synchronized void highLightWidget(final Widget widget) { - try { - // SWTEventManager.setShouldProceed(true); // ? - if (widget != null) { - resetAssertSelection(); - widget.getDisplay().asyncExec(new Runnable() { // async? - public void run() { - synchronized (widget) { - updateHover(widget); - } + public synchronized boolean highlightWidget(final Widget widget) { + if (widget == null || widget.isDisposed()) { + return false; + } + resetAssertSelection(); + + widget.getDisplay().asyncExec(new Runnable() { + public void run() { + synchronized (widget) { + IWidgetDescriber descr = DescriberManager.getDescriber(widget, 0, 0); + if (null == descr.getBounds()) { + return; } - }); + updateHover(descr.getBounds(), descr.getPoint(), true, true); + } } - } finally { - // SWTEventManager.setShouldProceed(false); + }); + return true; + } + + public synchronized SWTUIElement getSWTUIElement(Element element) { + SWTUIElement swtUIElement = SWTRecordingHelper.getHelper().findByElement(element); + return swtUIElement; + } + + public synchronized Element getElement(SWTUIElement swtUIElement) { + FindResult result = null; + result = SWTRecordingHelper.getHelper().getLocator().findElement(swtUIElement, true, false, true); + if (result != null) { + return result.element; + } + return null; + } + + public synchronized boolean updateAssertionPanelWindow(Widget widget) { + if (widget == null || widget.isDisposed()) { + return false; } + + IRecordingDescriber assertDescr = selectAllowedParent(new RecordingWidgetDescriber(widget)); + seachForElement(assertDescr.searchForElement(recorder), true, assertDescr); + freezedCtrl = assertDescr; + + return true; } public boolean isShortcutRequest(Event e, String[] shortcuts) { @@ -542,19 +563,15 @@ private void showPopupMenu(Event event, Control c, "show popup menu for: " + c.getClass().toString()); } Menu menu = null; - player.getEvents().sendEvent(c, SWT.MenuDetect, event.x, event.y, - SWT.BUTTON2); + player.getEvents().sendEvent(c, SWT.MenuDetect, event.x, event.y, SWT.BUTTON2); menu = c.getMenu(); if (menu != null && !menu.isDisposed()) { player.getEvents().sendEvent(menu, SWT.Show); - // menu.setVisible(true); Menu popupMenu = new Menu(getShell(c), SWT.POP_UP); clearPopupMenus(); copyMenuTo(menu, popupMenu); menus.add(popupMenu); popupMenu.setVisible(true); - - // showMenuAt(event, c, menu); } } @@ -658,7 +675,6 @@ private void showMenuAt(Event event, Control c, Menu menu) { Point pos = c.toDisplay(event.x, event.y); Point size = bar.computeSize(SWT.DEFAULT, SWT.DEFAULT); menuShell.setBounds(pos.x, pos.y, size.x + 5, size.y + 5); - // sh.setMenuBar(bar); menuShell.layout(); menuShell.open(); } @@ -744,8 +760,6 @@ private synchronized void updateHover(Rectangle bounds, Point point, region.add(0, bounds.height - p0y, 2, p0y); if (controlEquals) { - // p0x = bounds.width; - // p0y = bounds.height; region.add(0, 0, bounds.width, 2); region.add(0, bounds.height - 2, bounds.width, 2); region.add(0, 0, 2, bounds.height); @@ -761,10 +775,8 @@ private synchronized void updateHover(Rectangle bounds, Point point, selectionShell.setRegion(region); if (!selectionShell.isVisible()) { selectionShell.setVisible(true); - // selectionShell.open(); } selectionShell.redraw(); - // selectionShell.forceActive(); selectionShell.moveAbove(null); selectionShell.setAlpha(127); } @@ -795,37 +807,12 @@ public void run() { } } } - // if (selectionShell != null && value == true) { - // Composite currentParent = selectionShell.getParent(); - // boolean reCreate = false; - // if (currentParent != null) { - // reCreate = !currentParent.equals(parent); - // } else { - // reCreate = (parent != null); - // } - // if (reCreate) { - // selectionShell.dispose(); - // selectionShell = null; - // } - // } if (selectionShell == null && value == true) { - // if (parent != null) { - // selectionShell = new Shell(parent, SWT.NO_TRIM | SWT.ON_TOP | - // SWT.TOOL); - // } else { selectionShell = new Shell(SWT.NO_TRIM | SWT.ON_TOP | SWT.TOOL); - // } - selectionShell.setBackground(selectionShell.getDisplay() .getSystemColor(SWT.COLOR_RED)); selectionShell.setText("Hover"); - // selectionShell.addMouseMoveListener(new MouseMoveListener() { - // public void mouseMove(MouseEvent e) { - // if (freezedCtrl != null && freezedCtrl instanceof Control) { - // ((Control) freezedCtrl).getShell().setFocus(); - // } - // } - // }); + selectionShell.setData("isHover", true); } else if (value == false) { if (selectionShell != null) { selectionShell.dispose(); @@ -834,11 +821,6 @@ public void run() { } } - private synchronized void updateHover(Widget widget) { - WidgetDescriber descr = new WidgetDescriber(widget); - updateHover(descr.getBounds(), descr.getPoint(), true, true); - } - private void updateHoverAccordingTo(IRecordingDescriber descr, int x, int y) { if (selectionShell == null) { @@ -888,6 +870,7 @@ private void seachForElement(Element element, boolean fixed, focus.setElement(EcoreUtil.copy(element)); focus.setPointFixed(fixed); if (fixed) { + // System.out.println("clicked: " + element.getId()); if (TeslaFeatures.isActivityLogging()) { Q7LoggingManager.logMessage(IQ7ActivityLogs.ASSERTIONS, "assert properties of element: "); @@ -920,6 +903,7 @@ public void run() { selectionShell.setBackground(selectionShell.getDisplay() .getSystemColor(SWT.COLOR_RED)); selectionShell.setText("Hover"); + selectionShell.setData("isHover", true); disposeMenuPopups(); clearPopupMenus(); } From b472479b93bac5e89238b4e06e970d57da8c305d Mon Sep 17 00:00:00 2001 From: Evgeny Lipkin Date: Mon, 5 Sep 2016 14:57:15 +0700 Subject: [PATCH 08/18] fixed manifests --- runtime/org.eclipse.rcptt.runtime.ui/META-INF/MANIFEST.MF | 2 -- .../org.eclipse.rcptt.tesla.recording.swt/META-INF/MANIFEST.MF | 1 - 2 files changed, 3 deletions(-) diff --git a/runtime/org.eclipse.rcptt.runtime.ui/META-INF/MANIFEST.MF b/runtime/org.eclipse.rcptt.runtime.ui/META-INF/MANIFEST.MF index 6ccd388a9..4ffbf02a6 100644 --- a/runtime/org.eclipse.rcptt.runtime.ui/META-INF/MANIFEST.MF +++ b/runtime/org.eclipse.rcptt.runtime.ui/META-INF/MANIFEST.MF @@ -14,7 +14,6 @@ Require-Bundle: org.eclipse.ui, org.eclipse.rcptt.tesla.swt;bundle-version="[2.2.0,3.0.0)", org.eclipse.rcptt.tesla.core.am;bundle-version="[2.2.0,3.0.0)", org.eclipse.rcptt.ecl.server.tcp;bundle-version="[2.2.0,3.0.0)", - org.eclipse.rcptt.tesla.swt.aspects;bundle-version="[2.2.0,3.0.0)", org.eclipse.rcptt.reporting;bundle-version="[2.2.0,3.0.0)", org.eclipse.rcptt.ecl.debug.runtime;bundle-version="[2.2.0,3.0.0)", org.eclipse.debug.core;resolution:=optional, @@ -31,4 +30,3 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-ActivationPolicy: lazy Export-Package: org.eclipse.rcptt.internal.runtime.ui, org.eclipse.rcptt.runtime.ui -Import-Package: org.eclipse.rcptt.tesla.recording.core.swt 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 a5fd1e462..e766f1d27 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 @@ -29,4 +29,3 @@ Bundle-ActivationPolicy: lazy Export-Package: org.eclipse.rcptt.tesla.recording.core.swt, org.eclipse.rcptt.tesla.recording.core.swt.peg, org.eclipse.rcptt.tesla.recording.core.swt.util -Import-Package: org.eclipse.rcptt.tesla.ecl.impl From 27b53ad9b10fd484cca852b9c94d6c05e21930ca Mon Sep 17 00:00:00 2001 From: Evgeny Lipkin Date: Tue, 6 Sep 2016 11:34:12 +0700 Subject: [PATCH 09/18] refactored --- .../tesla/core/protocol/ProtocolPackage.java | 16 ++++----- .../core/protocol/UIHierarchyResponse.java | 12 +++---- .../protocol/impl/ProtocolPackageImpl.java | 6 ++-- .../impl/UIHierarchyResponseImpl.java | 34 +++++++++---------- .../models/protocol.ecore | 2 +- .../assertion/tree/AssertionTreeModel.java | 2 +- .../ui/AUTControlsHierarchyUtilities.java | 2 +- 7 files changed, 37 insertions(+), 37 deletions(-) diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolPackage.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolPackage.java index c1f9740ec..fb6d7a700 100755 --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolPackage.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolPackage.java @@ -5558,13 +5558,13 @@ public interface ProtocolPackage extends EPackage { int UI_HIERARCHY_RESPONSE__ADVANCED_INFORMATION = RawPackage.RESPONSE__ADVANCED_INFORMATION; /** - * The feature id for the 'Chilren' reference list. + * The feature id for the 'Children' reference list. * * * @generated * @ordered */ - int UI_HIERARCHY_RESPONSE__CHILREN = RawPackage.RESPONSE_FEATURE_COUNT + 0; + int UI_HIERARCHY_RESPONSE__CHILDREN = RawPackage.RESPONSE_FEATURE_COUNT + 0; /** * The feature id for the 'Ui Element' reference. @@ -8626,15 +8626,15 @@ public interface ProtocolPackage extends EPackage { EClass getUIHierarchyResponse(); /** - * Returns the meta object for the reference list '{@link org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getChilren Chilren}'. + * Returns the meta object for the reference list '{@link org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getChildren Children}'. * * - * @return the meta object for the reference list 'Chilren'. - * @see org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getChilren() + * @return the meta object for the reference list 'Children'. + * @see org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getChildren() * @see #getUIHierarchyResponse() * @generated */ - EReference getUIHierarchyResponse_Chilren(); + EReference getUIHierarchyResponse_Children(); /** * Returns the meta object for the reference '{@link org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getUiElement Ui Element}'. @@ -11179,12 +11179,12 @@ interface Literals { EClass UI_HIERARCHY_RESPONSE = eINSTANCE.getUIHierarchyResponse(); /** - * The meta object literal for the 'Chilren' reference list feature. + * The meta object literal for the 'Children' reference list feature. * * * @generated */ - EReference UI_HIERARCHY_RESPONSE__CHILREN = eINSTANCE.getUIHierarchyResponse_Chilren(); + EReference UI_HIERARCHY_RESPONSE__CHILDREN = eINSTANCE.getUIHierarchyResponse_Children(); /** * The meta object literal for the 'Ui Element' reference feature. diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIHierarchyResponse.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIHierarchyResponse.java index e717785cf..24e69846b 100644 --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIHierarchyResponse.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIHierarchyResponse.java @@ -14,7 +14,7 @@ * The following features are supported: *

*
    - *
  • {@link org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getChilren Chilren}
  • + *
  • {@link org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getChildren Children}
  • *
  • {@link org.eclipse.rcptt.tesla.core.protocol.UIHierarchyResponse#getUiElement Ui Element}
  • *
* @@ -24,20 +24,20 @@ */ public interface UIHierarchyResponse extends Response { /** - * Returns the value of the 'Chilren' reference list. + * Returns the value of the 'Children' reference list. * The list contents are of type {@link org.eclipse.rcptt.tesla.core.protocol.UIElement}. * *

- * If the meaning of the 'Chilren' reference list isn't clear, + * If the meaning of the 'Children' reference list isn't clear, * there really should be more of a description here... *

* - * @return the value of the 'Chilren' reference list. - * @see org.eclipse.rcptt.tesla.core.protocol.ProtocolPackage#getUIHierarchyResponse_Chilren() + * @return the value of the 'Children' reference list. + * @see org.eclipse.rcptt.tesla.core.protocol.ProtocolPackage#getUIHierarchyResponse_Children() * @model * @generated */ - EList getChilren(); + EList getChildren(); /** * Returns the value of the 'Ui Element' reference. diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolPackageImpl.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolPackageImpl.java index f38982401..6721cb039 100755 --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolPackageImpl.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolPackageImpl.java @@ -3497,7 +3497,7 @@ public EClass getUIHierarchyResponse() { * * @generated */ - public EReference getUIHierarchyResponse_Chilren() { + public EReference getUIHierarchyResponse_Children() { return (EReference)uiHierarchyResponseEClass.getEStructuralFeatures().get(0); } @@ -3994,7 +3994,7 @@ public void createPackageContents() { createEAttribute(rapUploadFileEClass, RAP_UPLOAD_FILE__PATH); uiHierarchyResponseEClass = createEClass(UI_HIERARCHY_RESPONSE); - createEReference(uiHierarchyResponseEClass, UI_HIERARCHY_RESPONSE__CHILREN); + createEReference(uiHierarchyResponseEClass, UI_HIERARCHY_RESPONSE__CHILDREN); createEReference(uiHierarchyResponseEClass, UI_HIERARCHY_RESPONSE__UI_ELEMENT); uiElementEClass = createEClass(UI_ELEMENT); @@ -4533,7 +4533,7 @@ public void initializePackageContents() { initEAttribute(getRapUploadFile_Path(), theEcorePackage.getEString(), "path", null, 0, 1, RapUploadFile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(uiHierarchyResponseEClass, UIHierarchyResponse.class, "UIHierarchyResponse", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getUIHierarchyResponse_Chilren(), this.getUIElement(), null, "chilren", null, 0, -1, UIHierarchyResponse.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getUIHierarchyResponse_Children(), this.getUIElement(), null, "children", null, 0, -1, UIHierarchyResponse.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getUIHierarchyResponse_UiElement(), this.getUIElement(), null, "uiElement", null, 0, 1, UIHierarchyResponse.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(uiElementEClass, UIElement.class, "UIElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIHierarchyResponseImpl.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIHierarchyResponseImpl.java index 1faa4c787..d58355e5c 100644 --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIHierarchyResponseImpl.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIHierarchyResponseImpl.java @@ -27,7 +27,7 @@ * The following features are implemented: *

*
    - *
  • {@link org.eclipse.rcptt.tesla.core.protocol.impl.UIHierarchyResponseImpl#getChilren Chilren}
  • + *
  • {@link org.eclipse.rcptt.tesla.core.protocol.impl.UIHierarchyResponseImpl#getChildren Children}
  • *
  • {@link org.eclipse.rcptt.tesla.core.protocol.impl.UIHierarchyResponseImpl#getUiElement Ui Element}
  • *
* @@ -35,14 +35,14 @@ */ public class UIHierarchyResponseImpl extends ResponseImpl implements UIHierarchyResponse { /** - * The cached value of the '{@link #getChilren() Chilren}' reference list. + * The cached value of the '{@link #getChildren() Children}' reference list. * * - * @see #getChilren() + * @see #getChildren() * @generated * @ordered */ - protected EList chilren; + protected EList children; /** * The cached value of the '{@link #getUiElement() Ui Element}' reference. * @@ -76,11 +76,11 @@ protected EClass eStaticClass() { * * @generated */ - public EList getChilren() { - if (chilren == null) { - chilren = new EObjectResolvingEList(UIElement.class, this, ProtocolPackage.UI_HIERARCHY_RESPONSE__CHILREN); + public EList getChildren() { + if (children == null) { + children = new EObjectResolvingEList(UIElement.class, this, ProtocolPackage.UI_HIERARCHY_RESPONSE__CHILDREN); } - return chilren; + return children; } /** @@ -129,8 +129,8 @@ public void setUiElement(UIElement newUiElement) { @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case ProtocolPackage.UI_HIERARCHY_RESPONSE__CHILREN: - return getChilren(); + case ProtocolPackage.UI_HIERARCHY_RESPONSE__CHILDREN: + return getChildren(); case ProtocolPackage.UI_HIERARCHY_RESPONSE__UI_ELEMENT: if (resolve) return getUiElement(); return basicGetUiElement(); @@ -147,9 +147,9 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case ProtocolPackage.UI_HIERARCHY_RESPONSE__CHILREN: - getChilren().clear(); - getChilren().addAll((Collection)newValue); + case ProtocolPackage.UI_HIERARCHY_RESPONSE__CHILDREN: + getChildren().clear(); + getChildren().addAll((Collection)newValue); return; case ProtocolPackage.UI_HIERARCHY_RESPONSE__UI_ELEMENT: setUiElement((UIElement)newValue); @@ -166,8 +166,8 @@ public void eSet(int featureID, Object newValue) { @Override public void eUnset(int featureID) { switch (featureID) { - case ProtocolPackage.UI_HIERARCHY_RESPONSE__CHILREN: - getChilren().clear(); + case ProtocolPackage.UI_HIERARCHY_RESPONSE__CHILDREN: + getChildren().clear(); return; case ProtocolPackage.UI_HIERARCHY_RESPONSE__UI_ELEMENT: setUiElement((UIElement)null); @@ -184,8 +184,8 @@ public void eUnset(int featureID) { @Override public boolean eIsSet(int featureID) { switch (featureID) { - case ProtocolPackage.UI_HIERARCHY_RESPONSE__CHILREN: - return chilren != null && !chilren.isEmpty(); + case ProtocolPackage.UI_HIERARCHY_RESPONSE__CHILDREN: + return children != null && !children.isEmpty(); case ProtocolPackage.UI_HIERARCHY_RESPONSE__UI_ELEMENT: return uiElement != null; } diff --git a/core/org.eclipse.rcptt.tesla.core/models/protocol.ecore b/core/org.eclipse.rcptt.tesla.core/models/protocol.ecore index 201c08605..45c78efd4 100755 --- a/core/org.eclipse.rcptt.tesla.core/models/protocol.ecore +++ b/core/org.eclipse.rcptt.tesla.core/models/protocol.ecore @@ -445,7 +445,7 @@ - diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeModel.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeModel.java index 52997b65e..2d2567400 100644 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeModel.java +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/tree/AssertionTreeModel.java @@ -48,7 +48,7 @@ private Object[] getChildren(Object parent) { } UIHierarchyResponse response = UIHierarchyResponseUtilities.getUIHierarchyElement(aut, (UIElement) parent); List list = new ArrayList(); - for (UIElement uiElement : response.getChilren()) { + for (UIElement uiElement : response.getChildren()) { list.add(uiElement); } return (UIElement[]) list.toArray(new UIElement[list.size()]); diff --git a/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AUTControlsHierarchyUtilities.java b/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AUTControlsHierarchyUtilities.java index 4b893fc2f..83d5c0a2c 100644 --- a/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AUTControlsHierarchyUtilities.java +++ b/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AUTControlsHierarchyUtilities.java @@ -69,7 +69,7 @@ public static void initResponseChildren(Display display, SWTUIElement swtUIEleme continue; } - response.getChilren().add(getUIElement(display, getElement(swtUIChild), swtUIChild)); + response.getChildren().add(getUIElement(display, getElement(swtUIChild), swtUIChild)); } } From 960b14f4e8af7f7b248ab56e2b39064072df8d78 Mon Sep 17 00:00:00 2001 From: Artem Kovalev Date: Mon, 15 Aug 2016 22:25:52 +0700 Subject: [PATCH 10/18] Fix Assertion dialog on linux Change-Id: I8211336cfc688ea65c7eaa0fac6cefa15be3bf89 Signed-off-by: Artem Kovalev --- .../rcptt/ui/panels/assertion/AssertionPanelWindow.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java index c1c7f7c6d..545f44115 100644 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java @@ -538,8 +538,12 @@ public void run() { createTreeViewer(assertionComposite).setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); +<<<<<<< 663eeb289232baeec92721816ce8a0771f937641 createButtonPanel(assertionComposite).setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); +======= + createButtonPanel(composite).setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); +>>>>>>> Fix Assertion dialog on linux return composite; } From f25d007c4909b21796d8c75bc4d4140daffb178d Mon Sep 17 00:00:00 2001 From: Evgeny Lipkin Date: Tue, 6 Sep 2016 12:04:13 +0700 Subject: [PATCH 11/18] added AssertionTree for RAP --- .../ecl/core/model/AUTControlsHierarchy.java | 29 +++ .../model/impl/AUTControlsHierarchyImpl.java | 12 ++ .../core/model/impl/Q7CorePackageImpl.java | 25 +++ .../model/model.ecore | 7 + .../core/protocol/UIHierarchyResponse.java | 4 + .../impl/UIHierarchyResponseImpl.java | 19 ++ .../META-INF/MANIFEST.MF | 3 +- .../plugin.xml | 5 + .../ui/rap/AUTControlsHierarchyService.java | 178 ++++++++++++++++++ .../ui/rap/AUTControlsHierarchyUtilities.java | 161 ++++++++++++++++ .../swt/rap/IAssertSWTEventListener.java | 10 + .../aspects/swt/rap/SWTEventManager.java | 39 +++- .../core/swt/rap/SWTAssertManager.java | 53 +++++- 13 files changed, 540 insertions(+), 5 deletions(-) create mode 100644 modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/src/org/eclipse/rcptt/internal/runtime/ui/rap/AUTControlsHierarchyService.java create mode 100644 modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/src/org/eclipse/rcptt/internal/runtime/ui/rap/AUTControlsHierarchyUtilities.java diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchy.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchy.java index ed79fb894..34a3a78c7 100644 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchy.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchy.java @@ -6,7 +6,11 @@ /** * +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e * A representation of the model object 'Assertion AUT Controls Hierarchy'. +======= + * A representation of the model object 'AUT Controls Hierarchy'. +>>>>>>> added AssertionTree for RAP * * *

@@ -26,7 +30,10 @@ public interface AUTControlsHierarchy extends Command { /** * Returns the value of the 'Id' attribute. +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e * The default value is "". +======= +>>>>>>> added AssertionTree for RAP * *

* If the meaning of the 'Id' attribute isn't clear, @@ -36,7 +43,11 @@ public interface AUTControlsHierarchy extends Command { * @return the value of the 'Id' attribute. * @see #setId(String) * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAUTControlsHierarchy_Id() +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e * @model default="" +======= + * @model +>>>>>>> added AssertionTree for RAP * @generated */ String getId(); @@ -82,7 +93,10 @@ public interface AUTControlsHierarchy extends Command { /** * Returns the value of the 'Description' attribute. +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e * The default value is "". +======= +>>>>>>> added AssertionTree for RAP * *

* If the meaning of the 'Description' attribute isn't clear, @@ -92,7 +106,11 @@ public interface AUTControlsHierarchy extends Command { * @return the value of the 'Description' attribute. * @see #setDescription(String) * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAUTControlsHierarchy_Description() +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e * @model default="" +======= + * @model +>>>>>>> added AssertionTree for RAP * @generated */ String getDescription(); @@ -109,7 +127,10 @@ public interface AUTControlsHierarchy extends Command { /** * Returns the value of the 'Kind' attribute. +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e * The default value is "". +======= +>>>>>>> added AssertionTree for RAP * *

* If the meaning of the 'Kind' attribute isn't clear, @@ -119,7 +140,11 @@ public interface AUTControlsHierarchy extends Command { * @return the value of the 'Kind' attribute. * @see #setKind(String) * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAUTControlsHierarchy_Kind() +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e * @model default="" +======= + * @model +>>>>>>> added AssertionTree for RAP * @generated */ String getKind(); @@ -134,4 +159,8 @@ public interface AUTControlsHierarchy extends Command { */ void setKind(String value); +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e } // AssertionAUTControlsHierarchy +======= +} // AUTControlsHierarchy +>>>>>>> added AssertionTree for RAP diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AUTControlsHierarchyImpl.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AUTControlsHierarchyImpl.java index 1559b10c7..951086494 100644 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AUTControlsHierarchyImpl.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AUTControlsHierarchyImpl.java @@ -39,7 +39,11 @@ public class AUTControlsHierarchyImpl extends CommandImpl implements AUTControls * @generated * @ordered */ +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e protected static final String ID_EDEFAULT = ""; +======= + protected static final String ID_EDEFAULT = null; +>>>>>>> added AssertionTree for RAP /** * The cached value of the '{@link #getId() Id}' attribute. @@ -79,7 +83,11 @@ public class AUTControlsHierarchyImpl extends CommandImpl implements AUTControls * @generated * @ordered */ +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e protected static final String DESCRIPTION_EDEFAULT = ""; +======= + protected static final String DESCRIPTION_EDEFAULT = null; +>>>>>>> added AssertionTree for RAP /** * The cached value of the '{@link #getDescription() Description}' attribute. @@ -99,7 +107,11 @@ public class AUTControlsHierarchyImpl extends CommandImpl implements AUTControls * @generated * @ordered */ +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e protected static final String KIND_EDEFAULT = ""; +======= + protected static final String KIND_EDEFAULT = null; +>>>>>>> added AssertionTree for RAP /** * The cached value of the '{@link #getKind() Kind}' attribute. diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java index 1bbc526d4..c6cf64ee1 100644 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java @@ -11,6 +11,12 @@ import org.eclipse.emf.ecore.impl.EPackageImpl; import org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy; import org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState; +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e +======= +import org.eclipse.rcptt.ecl.core.CorePackage; + +import org.eclipse.rcptt.core.scenario.ScenarioPackage; +>>>>>>> added AssertionTree for RAP import org.eclipse.rcptt.core.ecl.core.model.BeginReportNode; import org.eclipse.rcptt.core.ecl.core.model.CreateContext; import org.eclipse.rcptt.core.ecl.core.model.CreateReport; @@ -226,8 +232,12 @@ public class Q7CorePackageImpl extends EPackageImpl implements Q7CorePackage { private EClass autControlsHierarchyEClass = null; /** +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e * * +======= + * +>>>>>>> added AssertionTree for RAP * @generated */ private EEnum executionPhaseEEnum = null; @@ -891,8 +901,12 @@ public EAttribute getAUTControlsHierarchy_Kind() { } /** +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e * * +======= + * +>>>>>>> added AssertionTree for RAP * @generated */ public EEnum getExecutionPhase() { @@ -909,8 +923,12 @@ public EEnum getAUTControlsHierarchyState() { } /** +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e * * +======= + * +>>>>>>> added AssertionTree for RAP * @generated */ public Q7CoreFactory getQ7CoreFactory() { @@ -1172,10 +1190,17 @@ public void initializePackageContents() { initEClass(terminateAutEClass, TerminateAut.class, "TerminateAut", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(autControlsHierarchyEClass, AUTControlsHierarchy.class, "AUTControlsHierarchy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e initEAttribute(getAUTControlsHierarchy_Id(), theEcorePackage.getEString(), "id", "", 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getAUTControlsHierarchy_State(), this.getAUTControlsHierarchyState(), "state", null, 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getAUTControlsHierarchy_Description(), theEcorePackage.getEString(), "description", "", 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getAUTControlsHierarchy_Kind(), theEcorePackage.getEString(), "kind", "", 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); +======= + initEAttribute(getAUTControlsHierarchy_Id(), theEcorePackage.getEString(), "id", null, 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAUTControlsHierarchy_State(), this.getAUTControlsHierarchyState(), "state", null, 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAUTControlsHierarchy_Description(), theEcorePackage.getEString(), "description", null, 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAUTControlsHierarchy_Kind(), theEcorePackage.getEString(), "kind", null, 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); +>>>>>>> added AssertionTree for RAP // Initialize enums and add enum literals initEEnum(executionPhaseEEnum, ExecutionPhase.class, "ExecutionPhase"); diff --git a/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore b/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore index ec6de2303..59bfa2428 100755 --- a/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore +++ b/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore @@ -131,6 +131,7 @@ +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e @@ -138,6 +139,12 @@ defaultValueLiteral=""/> +======= + + + + +>>>>>>> added AssertionTree for RAP diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIHierarchyResponse.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIHierarchyResponse.java index 24e69846b..92c045672 100644 --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIHierarchyResponse.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIHierarchyResponse.java @@ -3,6 +3,10 @@ package org.eclipse.rcptt.tesla.core.protocol; import org.eclipse.emf.common.util.EList; +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e +======= + +>>>>>>> added AssertionTree for RAP import org.eclipse.rcptt.tesla.core.protocol.raw.Response; /** diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIHierarchyResponseImpl.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIHierarchyResponseImpl.java index d58355e5c..356e761ac 100644 --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIHierarchyResponseImpl.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIHierarchyResponseImpl.java @@ -5,12 +5,23 @@ import java.util.Collection; import org.eclipse.emf.common.notify.Notification; +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; +======= + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +>>>>>>> added AssertionTree for RAP import org.eclipse.emf.ecore.util.EObjectResolvingEList; import org.eclipse.rcptt.tesla.core.protocol.ProtocolPackage; @@ -43,6 +54,10 @@ public class UIHierarchyResponseImpl extends ResponseImpl implements UIHierarchy * @ordered */ protected EList children; +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e +======= + +>>>>>>> added AssertionTree for RAP /** * The cached value of the '{@link #getUiElement() Ui Element}' reference. * @@ -52,6 +67,10 @@ public class UIHierarchyResponseImpl extends ResponseImpl implements UIHierarchy * @ordered */ protected UIElement uiElement; +<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e +======= + +>>>>>>> added AssertionTree for RAP /** * * diff --git a/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/META-INF/MANIFEST.MF b/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/META-INF/MANIFEST.MF index e45239b8f..163b605cf 100644 --- a/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/META-INF/MANIFEST.MF +++ b/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/META-INF/MANIFEST.MF @@ -24,7 +24,8 @@ Require-Bundle: org.eclipse.rap.ui, org.eclipse.rcptt.ecl.client.tcp;bundle-version="[2.2.0,3.0.0)", org.eclipse.rcptt.tesla.ui.ide.aspects.rap;bundle-version="[2.2.0,3.0.0)", org.eclipse.rcptt.core.launching;bundle-version="[2.2.0,3.0.0)", - org.eclipse.rcptt.util.swt.rap;bundle-version="[2.2.0,3.0.0)" + org.eclipse.rcptt.util.swt.rap;bundle-version="[2.2.0,3.0.0)", + org.eclipse.rcptt.tesla.recording.aspects.swt.rap Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-ActivationPolicy: lazy Export-Package: org.eclipse.rcptt.internal.runtime.ui.rap, diff --git a/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/plugin.xml b/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/plugin.xml index 3c78db0f0..2b022fd06 100644 --- a/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/plugin.xml +++ b/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/plugin.xml @@ -64,6 +64,11 @@ name="TerminateAut" namespace="http://eclipse.org/rcptt/core/ecl"> + + getParentsList(Display display, SWTUIElement swtuiElement) { + Map references = EclipseWorkbenchProvider.getProvider() + .getWorkbenchReference(SWTUIPlayer.getPlayer(display)); + List parents = SWTUIPlayer.getPlayer(display).collectParents(unwrapWidget(swtuiElement), references); + List elements = new ArrayList(); + for (Widget widget : parents) { + SWTUIElement e = null; + if (references.containsKey(widget)) { + e = references.get(widget); + } else { + e = SWTUIPlayer.getPlayer(display).wrap(widget); + } + if (e != null) { + if (!isGoodKind(e.getKind())) { + continue; + } + if (SWTUIPlayer.getPlayer(display).isVisible(e)) { + elements.add(e); + } + } + } + return elements; + } + + public static SWTUIElement getSWTUIParent(Display display, SWTUIElement uiElement) { + List parentsList = getParentsList(display, uiElement); + if (parentsList.size() > 0) { + return parentsList.get(0); + } + return null; + } + + public static boolean isGoodKind(GenericElementKind kind) { + if (kind.is(ElementKind.Unknown) || kind.is(ElementKind.Editor) || kind.is(ElementKind.View)) { + return false; + } + return true; + } +} diff --git a/modules/rap/bundles/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.swt.rap/src/org/eclipse/rcptt/tesla/recording/aspects/swt/rap/IAssertSWTEventListener.java b/modules/rap/bundles/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.swt.rap/src/org/eclipse/rcptt/tesla/recording/aspects/swt/rap/IAssertSWTEventListener.java index 683744f45..8007297c7 100644 --- a/modules/rap/bundles/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.swt.rap/src/org/eclipse/rcptt/tesla/recording/aspects/swt/rap/IAssertSWTEventListener.java +++ b/modules/rap/bundles/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.swt.rap/src/org/eclipse/rcptt/tesla/recording/aspects/swt/rap/IAssertSWTEventListener.java @@ -10,6 +10,8 @@ *******************************************************************************/ package org.eclipse.rcptt.tesla.recording.aspects.swt.rap; +import org.eclipse.rcptt.tesla.core.protocol.raw.Element; +import org.eclipse.rcptt.tesla.internal.ui.player.SWTUIElement; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Widget; @@ -19,4 +21,12 @@ public interface IAssertSWTEventListener extends IAbstractSWTEventListener { public boolean handleEventInFreeze(Widget widget, int type, Event event); public void handleUpdateHover(Control control); + public boolean highlightWidget(Widget widget); + + public boolean updateAssertionPanelWindow(Widget widget); + + public SWTUIElement getSWTUIElement(Element element); + + public Element getElement(SWTUIElement swtUIElement); + } diff --git a/modules/rap/bundles/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.swt.rap/src/org/eclipse/rcptt/tesla/recording/aspects/swt/rap/SWTEventManager.java b/modules/rap/bundles/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.swt.rap/src/org/eclipse/rcptt/tesla/recording/aspects/swt/rap/SWTEventManager.java index b6a5a4394..975b37826 100644 --- a/modules/rap/bundles/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.swt.rap/src/org/eclipse/rcptt/tesla/recording/aspects/swt/rap/SWTEventManager.java +++ b/modules/rap/bundles/runtime/tesla/org.eclipse.rcptt.tesla.recording.aspects.swt.rap/src/org/eclipse/rcptt/tesla/recording/aspects/swt/rap/SWTEventManager.java @@ -21,7 +21,8 @@ import org.eclipse.rap.rwt.RWT; import org.eclipse.rap.rwt.client.service.JavaScriptExecutor; -import org.eclipse.rcptt.tesla.swt.js.JavaScriptExecutionManager; +import org.eclipse.rcptt.tesla.core.protocol.raw.Element; +import org.eclipse.rcptt.tesla.internal.ui.player.SWTUIElement; import org.eclipse.rcptt.tesla.ui.RWTUtils; import org.eclipse.swt.custom.CCombo; import org.eclipse.swt.widgets.Control; @@ -198,6 +199,42 @@ public static boolean handleEventInFreeze(Widget widget, int type, Event event) return finalResult; } + public static boolean highlightWidget(Widget widget) { + boolean finalResult = false; + for (IAssertSWTEventListener listener : getListeners(IAssertSWTEventListener.class)) { + finalResult = finalResult || listener.highlightWidget(widget); + } + return finalResult; + } + + public static boolean updateAssertionPanelWindow(Widget widget) { + boolean finalResult = false; + for (IAssertSWTEventListener listener : getListeners(IAssertSWTEventListener.class)) { + finalResult = finalResult || listener.updateAssertionPanelWindow(widget); + } + return finalResult; + } + + public static SWTUIElement getSWTUIElement(Element element) { + for (IAssertSWTEventListener listener : getListeners(IAssertSWTEventListener.class)) { + SWTUIElement result = listener.getSWTUIElement(element); + if (null != result) { + return result; + } + } + return null; + } + + public static Element getElement(SWTUIElement swtUIElement) { + for (IAssertSWTEventListener listener : getListeners(IAssertSWTEventListener.class)) { + Element result = listener.getElement(swtUIElement); + if (null != result) { + return result; + } + } + return null; + } + public static void handleUpdateHover(Control widget) { for (IAssertSWTEventListener listener : getListeners(IAssertSWTEventListener.class)) { listener.handleUpdateHover(widget); diff --git a/modules/rap/bundles/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt.rap/src/org/eclipse/rcptt/tesla/recording/core/swt/rap/SWTAssertManager.java b/modules/rap/bundles/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt.rap/src/org/eclipse/rcptt/tesla/recording/core/swt/rap/SWTAssertManager.java index 61f6f8578..fcc1bcf5d 100644 --- a/modules/rap/bundles/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt.rap/src/org/eclipse/rcptt/tesla/recording/core/swt/rap/SWTAssertManager.java +++ b/modules/rap/bundles/runtime/tesla/org.eclipse.rcptt.tesla.recording.swt.rap/src/org/eclipse/rcptt/tesla/recording/core/swt/rap/SWTAssertManager.java @@ -36,8 +36,9 @@ import org.eclipse.rcptt.tesla.core.protocol.raw.Element; import org.eclipse.rcptt.tesla.core.protocol.raw.RawFactory; import org.eclipse.rcptt.tesla.core.protocol.raw.SetMode; -import org.eclipse.rcptt.tesla.core.ui.Item; 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.SWTUIElement; import org.eclipse.rcptt.tesla.internal.ui.player.SWTUIPlayer; import org.eclipse.rcptt.tesla.internal.ui.processors.SWTUIProcessor; import org.eclipse.rcptt.tesla.recording.aspects.swt.rap.IAssertSWTEventListener; @@ -51,9 +52,10 @@ import org.eclipse.rcptt.tesla.swt.events.RcpttMouseEvents; import org.eclipse.rcptt.tesla.swt.events.TeslaEventManager; import org.eclipse.rcptt.tesla.ui.RWTUtils; +import org.eclipse.rcptt.tesla.ui.describers.DescriberManager; +import org.eclipse.rcptt.tesla.ui.describers.IWidgetDescriber; import org.eclipse.rcptt.util.ShellUtilsProvider; import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.CTabFolder; import org.eclipse.swt.events.MouseEvent; import org.eclipse.swt.events.MouseListener; import org.eclipse.swt.events.PaintEvent; @@ -64,7 +66,6 @@ import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Canvas; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; @@ -469,6 +470,52 @@ public void run() { } } + public synchronized boolean highlightWidget(final Widget widget) { + if (widget == null || widget.isDisposed()) { + return false; + } + resetAssertSelection(); + + widget.getDisplay().asyncExec(new Runnable() { + public void run() { + synchronized (widget) { + IWidgetDescriber descr = DescriberManager.getDescriber(widget, 0, 0); + if (null == descr.getBounds()) { + return; + } + updateHover(descr.getBounds(), descr.getPoint(), true, true); + } + } + }); + return true; + } + + public synchronized SWTUIElement getSWTUIElement(Element element) { + SWTUIElement swtUIElement = SWTRecordingHelper.getHelper().findByElement(element); + return swtUIElement; + } + + public synchronized Element getElement(SWTUIElement swtUIElement) { + FindResult result = null; + result = SWTRecordingHelper.getHelper().getLocator().findElement(swtUIElement, true, false, true); + if (result != null) { + return result.element; + } + return null; + } + + public synchronized boolean updateAssertionPanelWindow(Widget widget) { + if (widget == null || widget.isDisposed()) { + return false; + } + + IRecordingDescriber assertDescr = selectAllowedParent(new RecordingWidgetDescriber(widget)); + seachForElement(assertDescr.searchForElement(recorder), true, assertDescr); + freezedCtrl = assertDescr; + + return true; + } + private void assertionLog(String message) { if (TeslaFeatures.isActivityLogging()) { Q7LoggingManager.logMessage(IQ7ActivityLogs.ASSERTIONS, message); From 965651f9116aa7b9f98c3c5efac9ad2ae3558c47 Mon Sep 17 00:00:00 2001 From: Evgeny Lipkin Date: Tue, 6 Sep 2016 13:48:41 +0700 Subject: [PATCH 12/18] added AUTControlsHierarchy for RAP --- .../ecl/core/model/AUTControlsHierarchy.java | 29 ----------------- .../model/impl/AUTControlsHierarchyImpl.java | 12 ------- .../core/model/impl/Q7CorePackageImpl.java | 31 ++++--------------- .../model/model.ecore | 9 +----- .../tesla/core/protocol/ProtocolFactory.java | 12 ++----- .../tesla/core/protocol/ProtocolPackage.java | 16 +++------- .../core/protocol/UIHierarchyResponse.java | 3 -- .../protocol/impl/ProtocolFactoryImpl.java | 16 +++------- .../protocol/impl/ProtocolPackageImpl.java | 30 +++++++----------- .../impl/UIHierarchyResponseImpl.java | 15 --------- .../protocol/util/ProtocolAdapterFactory.java | 24 +++++--------- .../core/protocol/util/ProtocolSwitch.java | 22 +++++-------- 12 files changed, 44 insertions(+), 175 deletions(-) mode change 100755 => 100644 core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolFactory.java mode change 100755 => 100644 core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolPackage.java mode change 100755 => 100644 core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolFactoryImpl.java mode change 100755 => 100644 core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolPackageImpl.java mode change 100755 => 100644 core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/util/ProtocolAdapterFactory.java mode change 100755 => 100644 core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/util/ProtocolSwitch.java diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchy.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchy.java index 34a3a78c7..4120f2b1e 100644 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchy.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchy.java @@ -6,11 +6,7 @@ /** * -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e - * A representation of the model object 'Assertion AUT Controls Hierarchy'. -======= * A representation of the model object 'AUT Controls Hierarchy'. ->>>>>>> added AssertionTree for RAP * * *

@@ -30,10 +26,7 @@ public interface AUTControlsHierarchy extends Command { /** * Returns the value of the 'Id' attribute. -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e * The default value is "". -======= ->>>>>>> added AssertionTree for RAP * *

* If the meaning of the 'Id' attribute isn't clear, @@ -43,11 +36,7 @@ public interface AUTControlsHierarchy extends Command { * @return the value of the 'Id' attribute. * @see #setId(String) * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAUTControlsHierarchy_Id() -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e * @model default="" -======= - * @model ->>>>>>> added AssertionTree for RAP * @generated */ String getId(); @@ -93,10 +82,7 @@ public interface AUTControlsHierarchy extends Command { /** * Returns the value of the 'Description' attribute. -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e * The default value is "". -======= ->>>>>>> added AssertionTree for RAP * *

* If the meaning of the 'Description' attribute isn't clear, @@ -106,11 +92,7 @@ public interface AUTControlsHierarchy extends Command { * @return the value of the 'Description' attribute. * @see #setDescription(String) * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAUTControlsHierarchy_Description() -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e * @model default="" -======= - * @model ->>>>>>> added AssertionTree for RAP * @generated */ String getDescription(); @@ -127,10 +109,7 @@ public interface AUTControlsHierarchy extends Command { /** * Returns the value of the 'Kind' attribute. -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e * The default value is "". -======= ->>>>>>> added AssertionTree for RAP * *

* If the meaning of the 'Kind' attribute isn't clear, @@ -140,11 +119,7 @@ public interface AUTControlsHierarchy extends Command { * @return the value of the 'Kind' attribute. * @see #setKind(String) * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAUTControlsHierarchy_Kind() -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e * @model default="" -======= - * @model ->>>>>>> added AssertionTree for RAP * @generated */ String getKind(); @@ -159,8 +134,4 @@ public interface AUTControlsHierarchy extends Command { */ void setKind(String value); -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e -} // AssertionAUTControlsHierarchy -======= } // AUTControlsHierarchy ->>>>>>> added AssertionTree for RAP diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AUTControlsHierarchyImpl.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AUTControlsHierarchyImpl.java index 951086494..1559b10c7 100644 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AUTControlsHierarchyImpl.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AUTControlsHierarchyImpl.java @@ -39,11 +39,7 @@ public class AUTControlsHierarchyImpl extends CommandImpl implements AUTControls * @generated * @ordered */ -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e protected static final String ID_EDEFAULT = ""; -======= - protected static final String ID_EDEFAULT = null; ->>>>>>> added AssertionTree for RAP /** * The cached value of the '{@link #getId() Id}' attribute. @@ -83,11 +79,7 @@ public class AUTControlsHierarchyImpl extends CommandImpl implements AUTControls * @generated * @ordered */ -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e protected static final String DESCRIPTION_EDEFAULT = ""; -======= - protected static final String DESCRIPTION_EDEFAULT = null; ->>>>>>> added AssertionTree for RAP /** * The cached value of the '{@link #getDescription() Description}' attribute. @@ -107,11 +99,7 @@ public class AUTControlsHierarchyImpl extends CommandImpl implements AUTControls * @generated * @ordered */ -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e protected static final String KIND_EDEFAULT = ""; -======= - protected static final String KIND_EDEFAULT = null; ->>>>>>> added AssertionTree for RAP /** * The cached value of the '{@link #getKind() Kind}' attribute. diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java index c6cf64ee1..453c5f09c 100644 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java @@ -8,15 +8,11 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.EcorePackage; + import org.eclipse.emf.ecore.impl.EPackageImpl; + import org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy; import org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState; -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e -======= -import org.eclipse.rcptt.ecl.core.CorePackage; - -import org.eclipse.rcptt.core.scenario.ScenarioPackage; ->>>>>>> added AssertionTree for RAP import org.eclipse.rcptt.core.ecl.core.model.BeginReportNode; import org.eclipse.rcptt.core.ecl.core.model.CreateContext; import org.eclipse.rcptt.core.ecl.core.model.CreateReport; @@ -44,9 +40,13 @@ import org.eclipse.rcptt.core.ecl.core.model.TerminateAut; import org.eclipse.rcptt.core.ecl.core.model.ViewInfo; import org.eclipse.rcptt.core.ecl.core.model.ViewList; + import org.eclipse.rcptt.core.scenario.ScenarioPackage; + import org.eclipse.rcptt.ecl.core.CorePackage; + import org.eclipse.rcptt.reporting.ReportingPackage; + import org.eclipse.rcptt.sherlock.core.model.sherlock.report.ReportPackage; /** @@ -232,12 +232,8 @@ public class Q7CorePackageImpl extends EPackageImpl implements Q7CorePackage { private EClass autControlsHierarchyEClass = null; /** -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e * * -======= - * ->>>>>>> added AssertionTree for RAP * @generated */ private EEnum executionPhaseEEnum = null; @@ -901,12 +897,8 @@ public EAttribute getAUTControlsHierarchy_Kind() { } /** -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e * * -======= - * ->>>>>>> added AssertionTree for RAP * @generated */ public EEnum getExecutionPhase() { @@ -923,12 +915,8 @@ public EEnum getAUTControlsHierarchyState() { } /** -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e * * -======= - * ->>>>>>> added AssertionTree for RAP * @generated */ public Q7CoreFactory getQ7CoreFactory() { @@ -1190,17 +1178,10 @@ public void initializePackageContents() { initEClass(terminateAutEClass, TerminateAut.class, "TerminateAut", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(autControlsHierarchyEClass, AUTControlsHierarchy.class, "AUTControlsHierarchy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e initEAttribute(getAUTControlsHierarchy_Id(), theEcorePackage.getEString(), "id", "", 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getAUTControlsHierarchy_State(), this.getAUTControlsHierarchyState(), "state", null, 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getAUTControlsHierarchy_Description(), theEcorePackage.getEString(), "description", "", 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getAUTControlsHierarchy_Kind(), theEcorePackage.getEString(), "kind", "", 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); -======= - initEAttribute(getAUTControlsHierarchy_Id(), theEcorePackage.getEString(), "id", null, 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getAUTControlsHierarchy_State(), this.getAUTControlsHierarchyState(), "state", null, 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getAUTControlsHierarchy_Description(), theEcorePackage.getEString(), "description", null, 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getAUTControlsHierarchy_Kind(), theEcorePackage.getEString(), "kind", null, 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); ->>>>>>> added AssertionTree for RAP // Initialize enums and add enum literals initEEnum(executionPhaseEEnum, ExecutionPhase.class, "ExecutionPhase"); diff --git a/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore b/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore index 59bfa2428..d0d54a9e6 100755 --- a/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore +++ b/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore @@ -131,7 +131,6 @@ -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e @@ -139,12 +138,6 @@ defaultValueLiteral=""/> -======= - - - - ->>>>>>> added AssertionTree for RAP @@ -152,4 +145,4 @@ - + \ No newline at end of file diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolFactory.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolFactory.java old mode 100755 new mode 100644 index 3f5e120e5..cf66b6ccb --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolFactory.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolFactory.java @@ -1,13 +1,5 @@ -/******************************************************************************* - * Copyright (c) 2009, 2016 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.protocol; import org.eclipse.emf.ecore.EFactory; diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolPackage.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolPackage.java old mode 100755 new mode 100644 index fb6d7a700..a7ae4794c --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolPackage.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/ProtocolPackage.java @@ -1,23 +1,15 @@ -/******************************************************************************* - * Copyright (c) 2009, 2016 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.protocol; -import org.eclipse.rcptt.tesla.core.protocol.raw.RawPackage; - import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EEnum; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; +import org.eclipse.rcptt.tesla.core.protocol.raw.RawPackage; + /** * * The Package for the model. diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIHierarchyResponse.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIHierarchyResponse.java index 92c045672..ccbd853ed 100644 --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIHierarchyResponse.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/UIHierarchyResponse.java @@ -3,10 +3,7 @@ package org.eclipse.rcptt.tesla.core.protocol; import org.eclipse.emf.common.util.EList; -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e -======= ->>>>>>> added AssertionTree for RAP import org.eclipse.rcptt.tesla.core.protocol.raw.Response; /** diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolFactoryImpl.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolFactoryImpl.java old mode 100755 new mode 100644 index 5ee5840a7..cee98eec4 --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolFactoryImpl.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolFactoryImpl.java @@ -1,23 +1,17 @@ -/******************************************************************************* - * Copyright (c) 2009, 2016 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.protocol.impl; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EDataType; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; + import org.eclipse.emf.ecore.impl.EFactoryImpl; + import org.eclipse.emf.ecore.plugin.EcorePlugin; + import org.eclipse.rcptt.tesla.core.protocol.*; -import org.eclipse.rcptt.tesla.core.protocol.Shutdown; /** * diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolPackageImpl.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolPackageImpl.java old mode 100755 new mode 100644 index 6721cb039..08706da03 --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolPackageImpl.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/ProtocolPackageImpl.java @@ -1,15 +1,16 @@ -/******************************************************************************* - * Copyright (c) 2009, 2016 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.protocol.impl; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + import org.eclipse.rcptt.tesla.core.protocol.ActivateCellEditor; import org.eclipse.rcptt.tesla.core.protocol.ApplyCellEditor; import org.eclipse.rcptt.tesla.core.protocol.Assert; @@ -129,15 +130,6 @@ import org.eclipse.rcptt.tesla.core.protocol.raw.RawPackage; -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.EcorePackage; - -import org.eclipse.emf.ecore.impl.EPackageImpl; - /** * * An implementation of the model Package. diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIHierarchyResponseImpl.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIHierarchyResponseImpl.java index 356e761ac..c91167d25 100644 --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIHierarchyResponseImpl.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/impl/UIHierarchyResponseImpl.java @@ -5,14 +5,6 @@ import java.util.Collection; import org.eclipse.emf.common.notify.Notification; -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -======= import org.eclipse.emf.common.util.EList; @@ -21,7 +13,6 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl; ->>>>>>> added AssertionTree for RAP import org.eclipse.emf.ecore.util.EObjectResolvingEList; import org.eclipse.rcptt.tesla.core.protocol.ProtocolPackage; @@ -54,10 +45,7 @@ public class UIHierarchyResponseImpl extends ResponseImpl implements UIHierarchy * @ordered */ protected EList children; -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e -======= ->>>>>>> added AssertionTree for RAP /** * The cached value of the '{@link #getUiElement() Ui Element}' reference. * @@ -67,10 +55,7 @@ public class UIHierarchyResponseImpl extends ResponseImpl implements UIHierarchy * @ordered */ protected UIElement uiElement; -<<<<<<< 2ca8fe07c97220d724484277eca815ecb233573e -======= ->>>>>>> added AssertionTree for RAP /** * * diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/util/ProtocolAdapterFactory.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/util/ProtocolAdapterFactory.java old mode 100755 new mode 100644 index a13efcd0d..a3db644dc --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/util/ProtocolAdapterFactory.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/util/ProtocolAdapterFactory.java @@ -1,21 +1,7 @@ -/******************************************************************************* - * Copyright (c) 2009, 2016 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.protocol.util; -import org.eclipse.rcptt.tesla.core.protocol.*; - -import org.eclipse.rcptt.tesla.core.protocol.raw.Command; -import org.eclipse.rcptt.tesla.core.protocol.raw.Element; -import org.eclipse.rcptt.tesla.core.protocol.raw.Response; - import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier; @@ -23,6 +9,12 @@ import org.eclipse.emf.ecore.EObject; +import org.eclipse.rcptt.tesla.core.protocol.*; + +import org.eclipse.rcptt.tesla.core.protocol.raw.Command; +import org.eclipse.rcptt.tesla.core.protocol.raw.Element; +import org.eclipse.rcptt.tesla.core.protocol.raw.Response; + /** * * The Adapter Factory for the model. diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/util/ProtocolSwitch.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/util/ProtocolSwitch.java old mode 100755 new mode 100644 index 0366361cc..d98baeec5 --- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/util/ProtocolSwitch.java +++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/protocol/util/ProtocolSwitch.java @@ -1,26 +1,18 @@ -/******************************************************************************* - * Copyright (c) 2009, 2016 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.protocol.util; +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + import org.eclipse.rcptt.tesla.core.protocol.*; import org.eclipse.rcptt.tesla.core.protocol.raw.Command; import org.eclipse.rcptt.tesla.core.protocol.raw.Element; import org.eclipse.rcptt.tesla.core.protocol.raw.Response; -import java.util.List; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; - /** * * The Switch for the model's inheritance hierarchy. From 0e6bc67486ff39c0c65bd087b4f62b85a4e25482 Mon Sep 17 00:00:00 2001 From: Evgeny Lipkin Date: Thu, 8 Sep 2016 11:56:42 +0700 Subject: [PATCH 13/18] cleaned merge garbage --- .../rcptt/ui/panels/assertion/AssertionPanelWindow.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java index 545f44115..c1c7f7c6d 100644 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java @@ -538,12 +538,8 @@ public void run() { createTreeViewer(assertionComposite).setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); -<<<<<<< 663eeb289232baeec92721816ce8a0771f937641 createButtonPanel(assertionComposite).setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); -======= - createButtonPanel(composite).setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); ->>>>>>> Fix Assertion dialog on linux return composite; } From b018115c566e3b84b1db845bae0a94cffb55b80d Mon Sep 17 00:00:00 2001 From: Evgeny Lipkin Date: Thu, 8 Sep 2016 11:57:08 +0700 Subject: [PATCH 14/18] fixed for java 1.6 --- .../tesla/internal/ui/player/UIJobCollector.java | 16 ++++++++-------- .../internal/ui/processors/SWTUIProcessor.java | 11 ++++++----- 2 files changed, 14 insertions(+), 13 deletions(-) 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 d2474d680..f9900569f 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 @@ -221,7 +221,7 @@ protected JobStatus calcJobStatus(Job job, long delay) { return detectJobStatus(job, delay); } - private static final Set IGNORED_BY_DEFAULT = Collections.unmodifiableSet(new HashSet<>(asList( + private static final Set IGNORED_BY_DEFAULT = Collections.unmodifiableSet(new HashSet(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", @@ -376,8 +376,8 @@ public void apply(Node node) { } private void logJobInformation(List realJobs, List jobsInUI) { - List otherJobs = new ArrayList<>(jobs.keySet()); - Set jobInStepMode = new HashSet<>(); + List otherJobs = new ArrayList(jobs.keySet()); + Set jobInStepMode = new HashSet(); for (Job job : otherJobs) { if (getOrCreateJobInfo(job).jobInStepMode) jobInStepMode.add(job); @@ -419,10 +419,10 @@ private void logJobInformation(List realJobs, List jobsInUI) { public boolean isEmpty(Context context, Q7WaitInfoRoot info) { // Filter already executed UI jobs with async finish status. - List realJobs = new ArrayList<>(); + List realJobs = new ArrayList(); long current = System.currentTimeMillis(); boolean wasInStepMode = false; - List jobsInUI = new ArrayList<>(); + List jobsInUI = new ArrayList(); synchronized (jobs) { // Remove all canceled jobs removeCanceledJobs(); @@ -682,7 +682,7 @@ private void removeCanceledJobs() { private Set getSuperClassNames(Job job) { Class cl = job.getClass(); - Set names = new HashSet<>(); + Set names = new HashSet(); while (true) { if (cl.equals(Job.class)) { break; @@ -757,7 +757,7 @@ public int getCount() { public List getJobs() { synchronized (jobs) { - ArrayList rv = new ArrayList<>(); + ArrayList rv = new ArrayList(); for (JobInfo info : jobs.values()) if (info.isActive()) rv.add(info.job); @@ -795,7 +795,7 @@ public void join(long timeout) throws InterruptedException { } private boolean isJoinEmpty() { - List realJobs = new ArrayList<>(); + List realJobs = new ArrayList(); synchronized (jobs) { if (jobs.isEmpty()) { return true; diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.swt/src/org/eclipse/rcptt/tesla/internal/ui/processors/SWTUIProcessor.java b/runtime/tesla/org.eclipse.rcptt.tesla.swt/src/org/eclipse/rcptt/tesla/internal/ui/processors/SWTUIProcessor.java index ff709e0b0..293d367df 100644 --- a/runtime/tesla/org.eclipse.rcptt.tesla.swt/src/org/eclipse/rcptt/tesla/internal/ui/processors/SWTUIProcessor.java +++ b/runtime/tesla/org.eclipse.rcptt.tesla.swt/src/org/eclipse/rcptt/tesla/internal/ui/processors/SWTUIProcessor.java @@ -299,7 +299,8 @@ public class SWTUIProcessor implements ITeslaCommandProcessor, ProtocolPackage.Literals.CLICK_COLUMN, ProtocolPackage.Literals.MOUSE_EVENT }; - private static final Set SKIP_ACTIVATION_FOR_SHELLS = Collections.unmodifiableSet(new HashSet<>(Arrays.asList( + private static final Set SKIP_ACTIVATION_FOR_SHELLS = Collections + .unmodifiableSet(new HashSet(Arrays.asList( "ContextInformationPopup.createContextInfoPopup()"))); protected static ProtocolFactory factory = ProtocolFactory.eINSTANCE; @@ -877,7 +878,7 @@ private static Point getMouseEventPoint(MouseEvent cmd, Rectangle bounds, return new Point(x, y); } - private static final Map mouseToEventType = new HashMap<>(); + private static final Map mouseToEventType = new HashMap(); static { mouseToEventType.put(MouseEventKind.DOUBLE_CLICK, SWT.MouseDoubleClick); @@ -2483,7 +2484,7 @@ protected Response handleSetSelection(final SetSelection command) { return response; } - final List sels = new ArrayList<>(); + final List sels = new ArrayList(); sels.add(asStringArray(command.getPath())); for (final MultiSelectionItem item : items) { sels.add(asStringArray(item.getPath())); @@ -2527,7 +2528,7 @@ private void updateSelectionFailedMessage(final SetSelection command, else if (!command.getPath().isEmpty() || !command.getAdditionalItems().isEmpty()) { - List items = new ArrayList<>(); + List items = new ArrayList(); String[] path = asStringArray(command.getPath()); if (path != null) items.add(path); @@ -2879,7 +2880,7 @@ else if (lastCommand instanceof SelectCommand) { IWorkbenchWindow[] windows = PlatformUI.getWorkbench() .getWorkbenchWindows(); for (IWorkbenchWindow win : windows) { - Set processed = new HashSet<>(); + Set processed = new HashSet(); processChildren(win, root2, processed); } From c622cc16fcd70d80edadd2ecf4cf23a83fba2c90 Mon Sep 17 00:00:00 2001 From: Evgeny Lipkin Date: Thu, 8 Sep 2016 13:16:18 +0700 Subject: [PATCH 15/18] used GridLayoutFactory and GridDataFactory --- .../assertion/AUTControlsHierarchyView.java | 14 +++++----- .../assertion/AssertionPanelWindow.java | 28 ++++++++++--------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AUTControlsHierarchyView.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AUTControlsHierarchyView.java index 601397f15..85422e239 100644 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AUTControlsHierarchyView.java +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AUTControlsHierarchyView.java @@ -7,6 +7,7 @@ import org.eclipse.core.runtime.jobs.IJobChangeEvent; import org.eclipse.core.runtime.jobs.IJobChangeListener; +import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.jface.layout.TreeColumnLayout; import org.eclipse.jface.viewers.ColumnLabelProvider; import org.eclipse.jface.viewers.ColumnWeightData; @@ -28,7 +29,6 @@ import org.eclipse.rcptt.ui.panels.assertion.tree.AssertionTreeModel; import org.eclipse.rcptt.ui.panels.assertion.tree.AssertionTreeViewer; import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Tree; @@ -62,7 +62,7 @@ public void createPartControl(Composite parent) { final Composite treeComposite = new Composite(parent, SWT.NONE); final TreeColumnLayout layout = new TreeColumnLayout(); treeComposite.setLayout(layout); - treeComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(treeComposite); final Tree tree = new Tree(treeComposite, SWT.BORDER | SWT.FULL_SELECTION); tree.setHeaderVisible(true); @@ -80,10 +80,10 @@ public int hashCode(Object element) { } @Override - public boolean equals(Object a, Object b) { - if (a instanceof AssertionTreeModel && b instanceof AssertionTreeModel) { - AssertionTreeModel model1 = (AssertionTreeModel) a; - AssertionTreeModel model2 = (AssertionTreeModel) b; + public boolean equals(Object object1, Object object2) { + if (object1 instanceof AssertionTreeModel && object2 instanceof AssertionTreeModel) { + AssertionTreeModel model1 = (AssertionTreeModel) object1; + AssertionTreeModel model2 = (AssertionTreeModel) object2; if (model1.getUIElement() == null || model2.getUIElement() == null) { return model1.getUIElement() == model2.getUIElement(); } @@ -92,7 +92,7 @@ public boolean equals(Object a, Object b) { } return model1.getUIElement().getId().equals(model2.getUIElement().getId()); } - return Objects.equals(a, b); + return Objects.equals(object1, object2); } }); diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java index c1c7f7c6d..251ecde60 100644 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java @@ -482,11 +482,10 @@ protected Control createContents(Composite parent) { final Composite composite = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(2).applyTo(composite); - composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(composite); autControlsWidgetComposite = new Composite(composite, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(2).applyTo(autControlsWidgetComposite); - autControlsWidgetComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); autControlsWidgetCompositeGridData = new GridData(SWT.FILL, SWT.FILL, true, true); autControlsWidgetCompositeGridData.exclude = true; @@ -497,12 +496,12 @@ protected Control createContents(Composite parent) { autControlsView.createPartControl(autControlsWidgetComposite); final Composite assertionComposite = new Composite(composite, SWT.NONE); - assertionComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); - assertionComposite.setLayout(new GridLayout()); + GridLayoutFactory.fillDefaults().applyTo(assertionComposite); + GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(assertionComposite); final Composite toolbarComposite = new Composite(assertionComposite, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(2).applyTo(toolbarComposite); - toolbarComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); + GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(toolbarComposite); final ActionToolbar actions = new ActionToolbar() { @Override @@ -521,7 +520,9 @@ protected void fill(ToolBarManager manager) { dbc.bindValue(Actions.observeEnabled(collapseAll), hasAssert); } }; - actions.create(toolbarComposite).setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); + + GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false) + .applyTo(actions.create(toolbarComposite)); final MenuToolbar menu = new MenuToolbar() { @Override @@ -534,11 +535,14 @@ public void run() { }); }; }; - menu.create(toolbarComposite).setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false)); + GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).grab(true, false) + .applyTo(menu.create(toolbarComposite)); - createTreeViewer(assertionComposite).setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true) + .applyTo(createTreeViewer(assertionComposite)); - createButtonPanel(assertionComposite).setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); + GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false) + .applyTo(createButtonPanel(assertionComposite)); return composite; } @@ -557,7 +561,7 @@ protected Composite createFilterComposite(Composite parent) { filterComposite.setLayout(filteredCompositeLayout); filterCombo = new CCombo(filterComposite, SWT.READ_ONLY); - filterCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); + GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(false, false).applyTo(filterCombo); filterCombo.setItems(new String[] { Messages.AssertionPanelWindow_FilterByProperty, Messages.AssertionPanelWindow_FilterByValue }); filterCombo.select(1); @@ -574,7 +578,7 @@ public void widgetDefaultSelected(SelectionEvent e) { }); filterText = new Text(filterComposite, SWT.SINGLE); - filterText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); + GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(filterText); filterText.setMessage(Messages.AssertionPanelWindow_FilterMessage); filterText.addKeyListener(new KeyListener() { @Override @@ -771,8 +775,6 @@ public void widgetSelected(SelectionEvent e) { } }); - // createVerificationsButton(composite); - appendButton = new Button(composite, SWT.NONE); GridDataFactory.swtDefaults().align(SWT.RIGHT, SWT.CENTER).grab(true, false).hint(120, SWT.DEFAULT) From ecfa1c53c6eb5d69c30d47a557df7086ef485f1d Mon Sep 17 00:00:00 2001 From: Evgeny Lipkin Date: Thu, 8 Sep 2016 13:17:24 +0700 Subject: [PATCH 16/18] added check for null and refactored --- .../runtime/ui/AUTControlsHierarchyService.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AUTControlsHierarchyService.java b/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AUTControlsHierarchyService.java index 49dd686c4..87eb1452e 100644 --- a/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AUTControlsHierarchyService.java +++ b/runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/AUTControlsHierarchyService.java @@ -148,18 +148,18 @@ private IStatus getParent(AUTControlsHierarchy autControlsHierarchy) throws Core return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Display disposed"); } + if (null == swtUIElement) { + return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "swtUIElement is null"); + } + getDisplay().syncExec(new Runnable() { @Override public void run() { SWTUIElement swtUIParent = AUTControlsHierarchyUtilities.getSWTUIParent(getDisplay(), swtUIElement); - // if (null != swtUIParent) { - AUTControlsHierarchyUtilities.initResponse(getDisplay(), - AUTControlsHierarchyUtilities.getElement(swtUIParent), swtUIParent, response); - // } else { - // AUTControlsHierarchyUtilities.initResponse(getDisplay(), null, null, response); - // } + AUTControlsHierarchyUtilities.initResponse(getDisplay(), + AUTControlsHierarchyUtilities.getElement(swtUIParent), swtUIParent, response); try { write(response); From 4970841659cd13a53e1649e161b37261843364e7 Mon Sep 17 00:00:00 2001 From: Evgeny Lipkin Date: Thu, 8 Sep 2016 13:28:15 +0700 Subject: [PATCH 17/18] fixed getDisplay(), added check for null and refactored --- .../ui/rap/AUTControlsHierarchyService.java | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/src/org/eclipse/rcptt/internal/runtime/ui/rap/AUTControlsHierarchyService.java b/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/src/org/eclipse/rcptt/internal/runtime/ui/rap/AUTControlsHierarchyService.java index 4b40509fd..e47a7ab31 100644 --- a/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/src/org/eclipse/rcptt/internal/runtime/ui/rap/AUTControlsHierarchyService.java +++ b/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/src/org/eclipse/rcptt/internal/runtime/ui/rap/AUTControlsHierarchyService.java @@ -29,8 +29,6 @@ public class AUTControlsHierarchyService implements ICommandService { private IProcess context = null; - private Display display = null; - public IStatus service(Command command, IProcess context) throws InterruptedException, CoreException { @@ -62,10 +60,7 @@ private void write(Object object) throws CoreException { } private Display getDisplay() { - if (null == display) { - display = RWTUtils.findDisplay(); - } - return display; + return RWTUtils.findDisplay(); } private IStatus highlightWidget(AUTControlsHierarchy autControlsHierarchy) throws CoreException { @@ -148,18 +143,18 @@ private IStatus getParent(AUTControlsHierarchy autControlsHierarchy) throws Core return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Display disposed"); } + if (null == swtUIElement) { + return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "swtUIElement is null"); + } + getDisplay().syncExec(new Runnable() { @Override public void run() { SWTUIElement swtUIParent = AUTControlsHierarchyUtilities.getSWTUIParent(getDisplay(), swtUIElement); - // if (null != swtUIParent) { - AUTControlsHierarchyUtilities.initResponse(getDisplay(), - AUTControlsHierarchyUtilities.getElement(swtUIParent), swtUIParent, response); - // } else { - // AUTControlsHierarchyUtilities.initResponse(getDisplay(), null, null, response); - // } + AUTControlsHierarchyUtilities.initResponse(getDisplay(), + AUTControlsHierarchyUtilities.getElement(swtUIParent), swtUIParent, response); try { write(response); From ee8486ba09f61b0aca7cc32a918b14b7e4d65d5a Mon Sep 17 00:00:00 2001 From: Alexey Ryazanov Date: Wed, 12 Oct 2016 15:44:08 +0700 Subject: [PATCH 18/18] Change command name "AUTControlsHierarchy" -> "GetControlHierarchy", rename view, rename & clean messages. --- ...yState.java => ControlHierarchyState.java} | 48 ++++---- ...ierarchy.java => GetControlHierarchy.java} | 56 ++++++---- .../core/ecl/core/model/Q7CoreFactory.java | 6 +- .../core/ecl/core/model/Q7CorePackage.java | 104 +++++++++--------- ...Impl.java => GetControlHierarchyImpl.java} | 86 ++++++++------- .../core/model/impl/Q7CoreFactoryImpl.java | 22 ++-- .../core/model/impl/Q7CorePackageImpl.java | 66 +++++------ .../core/model/util/Q7CoreAdapterFactory.java | 10 +- .../ecl/core/model/util/Q7CoreSwitch.java | 14 +-- .../model/model.ecore | 8 +- .../model/q7core.genmodel | 55 ++++++++- .../plugin.xml | 4 +- ...e.java => GetControlHierarchyService.java} | 32 +++--- ...java => GetControlHierarchyUtilities.java} | 6 +- .../eclipse/rcptt/internal/ui/Messages.java | 6 +- .../rcptt/internal/ui/messages.properties | 8 +- .../assertion/AssertionPanelWindow.java | 4 +- ...chyView.java => ControlHierarchyView.java} | 20 +++- .../UIHierarchyResponseUtilities.java | 30 ++--- .../org.eclipse.rcptt.runtime.ui/plugin.xml | 4 +- ...e.java => GetControlHierarchyService.java} | 32 +++--- ...java => GetControlHierarchyUtilities.java} | 16 ++- 22 files changed, 366 insertions(+), 271 deletions(-) rename core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/{AUTControlsHierarchyState.java => ControlHierarchyState.java} (73%) rename core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/{AUTControlsHierarchy.java => GetControlHierarchy.java} (63%) rename core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/{AUTControlsHierarchyImpl.java => GetControlHierarchyImpl.java} (67%) rename modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/src/org/eclipse/rcptt/internal/runtime/ui/rap/{AUTControlsHierarchyService.java => GetControlHierarchyService.java} (75%) rename modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/src/org/eclipse/rcptt/internal/runtime/ui/rap/{AUTControlsHierarchyUtilities.java => GetControlHierarchyUtilities.java} (96%) rename rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/{AUTControlsHierarchyView.java => ControlHierarchyView.java} (90%) rename runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/{AUTControlsHierarchyService.java => GetControlHierarchyService.java} (75%) rename runtime/org.eclipse.rcptt.runtime.ui/src/org/eclipse/rcptt/internal/runtime/ui/{AUTControlsHierarchyUtilities.java => GetControlHierarchyUtilities.java} (86%) diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchyState.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/ControlHierarchyState.java similarity index 73% rename from core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchyState.java rename to core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/ControlHierarchyState.java index 37177b6a2..49ca0c2d0 100644 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchyState.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/ControlHierarchyState.java @@ -1,5 +1,13 @@ -/** - */ +/******************************************************************************* + * Copyright (c) 2009, 2016 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.core.ecl.core.model; import java.util.Arrays; @@ -10,14 +18,14 @@ /** * - * A representation of the literals of the enumeration 'AUT Controls Hierarchy State', + * A representation of the literals of the enumeration 'Control Hierarchy State', * and utility methods for working with them. * - * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAUTControlsHierarchyState() + * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getControlHierarchyState() * @model * @generated */ -public enum AUTControlsHierarchyState implements Enumerator { +public enum ControlHierarchyState implements Enumerator { /** * The 'HIGHLIGHT WIDGET' literal object. * @@ -119,13 +127,13 @@ public enum AUTControlsHierarchyState implements Enumerator { public static final int GET_PARENT_VALUE = 3; /** - * An array of all the 'AUT Controls Hierarchy State' enumerators. + * An array of all the 'Control Hierarchy State' enumerators. * * * @generated */ - private static final AUTControlsHierarchyState[] VALUES_ARRAY = - new AUTControlsHierarchyState[] { + private static final ControlHierarchyState[] VALUES_ARRAY = + new ControlHierarchyState[] { HIGHLIGHT_WIDGET, UPDATE_ASSERT_WINDOW, GET_ELEMENT, @@ -133,24 +141,24 @@ public enum AUTControlsHierarchyState implements Enumerator { }; /** - * A public read-only list of all the 'AUT Controls Hierarchy State' enumerators. + * A public read-only list of all the 'Control Hierarchy State' enumerators. * * * @generated */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** - * Returns the 'AUT Controls Hierarchy State' literal with the specified literal value. + * Returns the 'Control Hierarchy State' literal with the specified literal value. * * * @param literal the literal. * @return the matching enumerator or null. * @generated */ - public static AUTControlsHierarchyState get(String literal) { + public static ControlHierarchyState get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { - AUTControlsHierarchyState result = VALUES_ARRAY[i]; + ControlHierarchyState result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } @@ -159,16 +167,16 @@ public static AUTControlsHierarchyState get(String literal) { } /** - * Returns the 'AUT Controls Hierarchy State' literal with the specified name. + * Returns the 'Control Hierarchy State' literal with the specified name. * * * @param name the name. * @return the matching enumerator or null. * @generated */ - public static AUTControlsHierarchyState getByName(String name) { + public static ControlHierarchyState getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { - AUTControlsHierarchyState result = VALUES_ARRAY[i]; + ControlHierarchyState result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } @@ -177,14 +185,14 @@ public static AUTControlsHierarchyState getByName(String name) { } /** - * Returns the 'AUT Controls Hierarchy State' literal with the specified integer value. + * Returns the 'Control Hierarchy State' literal with the specified integer value. * * * @param value the integer value. * @return the matching enumerator or null. * @generated */ - public static AUTControlsHierarchyState get(int value) { + public static ControlHierarchyState get(int value) { switch (value) { case HIGHLIGHT_WIDGET_VALUE: return HIGHLIGHT_WIDGET; case UPDATE_ASSERT_WINDOW_VALUE: return UPDATE_ASSERT_WINDOW; @@ -221,7 +229,7 @@ public static AUTControlsHierarchyState get(int value) { * * @generated */ - private AUTControlsHierarchyState(int value, String name, String literal) { + private ControlHierarchyState(int value, String name, String literal) { this.value = value; this.name = name; this.literal = literal; @@ -265,4 +273,4 @@ public String toString() { return literal; } -} //AUTControlsHierarchyState +} //ControlHierarchyState diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchy.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/GetControlHierarchy.java similarity index 63% rename from core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchy.java rename to core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/GetControlHierarchy.java index 4120f2b1e..a60133692 100644 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/AUTControlsHierarchy.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/GetControlHierarchy.java @@ -1,29 +1,37 @@ -/** - */ +/******************************************************************************* + * Copyright (c) 2009, 2016 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.core.ecl.core.model; import org.eclipse.rcptt.ecl.core.Command; /** * - * A representation of the model object 'AUT Controls Hierarchy'. + * A representation of the model object 'Get Control Hierarchy'. * * *

* The following features are supported: *

*
    - *
  • {@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getId Id}
  • - *
  • {@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getState State}
  • - *
  • {@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getDescription Description}
  • - *
  • {@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getKind Kind}
  • + *
  • {@link org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy#getId Id}
  • + *
  • {@link org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy#getState State}
  • + *
  • {@link org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy#getDescription Description}
  • + *
  • {@link org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy#getKind Kind}
  • *
* - * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAUTControlsHierarchy() + * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getGetControlHierarchy() * @model * @generated */ -public interface AUTControlsHierarchy extends Command { +public interface GetControlHierarchy extends Command { /** * Returns the value of the 'Id' attribute. * The default value is "". @@ -35,14 +43,14 @@ public interface AUTControlsHierarchy extends Command { * * @return the value of the 'Id' attribute. * @see #setId(String) - * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAUTControlsHierarchy_Id() + * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getGetControlHierarchy_Id() * @model default="" * @generated */ String getId(); /** - * Sets the value of the '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getId Id}' attribute. + * Sets the value of the '{@link org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy#getId Id}' attribute. * * * @param value the new value of the 'Id' attribute. @@ -53,7 +61,7 @@ public interface AUTControlsHierarchy extends Command { /** * Returns the value of the 'State' attribute. - * The literals are from the enumeration {@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState}. + * The literals are from the enumeration {@link org.eclipse.rcptt.core.ecl.core.model.ControlHierarchyState}. * *

* If the meaning of the 'State' attribute isn't clear, @@ -61,24 +69,24 @@ public interface AUTControlsHierarchy extends Command { *

* * @return the value of the 'State' attribute. - * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState - * @see #setState(AUTControlsHierarchyState) - * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAUTControlsHierarchy_State() + * @see org.eclipse.rcptt.core.ecl.core.model.ControlHierarchyState + * @see #setState(ControlHierarchyState) + * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getGetControlHierarchy_State() * @model * @generated */ - AUTControlsHierarchyState getState(); + ControlHierarchyState getState(); /** - * Sets the value of the '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getState State}' attribute. + * Sets the value of the '{@link org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy#getState State}' attribute. * * * @param value the new value of the 'State' attribute. - * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState + * @see org.eclipse.rcptt.core.ecl.core.model.ControlHierarchyState * @see #getState() * @generated */ - void setState(AUTControlsHierarchyState value); + void setState(ControlHierarchyState value); /** * Returns the value of the 'Description' attribute. @@ -91,14 +99,14 @@ public interface AUTControlsHierarchy extends Command { * * @return the value of the 'Description' attribute. * @see #setDescription(String) - * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAUTControlsHierarchy_Description() + * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getGetControlHierarchy_Description() * @model default="" * @generated */ String getDescription(); /** - * Sets the value of the '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getDescription Description}' attribute. + * Sets the value of the '{@link org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy#getDescription Description}' attribute. * * * @param value the new value of the 'Description' attribute. @@ -118,14 +126,14 @@ public interface AUTControlsHierarchy extends Command { * * @return the value of the 'Kind' attribute. * @see #setKind(String) - * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getAUTControlsHierarchy_Kind() + * @see org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage#getGetControlHierarchy_Kind() * @model default="" * @generated */ String getKind(); /** - * Sets the value of the '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getKind Kind}' attribute. + * Sets the value of the '{@link org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy#getKind Kind}' attribute. * * * @param value the new value of the 'Kind' attribute. @@ -134,4 +142,4 @@ public interface AUTControlsHierarchy extends Command { */ void setKind(String value); -} // AUTControlsHierarchy +} // GetControlHierarchy diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CoreFactory.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CoreFactory.java index ce4dc5f29..032f6e708 100755 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CoreFactory.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CoreFactory.java @@ -246,13 +246,13 @@ public interface Q7CoreFactory extends EFactory { TerminateAut createTerminateAut(); /** - * Returns a new object of class 'AUT Controls Hierarchy'. + * Returns a new object of class 'Get Control Hierarchy'. * * - * @return a new object of class 'AUT Controls Hierarchy'. + * @return a new object of class 'Get Control Hierarchy'. * @generated */ - AUTControlsHierarchy createAUTControlsHierarchy(); + GetControlHierarchy createGetControlHierarchy(); /** * Returns the package supported by this factory. diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CorePackage.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CorePackage.java index 6f964e449..938150c16 100755 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CorePackage.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/Q7CorePackage.java @@ -1180,14 +1180,14 @@ public interface Q7CorePackage extends EPackage { int TERMINATE_AUT_FEATURE_COUNT = CorePackage.COMMAND_FEATURE_COUNT + 0; /** - * The meta object id for the '{@link org.eclipse.rcptt.core.ecl.core.model.impl.AUTControlsHierarchyImpl AUT Controls Hierarchy}' class. + * The meta object id for the '{@link org.eclipse.rcptt.core.ecl.core.model.impl.GetControlHierarchyImpl Get Control Hierarchy}' class. * * - * @see org.eclipse.rcptt.core.ecl.core.model.impl.AUTControlsHierarchyImpl - * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getAUTControlsHierarchy() + * @see org.eclipse.rcptt.core.ecl.core.model.impl.GetControlHierarchyImpl + * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getGetControlHierarchy() * @generated */ - int AUT_CONTROLS_HIERARCHY = 24; + int GET_CONTROL_HIERARCHY = 24; /** * The feature id for the 'Host' attribute. @@ -1196,7 +1196,7 @@ public interface Q7CorePackage extends EPackage { * @generated * @ordered */ - int AUT_CONTROLS_HIERARCHY__HOST = CorePackage.COMMAND__HOST; + int GET_CONTROL_HIERARCHY__HOST = CorePackage.COMMAND__HOST; /** * The feature id for the 'Bindings' containment reference list. @@ -1205,7 +1205,7 @@ public interface Q7CorePackage extends EPackage { * @generated * @ordered */ - int AUT_CONTROLS_HIERARCHY__BINDINGS = CorePackage.COMMAND__BINDINGS; + int GET_CONTROL_HIERARCHY__BINDINGS = CorePackage.COMMAND__BINDINGS; /** * The feature id for the 'Id' attribute. @@ -1214,7 +1214,7 @@ public interface Q7CorePackage extends EPackage { * @generated * @ordered */ - int AUT_CONTROLS_HIERARCHY__ID = CorePackage.COMMAND_FEATURE_COUNT + 0; + int GET_CONTROL_HIERARCHY__ID = CorePackage.COMMAND_FEATURE_COUNT + 0; /** * The feature id for the 'State' attribute. @@ -1223,7 +1223,7 @@ public interface Q7CorePackage extends EPackage { * @generated * @ordered */ - int AUT_CONTROLS_HIERARCHY__STATE = CorePackage.COMMAND_FEATURE_COUNT + 1; + int GET_CONTROL_HIERARCHY__STATE = CorePackage.COMMAND_FEATURE_COUNT + 1; /** * The feature id for the 'Description' attribute. @@ -1232,7 +1232,7 @@ public interface Q7CorePackage extends EPackage { * @generated * @ordered */ - int AUT_CONTROLS_HIERARCHY__DESCRIPTION = CorePackage.COMMAND_FEATURE_COUNT + 2; + int GET_CONTROL_HIERARCHY__DESCRIPTION = CorePackage.COMMAND_FEATURE_COUNT + 2; /** * The feature id for the 'Kind' attribute. @@ -1241,16 +1241,16 @@ public interface Q7CorePackage extends EPackage { * @generated * @ordered */ - int AUT_CONTROLS_HIERARCHY__KIND = CorePackage.COMMAND_FEATURE_COUNT + 3; + int GET_CONTROL_HIERARCHY__KIND = CorePackage.COMMAND_FEATURE_COUNT + 3; /** - * The number of structural features of the 'AUT Controls Hierarchy' class. + * The number of structural features of the 'Get Control Hierarchy' class. * * * @generated * @ordered */ - int AUT_CONTROLS_HIERARCHY_FEATURE_COUNT = CorePackage.COMMAND_FEATURE_COUNT + 4; + int GET_CONTROL_HIERARCHY_FEATURE_COUNT = CorePackage.COMMAND_FEATURE_COUNT + 4; /** * The meta object id for the '{@link org.eclipse.rcptt.core.ecl.core.model.ExecutionPhase Execution Phase}' enum. @@ -1263,14 +1263,14 @@ public interface Q7CorePackage extends EPackage { int EXECUTION_PHASE = 25; /** - * The meta object id for the '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState AUT Controls Hierarchy State}' enum. + * The meta object id for the '{@link org.eclipse.rcptt.core.ecl.core.model.ControlHierarchyState Control Hierarchy State}' enum. * * - * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState - * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getAUTControlsHierarchyState() + * @see org.eclipse.rcptt.core.ecl.core.model.ControlHierarchyState + * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getControlHierarchyState() * @generated */ - int AUT_CONTROLS_HIERARCHY_STATE = 26; + int CONTROL_HIERARCHY_STATE = 26; /** * Returns the meta object for class '{@link org.eclipse.rcptt.core.ecl.core.model.EnterContext Enter Context}'. @@ -1909,58 +1909,58 @@ public interface Q7CorePackage extends EPackage { EClass getTerminateAut(); /** - * Returns the meta object for class '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy AUT Controls Hierarchy}'. + * Returns the meta object for class '{@link org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy Get Control Hierarchy}'. * * - * @return the meta object for class 'AUT Controls Hierarchy'. - * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy + * @return the meta object for class 'Get Control Hierarchy'. + * @see org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy * @generated */ - EClass getAUTControlsHierarchy(); + EClass getGetControlHierarchy(); /** - * Returns the meta object for the attribute '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getId Id}'. + * Returns the meta object for the attribute '{@link org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy#getId Id}'. * * * @return the meta object for the attribute 'Id'. - * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getId() - * @see #getAUTControlsHierarchy() + * @see org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy#getId() + * @see #getGetControlHierarchy() * @generated */ - EAttribute getAUTControlsHierarchy_Id(); + EAttribute getGetControlHierarchy_Id(); /** - * Returns the meta object for the attribute '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getState State}'. + * Returns the meta object for the attribute '{@link org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy#getState State}'. * * * @return the meta object for the attribute 'State'. - * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getState() - * @see #getAUTControlsHierarchy() + * @see org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy#getState() + * @see #getGetControlHierarchy() * @generated */ - EAttribute getAUTControlsHierarchy_State(); + EAttribute getGetControlHierarchy_State(); /** - * Returns the meta object for the attribute '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getDescription Description}'. + * Returns the meta object for the attribute '{@link org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy#getDescription Description}'. * * * @return the meta object for the attribute 'Description'. - * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getDescription() - * @see #getAUTControlsHierarchy() + * @see org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy#getDescription() + * @see #getGetControlHierarchy() * @generated */ - EAttribute getAUTControlsHierarchy_Description(); + EAttribute getGetControlHierarchy_Description(); /** - * Returns the meta object for the attribute '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getKind Kind}'. + * Returns the meta object for the attribute '{@link org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy#getKind Kind}'. * * * @return the meta object for the attribute 'Kind'. - * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy#getKind() - * @see #getAUTControlsHierarchy() + * @see org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy#getKind() + * @see #getGetControlHierarchy() * @generated */ - EAttribute getAUTControlsHierarchy_Kind(); + EAttribute getGetControlHierarchy_Kind(); /** * Returns the meta object for enum '{@link org.eclipse.rcptt.core.ecl.core.model.ExecutionPhase Execution Phase}'. @@ -1973,14 +1973,14 @@ public interface Q7CorePackage extends EPackage { EEnum getExecutionPhase(); /** - * Returns the meta object for enum '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState AUT Controls Hierarchy State}'. + * Returns the meta object for enum '{@link org.eclipse.rcptt.core.ecl.core.model.ControlHierarchyState Control Hierarchy State}'. * * - * @return the meta object for enum 'AUT Controls Hierarchy State'. - * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState + * @return the meta object for enum 'Control Hierarchy State'. + * @see org.eclipse.rcptt.core.ecl.core.model.ControlHierarchyState * @generated */ - EEnum getAUTControlsHierarchyState(); + EEnum getControlHierarchyState(); /** * Returns the factory that creates the instances of the model. @@ -2533,14 +2533,14 @@ interface Literals { EClass TERMINATE_AUT = eINSTANCE.getTerminateAut(); /** - * The meta object literal for the '{@link org.eclipse.rcptt.core.ecl.core.model.impl.AUTControlsHierarchyImpl AUT Controls Hierarchy}' class. + * The meta object literal for the '{@link org.eclipse.rcptt.core.ecl.core.model.impl.GetControlHierarchyImpl Get Control Hierarchy}' class. * * - * @see org.eclipse.rcptt.core.ecl.core.model.impl.AUTControlsHierarchyImpl - * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getAUTControlsHierarchy() + * @see org.eclipse.rcptt.core.ecl.core.model.impl.GetControlHierarchyImpl + * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getGetControlHierarchy() * @generated */ - EClass AUT_CONTROLS_HIERARCHY = eINSTANCE.getAUTControlsHierarchy(); + EClass GET_CONTROL_HIERARCHY = eINSTANCE.getGetControlHierarchy(); /** * The meta object literal for the 'Id' attribute feature. @@ -2548,7 +2548,7 @@ interface Literals { * * @generated */ - EAttribute AUT_CONTROLS_HIERARCHY__ID = eINSTANCE.getAUTControlsHierarchy_Id(); + EAttribute GET_CONTROL_HIERARCHY__ID = eINSTANCE.getGetControlHierarchy_Id(); /** * The meta object literal for the 'State' attribute feature. @@ -2556,7 +2556,7 @@ interface Literals { * * @generated */ - EAttribute AUT_CONTROLS_HIERARCHY__STATE = eINSTANCE.getAUTControlsHierarchy_State(); + EAttribute GET_CONTROL_HIERARCHY__STATE = eINSTANCE.getGetControlHierarchy_State(); /** * The meta object literal for the 'Description' attribute feature. @@ -2564,7 +2564,7 @@ interface Literals { * * @generated */ - EAttribute AUT_CONTROLS_HIERARCHY__DESCRIPTION = eINSTANCE.getAUTControlsHierarchy_Description(); + EAttribute GET_CONTROL_HIERARCHY__DESCRIPTION = eINSTANCE.getGetControlHierarchy_Description(); /** * The meta object literal for the 'Kind' attribute feature. @@ -2572,7 +2572,7 @@ interface Literals { * * @generated */ - EAttribute AUT_CONTROLS_HIERARCHY__KIND = eINSTANCE.getAUTControlsHierarchy_Kind(); + EAttribute GET_CONTROL_HIERARCHY__KIND = eINSTANCE.getGetControlHierarchy_Kind(); /** * The meta object literal for the '{@link org.eclipse.rcptt.core.ecl.core.model.ExecutionPhase Execution Phase}' enum. @@ -2585,14 +2585,14 @@ interface Literals { EEnum EXECUTION_PHASE = eINSTANCE.getExecutionPhase(); /** - * The meta object literal for the '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState AUT Controls Hierarchy State}' enum. + * The meta object literal for the '{@link org.eclipse.rcptt.core.ecl.core.model.ControlHierarchyState Control Hierarchy State}' enum. * * - * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState - * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getAUTControlsHierarchyState() + * @see org.eclipse.rcptt.core.ecl.core.model.ControlHierarchyState + * @see org.eclipse.rcptt.core.ecl.core.model.impl.Q7CorePackageImpl#getControlHierarchyState() * @generated */ - EEnum AUT_CONTROLS_HIERARCHY_STATE = eINSTANCE.getAUTControlsHierarchyState(); + EEnum CONTROL_HIERARCHY_STATE = eINSTANCE.getControlHierarchyState(); } diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AUTControlsHierarchyImpl.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/GetControlHierarchyImpl.java similarity index 67% rename from core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AUTControlsHierarchyImpl.java rename to core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/GetControlHierarchyImpl.java index 1559b10c7..033d1a48a 100644 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/AUTControlsHierarchyImpl.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/GetControlHierarchyImpl.java @@ -1,5 +1,13 @@ -/** - */ +/******************************************************************************* + * Copyright (c) 2009, 2016 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.core.ecl.core.model.impl; import org.eclipse.emf.common.notify.Notification; @@ -8,29 +16,29 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy; -import org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState; +import org.eclipse.rcptt.core.ecl.core.model.ControlHierarchyState; +import org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy; import org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage; import org.eclipse.rcptt.ecl.core.impl.CommandImpl; /** * - * An implementation of the model object 'AUT Controls Hierarchy'. + * An implementation of the model object 'Get Control Hierarchy'. * *

* The following features are implemented: *

*
    - *
  • {@link org.eclipse.rcptt.core.ecl.core.model.impl.AUTControlsHierarchyImpl#getId Id}
  • - *
  • {@link org.eclipse.rcptt.core.ecl.core.model.impl.AUTControlsHierarchyImpl#getState State}
  • - *
  • {@link org.eclipse.rcptt.core.ecl.core.model.impl.AUTControlsHierarchyImpl#getDescription Description}
  • - *
  • {@link org.eclipse.rcptt.core.ecl.core.model.impl.AUTControlsHierarchyImpl#getKind Kind}
  • + *
  • {@link org.eclipse.rcptt.core.ecl.core.model.impl.GetControlHierarchyImpl#getId Id}
  • + *
  • {@link org.eclipse.rcptt.core.ecl.core.model.impl.GetControlHierarchyImpl#getState State}
  • + *
  • {@link org.eclipse.rcptt.core.ecl.core.model.impl.GetControlHierarchyImpl#getDescription Description}
  • + *
  • {@link org.eclipse.rcptt.core.ecl.core.model.impl.GetControlHierarchyImpl#getKind Kind}
  • *
* * @generated */ -public class AUTControlsHierarchyImpl extends CommandImpl implements AUTControlsHierarchy { +public class GetControlHierarchyImpl extends CommandImpl implements GetControlHierarchy { /** * The default value of the '{@link #getId() Id}' attribute. * @@ -59,7 +67,7 @@ public class AUTControlsHierarchyImpl extends CommandImpl implements AUTControls * @generated * @ordered */ - protected static final AUTControlsHierarchyState STATE_EDEFAULT = AUTControlsHierarchyState.HIGHLIGHT_WIDGET; + protected static final ControlHierarchyState STATE_EDEFAULT = ControlHierarchyState.HIGHLIGHT_WIDGET; /** * The cached value of the '{@link #getState() State}' attribute. @@ -69,7 +77,7 @@ public class AUTControlsHierarchyImpl extends CommandImpl implements AUTControls * @generated * @ordered */ - protected AUTControlsHierarchyState state = STATE_EDEFAULT; + protected ControlHierarchyState state = STATE_EDEFAULT; /** * The default value of the '{@link #getDescription() Description}' attribute. @@ -116,7 +124,7 @@ public class AUTControlsHierarchyImpl extends CommandImpl implements AUTControls * * @generated */ - protected AUTControlsHierarchyImpl() { + protected GetControlHierarchyImpl() { super(); } @@ -127,7 +135,7 @@ protected AUTControlsHierarchyImpl() { */ @Override protected EClass eStaticClass() { - return Q7CorePackage.Literals.AUT_CONTROLS_HIERARCHY; + return Q7CorePackage.Literals.GET_CONTROL_HIERARCHY; } /** @@ -148,7 +156,7 @@ public void setId(String newId) { String oldId = id; id = newId; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.AUT_CONTROLS_HIERARCHY__ID, oldId, id)); + eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.GET_CONTROL_HIERARCHY__ID, oldId, id)); } /** @@ -156,7 +164,7 @@ public void setId(String newId) { * * @generated */ - public AUTControlsHierarchyState getState() { + public ControlHierarchyState getState() { return state; } @@ -165,11 +173,11 @@ public AUTControlsHierarchyState getState() { * * @generated */ - public void setState(AUTControlsHierarchyState newState) { - AUTControlsHierarchyState oldState = state; + public void setState(ControlHierarchyState newState) { + ControlHierarchyState oldState = state; state = newState == null ? STATE_EDEFAULT : newState; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.AUT_CONTROLS_HIERARCHY__STATE, oldState, state)); + eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.GET_CONTROL_HIERARCHY__STATE, oldState, state)); } /** @@ -190,7 +198,7 @@ public void setDescription(String newDescription) { String oldDescription = description; description = newDescription; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.AUT_CONTROLS_HIERARCHY__DESCRIPTION, oldDescription, description)); + eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.GET_CONTROL_HIERARCHY__DESCRIPTION, oldDescription, description)); } /** @@ -211,7 +219,7 @@ public void setKind(String newKind) { String oldKind = kind; kind = newKind; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.AUT_CONTROLS_HIERARCHY__KIND, oldKind, kind)); + eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.GET_CONTROL_HIERARCHY__KIND, oldKind, kind)); } /** @@ -222,13 +230,13 @@ public void setKind(String newKind) { @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case Q7CorePackage.AUT_CONTROLS_HIERARCHY__ID: + case Q7CorePackage.GET_CONTROL_HIERARCHY__ID: return getId(); - case Q7CorePackage.AUT_CONTROLS_HIERARCHY__STATE: + case Q7CorePackage.GET_CONTROL_HIERARCHY__STATE: return getState(); - case Q7CorePackage.AUT_CONTROLS_HIERARCHY__DESCRIPTION: + case Q7CorePackage.GET_CONTROL_HIERARCHY__DESCRIPTION: return getDescription(); - case Q7CorePackage.AUT_CONTROLS_HIERARCHY__KIND: + case Q7CorePackage.GET_CONTROL_HIERARCHY__KIND: return getKind(); } return super.eGet(featureID, resolve, coreType); @@ -242,16 +250,16 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case Q7CorePackage.AUT_CONTROLS_HIERARCHY__ID: + case Q7CorePackage.GET_CONTROL_HIERARCHY__ID: setId((String)newValue); return; - case Q7CorePackage.AUT_CONTROLS_HIERARCHY__STATE: - setState((AUTControlsHierarchyState)newValue); + case Q7CorePackage.GET_CONTROL_HIERARCHY__STATE: + setState((ControlHierarchyState)newValue); return; - case Q7CorePackage.AUT_CONTROLS_HIERARCHY__DESCRIPTION: + case Q7CorePackage.GET_CONTROL_HIERARCHY__DESCRIPTION: setDescription((String)newValue); return; - case Q7CorePackage.AUT_CONTROLS_HIERARCHY__KIND: + case Q7CorePackage.GET_CONTROL_HIERARCHY__KIND: setKind((String)newValue); return; } @@ -266,16 +274,16 @@ public void eSet(int featureID, Object newValue) { @Override public void eUnset(int featureID) { switch (featureID) { - case Q7CorePackage.AUT_CONTROLS_HIERARCHY__ID: + case Q7CorePackage.GET_CONTROL_HIERARCHY__ID: setId(ID_EDEFAULT); return; - case Q7CorePackage.AUT_CONTROLS_HIERARCHY__STATE: + case Q7CorePackage.GET_CONTROL_HIERARCHY__STATE: setState(STATE_EDEFAULT); return; - case Q7CorePackage.AUT_CONTROLS_HIERARCHY__DESCRIPTION: + case Q7CorePackage.GET_CONTROL_HIERARCHY__DESCRIPTION: setDescription(DESCRIPTION_EDEFAULT); return; - case Q7CorePackage.AUT_CONTROLS_HIERARCHY__KIND: + case Q7CorePackage.GET_CONTROL_HIERARCHY__KIND: setKind(KIND_EDEFAULT); return; } @@ -290,13 +298,13 @@ public void eUnset(int featureID) { @Override public boolean eIsSet(int featureID) { switch (featureID) { - case Q7CorePackage.AUT_CONTROLS_HIERARCHY__ID: + case Q7CorePackage.GET_CONTROL_HIERARCHY__ID: return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); - case Q7CorePackage.AUT_CONTROLS_HIERARCHY__STATE: + case Q7CorePackage.GET_CONTROL_HIERARCHY__STATE: return state != STATE_EDEFAULT; - case Q7CorePackage.AUT_CONTROLS_HIERARCHY__DESCRIPTION: + case Q7CorePackage.GET_CONTROL_HIERARCHY__DESCRIPTION: return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - case Q7CorePackage.AUT_CONTROLS_HIERARCHY__KIND: + case Q7CorePackage.GET_CONTROL_HIERARCHY__KIND: return KIND_EDEFAULT == null ? kind != null : !KIND_EDEFAULT.equals(kind); } return super.eIsSet(featureID); @@ -324,4 +332,4 @@ public String toString() { return result.toString(); } -} //AUTControlsHierarchyImpl +} //GetControlHierarchyImpl diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CoreFactoryImpl.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CoreFactoryImpl.java index afdca6a4f..96a189ce7 100755 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CoreFactoryImpl.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CoreFactoryImpl.java @@ -89,7 +89,7 @@ public EObject create(EClass eClass) { case Q7CorePackage.CREATE_VERIFICATION: return createCreateVerification(); case Q7CorePackage.CREATE_WIDGET_VERIFICATION_PARAM: return createCreateWidgetVerificationParam(); case Q7CorePackage.TERMINATE_AUT: return createTerminateAut(); - case Q7CorePackage.AUT_CONTROLS_HIERARCHY: return createAUTControlsHierarchy(); + case Q7CorePackage.GET_CONTROL_HIERARCHY: return createGetControlHierarchy(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -105,8 +105,8 @@ public Object createFromString(EDataType eDataType, String initialValue) { switch (eDataType.getClassifierID()) { case Q7CorePackage.EXECUTION_PHASE: return createExecutionPhaseFromString(eDataType, initialValue); - case Q7CorePackage.AUT_CONTROLS_HIERARCHY_STATE: - return createAUTControlsHierarchyStateFromString(eDataType, initialValue); + case Q7CorePackage.CONTROL_HIERARCHY_STATE: + return createControlHierarchyStateFromString(eDataType, initialValue); default: throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); } @@ -122,8 +122,8 @@ public String convertToString(EDataType eDataType, Object instanceValue) { switch (eDataType.getClassifierID()) { case Q7CorePackage.EXECUTION_PHASE: return convertExecutionPhaseToString(eDataType, instanceValue); - case Q7CorePackage.AUT_CONTROLS_HIERARCHY_STATE: - return convertAUTControlsHierarchyStateToString(eDataType, instanceValue); + case Q7CorePackage.CONTROL_HIERARCHY_STATE: + return convertControlHierarchyStateToString(eDataType, instanceValue); default: throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); } @@ -374,9 +374,9 @@ public TerminateAut createTerminateAut() { * * @generated */ - public AUTControlsHierarchy createAUTControlsHierarchy() { - AUTControlsHierarchyImpl autControlsHierarchy = new AUTControlsHierarchyImpl(); - return autControlsHierarchy; + public GetControlHierarchy createGetControlHierarchy() { + GetControlHierarchyImpl getControlHierarchy = new GetControlHierarchyImpl(); + return getControlHierarchy; } /** @@ -404,8 +404,8 @@ public String convertExecutionPhaseToString(EDataType eDataType, Object instance * * @generated */ - public AUTControlsHierarchyState createAUTControlsHierarchyStateFromString(EDataType eDataType, String initialValue) { - AUTControlsHierarchyState result = AUTControlsHierarchyState.get(initialValue); + public ControlHierarchyState createControlHierarchyStateFromString(EDataType eDataType, String initialValue) { + ControlHierarchyState result = ControlHierarchyState.get(initialValue); if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); return result; } @@ -415,7 +415,7 @@ public AUTControlsHierarchyState createAUTControlsHierarchyStateFromString(EData * * @generated */ - public String convertAUTControlsHierarchyStateToString(EDataType eDataType, Object instanceValue) { + public String convertControlHierarchyStateToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); } diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java index 453c5f09c..bcecfbef6 100644 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/impl/Q7CorePackageImpl.java @@ -11,9 +11,8 @@ import org.eclipse.emf.ecore.impl.EPackageImpl; -import org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy; -import org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState; import org.eclipse.rcptt.core.ecl.core.model.BeginReportNode; +import org.eclipse.rcptt.core.ecl.core.model.ControlHierarchyState; import org.eclipse.rcptt.core.ecl.core.model.CreateContext; import org.eclipse.rcptt.core.ecl.core.model.CreateReport; import org.eclipse.rcptt.core.ecl.core.model.CreateVerification; @@ -22,6 +21,7 @@ import org.eclipse.rcptt.core.ecl.core.model.EnterContext; import org.eclipse.rcptt.core.ecl.core.model.ExecVerification; import org.eclipse.rcptt.core.ecl.core.model.ExecutionPhase; +import org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy; import org.eclipse.rcptt.core.ecl.core.model.GetPerspectives; import org.eclipse.rcptt.core.ecl.core.model.GetQ7Information; import org.eclipse.rcptt.core.ecl.core.model.GetReport; @@ -229,7 +229,7 @@ public class Q7CorePackageImpl extends EPackageImpl implements Q7CorePackage { * * @generated */ - private EClass autControlsHierarchyEClass = null; + private EClass getControlHierarchyEClass = null; /** * @@ -243,7 +243,7 @@ public class Q7CorePackageImpl extends EPackageImpl implements Q7CorePackage { * * @generated */ - private EEnum autControlsHierarchyStateEEnum = null; + private EEnum controlHierarchyStateEEnum = null; /** * Creates an instance of the model Package, registered with @@ -856,8 +856,8 @@ public EClass getTerminateAut() { * * @generated */ - public EClass getAUTControlsHierarchy() { - return autControlsHierarchyEClass; + public EClass getGetControlHierarchy() { + return getControlHierarchyEClass; } /** @@ -865,8 +865,8 @@ public EClass getAUTControlsHierarchy() { * * @generated */ - public EAttribute getAUTControlsHierarchy_Id() { - return (EAttribute)autControlsHierarchyEClass.getEStructuralFeatures().get(0); + public EAttribute getGetControlHierarchy_Id() { + return (EAttribute)getControlHierarchyEClass.getEStructuralFeatures().get(0); } /** @@ -874,8 +874,8 @@ public EAttribute getAUTControlsHierarchy_Id() { * * @generated */ - public EAttribute getAUTControlsHierarchy_State() { - return (EAttribute)autControlsHierarchyEClass.getEStructuralFeatures().get(1); + public EAttribute getGetControlHierarchy_State() { + return (EAttribute)getControlHierarchyEClass.getEStructuralFeatures().get(1); } /** @@ -883,8 +883,8 @@ public EAttribute getAUTControlsHierarchy_State() { * * @generated */ - public EAttribute getAUTControlsHierarchy_Description() { - return (EAttribute)autControlsHierarchyEClass.getEStructuralFeatures().get(2); + public EAttribute getGetControlHierarchy_Description() { + return (EAttribute)getControlHierarchyEClass.getEStructuralFeatures().get(2); } /** @@ -892,8 +892,8 @@ public EAttribute getAUTControlsHierarchy_Description() { * * @generated */ - public EAttribute getAUTControlsHierarchy_Kind() { - return (EAttribute)autControlsHierarchyEClass.getEStructuralFeatures().get(3); + public EAttribute getGetControlHierarchy_Kind() { + return (EAttribute)getControlHierarchyEClass.getEStructuralFeatures().get(3); } /** @@ -910,8 +910,8 @@ public EEnum getExecutionPhase() { * * @generated */ - public EEnum getAUTControlsHierarchyState() { - return autControlsHierarchyStateEEnum; + public EEnum getControlHierarchyState() { + return controlHierarchyStateEEnum; } /** @@ -1026,15 +1026,15 @@ public void createPackageContents() { terminateAutEClass = createEClass(TERMINATE_AUT); - autControlsHierarchyEClass = createEClass(AUT_CONTROLS_HIERARCHY); - createEAttribute(autControlsHierarchyEClass, AUT_CONTROLS_HIERARCHY__ID); - createEAttribute(autControlsHierarchyEClass, AUT_CONTROLS_HIERARCHY__STATE); - createEAttribute(autControlsHierarchyEClass, AUT_CONTROLS_HIERARCHY__DESCRIPTION); - createEAttribute(autControlsHierarchyEClass, AUT_CONTROLS_HIERARCHY__KIND); + getControlHierarchyEClass = createEClass(GET_CONTROL_HIERARCHY); + createEAttribute(getControlHierarchyEClass, GET_CONTROL_HIERARCHY__ID); + createEAttribute(getControlHierarchyEClass, GET_CONTROL_HIERARCHY__STATE); + createEAttribute(getControlHierarchyEClass, GET_CONTROL_HIERARCHY__DESCRIPTION); + createEAttribute(getControlHierarchyEClass, GET_CONTROL_HIERARCHY__KIND); // Create enums executionPhaseEEnum = createEEnum(EXECUTION_PHASE); - autControlsHierarchyStateEEnum = createEEnum(AUT_CONTROLS_HIERARCHY_STATE); + controlHierarchyStateEEnum = createEEnum(CONTROL_HIERARCHY_STATE); } /** @@ -1090,7 +1090,7 @@ public void initializePackageContents() { resetVerificationsEClass.getESuperTypes().add(theCorePackage.getCommand()); createVerificationEClass.getESuperTypes().add(theCorePackage.getCommand()); terminateAutEClass.getESuperTypes().add(theCorePackage.getCommand()); - autControlsHierarchyEClass.getESuperTypes().add(theCorePackage.getCommand()); + getControlHierarchyEClass.getESuperTypes().add(theCorePackage.getCommand()); // Initialize classes and features; add operations and parameters initEClass(enterContextEClass, EnterContext.class, "EnterContext", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -1177,11 +1177,11 @@ public void initializePackageContents() { initEClass(terminateAutEClass, TerminateAut.class, "TerminateAut", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEClass(autControlsHierarchyEClass, AUTControlsHierarchy.class, "AUTControlsHierarchy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getAUTControlsHierarchy_Id(), theEcorePackage.getEString(), "id", "", 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getAUTControlsHierarchy_State(), this.getAUTControlsHierarchyState(), "state", null, 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getAUTControlsHierarchy_Description(), theEcorePackage.getEString(), "description", "", 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getAUTControlsHierarchy_Kind(), theEcorePackage.getEString(), "kind", "", 0, 1, AUTControlsHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(getControlHierarchyEClass, GetControlHierarchy.class, "GetControlHierarchy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGetControlHierarchy_Id(), theEcorePackage.getEString(), "id", "", 0, 1, GetControlHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGetControlHierarchy_State(), this.getControlHierarchyState(), "state", null, 0, 1, GetControlHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGetControlHierarchy_Description(), theEcorePackage.getEString(), "description", "", 0, 1, GetControlHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGetControlHierarchy_Kind(), theEcorePackage.getEString(), "kind", "", 0, 1, GetControlHierarchy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); // Initialize enums and add enum literals initEEnum(executionPhaseEEnum, ExecutionPhase.class, "ExecutionPhase"); @@ -1190,11 +1190,11 @@ public void initializePackageContents() { addEEnumLiteral(executionPhaseEEnum, ExecutionPhase.RUN); addEEnumLiteral(executionPhaseEEnum, ExecutionPhase.FINISH); - initEEnum(autControlsHierarchyStateEEnum, AUTControlsHierarchyState.class, "AUTControlsHierarchyState"); - addEEnumLiteral(autControlsHierarchyStateEEnum, AUTControlsHierarchyState.HIGHLIGHT_WIDGET); - addEEnumLiteral(autControlsHierarchyStateEEnum, AUTControlsHierarchyState.UPDATE_ASSERT_WINDOW); - addEEnumLiteral(autControlsHierarchyStateEEnum, AUTControlsHierarchyState.GET_ELEMENT); - addEEnumLiteral(autControlsHierarchyStateEEnum, AUTControlsHierarchyState.GET_PARENT); + initEEnum(controlHierarchyStateEEnum, ControlHierarchyState.class, "ControlHierarchyState"); + addEEnumLiteral(controlHierarchyStateEEnum, ControlHierarchyState.HIGHLIGHT_WIDGET); + addEEnumLiteral(controlHierarchyStateEEnum, ControlHierarchyState.UPDATE_ASSERT_WINDOW); + addEEnumLiteral(controlHierarchyStateEEnum, ControlHierarchyState.GET_ELEMENT); + addEEnumLiteral(controlHierarchyStateEEnum, ControlHierarchyState.GET_PARENT); // Create resource createResource(eNS_URI); diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreAdapterFactory.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreAdapterFactory.java index 1b8e47da9..fe3237569 100755 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreAdapterFactory.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreAdapterFactory.java @@ -174,8 +174,8 @@ public Adapter caseTerminateAut(TerminateAut object) { return createTerminateAutAdapter(); } @Override - public Adapter caseAUTControlsHierarchy(AUTControlsHierarchy object) { - return createAUTControlsHierarchyAdapter(); + public Adapter caseGetControlHierarchy(GetControlHierarchy object) { + return createGetControlHierarchyAdapter(); } @Override public Adapter caseCommand(Command object) { @@ -538,16 +538,16 @@ public Adapter createTerminateAutAdapter() { } /** - * Creates a new adapter for an object of class '{@link org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy AUT Controls Hierarchy}'. + * Creates a new adapter for an object of class '{@link org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy Get Control Hierarchy}'. * * 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. * * @return the new adapter. - * @see org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy + * @see org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy * @generated */ - public Adapter createAUTControlsHierarchyAdapter() { + public Adapter createGetControlHierarchyAdapter() { return null; } diff --git a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreSwitch.java b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreSwitch.java index 3be472aa0..c303f9b7a 100755 --- a/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreSwitch.java +++ b/core/org.eclipse.rcptt.core.ecl.core/gen-src/org/eclipse/rcptt/core/ecl/core/model/util/Q7CoreSwitch.java @@ -255,10 +255,10 @@ protected T doSwitch(int classifierID, EObject theEObject) { if (result == null) result = defaultCase(theEObject); return result; } - case Q7CorePackage.AUT_CONTROLS_HIERARCHY: { - AUTControlsHierarchy autControlsHierarchy = (AUTControlsHierarchy)theEObject; - T result = caseAUTControlsHierarchy(autControlsHierarchy); - if (result == null) result = caseCommand(autControlsHierarchy); + case Q7CorePackage.GET_CONTROL_HIERARCHY: { + GetControlHierarchy getControlHierarchy = (GetControlHierarchy)theEObject; + T result = caseGetControlHierarchy(getControlHierarchy); + if (result == null) result = caseCommand(getControlHierarchy); if (result == null) result = defaultCase(theEObject); return result; } @@ -627,17 +627,17 @@ public T caseTerminateAut(TerminateAut object) { } /** - * Returns the result of interpreting the object as an instance of 'AUT Controls Hierarchy'. + * Returns the result of interpreting the object as an instance of 'Get Control Hierarchy'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'AUT Controls Hierarchy'. + * @return the result of interpreting the object as an instance of 'Get Control Hierarchy'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseAUTControlsHierarchy(AUTControlsHierarchy object) { + public T caseGetControlHierarchy(GetControlHierarchy object) { return null; } diff --git a/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore b/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore index d0d54a9e6..d51b2b6e6 100755 --- a/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore +++ b/core/org.eclipse.rcptt.core.ecl.core/model/model.ecore @@ -130,19 +130,19 @@ - + - + - + - \ No newline at end of file + diff --git a/core/org.eclipse.rcptt.core.ecl.core/model/q7core.genmodel b/core/org.eclipse.rcptt.core.ecl.core/model/q7core.genmodel index e929c9a29..c4115f54b 100755 --- a/core/org.eclipse.rcptt.core.ecl.core/model/q7core.genmodel +++ b/core/org.eclipse.rcptt.core.ecl.core/model/q7core.genmodel @@ -7,11 +7,24 @@ model.ecore + + + + + + + + + + + + + @@ -22,6 +35,8 @@ + + @@ -47,7 +62,45 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/plugin.xml b/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/plugin.xml index 2b022fd06..6090875c6 100644 --- a/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/plugin.xml +++ b/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/plugin.xml @@ -65,8 +65,8 @@ namespace="http://eclipse.org/rcptt/core/ecl">
diff --git a/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/src/org/eclipse/rcptt/internal/runtime/ui/rap/AUTControlsHierarchyService.java b/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/src/org/eclipse/rcptt/internal/runtime/ui/rap/GetControlHierarchyService.java similarity index 75% rename from modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/src/org/eclipse/rcptt/internal/runtime/ui/rap/AUTControlsHierarchyService.java rename to modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/src/org/eclipse/rcptt/internal/runtime/ui/rap/GetControlHierarchyService.java index e47a7ab31..a22e60020 100644 --- a/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/src/org/eclipse/rcptt/internal/runtime/ui/rap/AUTControlsHierarchyService.java +++ b/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/src/org/eclipse/rcptt/internal/runtime/ui/rap/GetControlHierarchyService.java @@ -13,7 +13,7 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; -import org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy; +import org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy; import org.eclipse.rcptt.ecl.core.Command; import org.eclipse.rcptt.ecl.runtime.ICommandService; import org.eclipse.rcptt.ecl.runtime.IProcess; @@ -25,16 +25,18 @@ import org.eclipse.rcptt.tesla.ui.RWTUtils; import org.eclipse.swt.widgets.Display; -public class AUTControlsHierarchyService implements ICommandService { +public class GetControlHierarchyService implements ICommandService { private IProcess context = null; + private Display display = null; + public IStatus service(Command command, IProcess context) throws InterruptedException, CoreException { this.context = context; - AUTControlsHierarchy autControlsHierarchy = (AUTControlsHierarchy) command; + GetControlHierarchy autControlsHierarchy = (GetControlHierarchy) command; switch (autControlsHierarchy.getState()) { @@ -63,9 +65,9 @@ private Display getDisplay() { return RWTUtils.findDisplay(); } - private IStatus highlightWidget(AUTControlsHierarchy autControlsHierarchy) throws CoreException { + private IStatus highlightWidget(GetControlHierarchy autControlsHierarchy) throws CoreException { - final Element element = AUTControlsHierarchyUtilities.getElement(autControlsHierarchy); + final Element element = GetControlHierarchyUtilities.getElement(autControlsHierarchy); final SWTUIElement swtUIElement = SWTEventManager.getSWTUIElement(element); if (null == swtUIElement) { @@ -77,10 +79,10 @@ private IStatus highlightWidget(AUTControlsHierarchy autControlsHierarchy) throw return Status.OK_STATUS; } - private IStatus updateAssertionPanelWindow(AUTControlsHierarchy autControlsHierarchy) + private IStatus updateAssertionPanelWindow(GetControlHierarchy autControlsHierarchy) throws CoreException { - final Element element = AUTControlsHierarchyUtilities.getElement(autControlsHierarchy); + final Element element = GetControlHierarchyUtilities.getElement(autControlsHierarchy); final SWTUIElement swtUIElement = SWTEventManager.getSWTUIElement(element); if (null == swtUIElement) { @@ -97,12 +99,12 @@ public void run() { return Status.OK_STATUS; } - private IStatus getElement(AUTControlsHierarchy autControlsHierarchy) throws CoreException { + private IStatus getElement(GetControlHierarchy autControlsHierarchy) throws CoreException { final CoreException[] ex = new CoreException[1]; final UIHierarchyResponse response = ProtocolFactory.eINSTANCE.createUIHierarchyResponse(); - final Element element = AUTControlsHierarchyUtilities.getElement(autControlsHierarchy); + final Element element = GetControlHierarchyUtilities.getElement(autControlsHierarchy); final SWTUIElement swtUIElement = SWTEventManager.getSWTUIElement(element); if (getDisplay().isDisposed()) { @@ -113,7 +115,7 @@ private IStatus getElement(AUTControlsHierarchy autControlsHierarchy) throws Cor @Override public void run() { - AUTControlsHierarchyUtilities.initResponse(getDisplay(), element, swtUIElement, response); + GetControlHierarchyUtilities.initResponse(getDisplay(), element, swtUIElement, response); try { write(response); @@ -131,12 +133,12 @@ public void run() { } - private IStatus getParent(AUTControlsHierarchy autControlsHierarchy) throws CoreException { + private IStatus getParent(GetControlHierarchy autControlsHierarchy) throws CoreException { final CoreException[] ex = new CoreException[1]; final UIHierarchyResponse response = ProtocolFactory.eINSTANCE.createUIHierarchyResponse(); - final Element element = AUTControlsHierarchyUtilities.getElement(autControlsHierarchy); + final Element element = GetControlHierarchyUtilities.getElement(autControlsHierarchy); final SWTUIElement swtUIElement = SWTEventManager.getSWTUIElement(element); if (getDisplay().isDisposed()) { @@ -151,10 +153,10 @@ private IStatus getParent(AUTControlsHierarchy autControlsHierarchy) throws Core @Override public void run() { - SWTUIElement swtUIParent = AUTControlsHierarchyUtilities.getSWTUIParent(getDisplay(), swtUIElement); + SWTUIElement swtUIParent = GetControlHierarchyUtilities.getSWTUIParent(getDisplay(), swtUIElement); - AUTControlsHierarchyUtilities.initResponse(getDisplay(), - AUTControlsHierarchyUtilities.getElement(swtUIParent), swtUIParent, response); + GetControlHierarchyUtilities.initResponse(getDisplay(), + GetControlHierarchyUtilities.getElement(swtUIParent), swtUIParent, response); try { write(response); diff --git a/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/src/org/eclipse/rcptt/internal/runtime/ui/rap/AUTControlsHierarchyUtilities.java b/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/src/org/eclipse/rcptt/internal/runtime/ui/rap/GetControlHierarchyUtilities.java similarity index 96% rename from modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/src/org/eclipse/rcptt/internal/runtime/ui/rap/AUTControlsHierarchyUtilities.java rename to modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/src/org/eclipse/rcptt/internal/runtime/ui/rap/GetControlHierarchyUtilities.java index 78ae4c8a5..a09922430 100644 --- a/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/src/org/eclipse/rcptt/internal/runtime/ui/rap/AUTControlsHierarchyUtilities.java +++ b/modules/rap/bundles/runtime/org.eclipse.rcptt.runtime.ui.rap/src/org/eclipse/rcptt/internal/runtime/ui/rap/GetControlHierarchyUtilities.java @@ -16,7 +16,7 @@ import java.util.List; import java.util.Map; -import org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy; +import org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy; import org.eclipse.rcptt.tesla.core.protocol.ElementKind; import org.eclipse.rcptt.tesla.core.protocol.GenericElementKind; import org.eclipse.rcptt.tesla.core.protocol.ProtocolFactory; @@ -32,7 +32,7 @@ import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Widget; -public class AUTControlsHierarchyUtilities { +public class GetControlHierarchyUtilities { public static void initResponse(Display display, Element element, SWTUIElement swtUIElement, UIHierarchyResponse response) { @@ -82,7 +82,7 @@ public static void initResponseChildren(Display display, SWTUIElement swtUIEleme } } - public static Element getElement(AUTControlsHierarchy autControlsHierarchy) { + public static Element getElement(GetControlHierarchy autControlsHierarchy) { Element element = RawFactory.eINSTANCE.createElement(); element.setId(autControlsHierarchy.getId()); element.setKind(autControlsHierarchy.getKind()); diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/Messages.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/Messages.java index 5db6d2bad..91c025e69 100755 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/Messages.java +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/Messages.java @@ -27,9 +27,8 @@ public class Messages extends NLS { public static String AssertImageWindow_TextLabel; public static String AssertImageWindow_Tilte; public static String AssertImageWindow_TypeLabel; - public static String AssertionAUTControlsHierarchyDialog_Title; - public static String AssertionAUTControlsHierarchyDialog_ColumnNameName; - public static String AssertionAUTControlsHierarchyDialog_ColumnNameToolTip; + public static String ControlHierarchyView_NameColumnText; + public static String ControlHierarchyView_NameColumnToolTip; public static String AssertionPanelWindow_AddAssertButton; public static String AssertionPanelWindow_AssertImageButton; public static String AssertionPanelWindow_CloseActionName; @@ -134,7 +133,6 @@ public class Messages extends NLS { public static String ControlPanelWindow_RecordShortcutToolTip; public static String ControlPanelWindow_ReplayAction; public static String ControlPanelWindow_ReturnActionTooltip; - public static String ControlPanelWindow_OpenAssertionAUTControlsHierarchyDialogActionToolTip; public static String ControlPanelWindow_SaveAction; public static String ControlPanelWindow_SaveAsAction; public static String ControlPanelWindow_SaveDialogMsg; diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/messages.properties b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/messages.properties index 7bf71b116..975cd2834 100755 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/messages.properties +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/internal/ui/messages.properties @@ -21,9 +21,8 @@ AssertImageWindow_SelectionLabel=Selection: AssertImageWindow_TextLabel=Text: AssertImageWindow_Tilte=Add Image Assertion AssertImageWindow_TypeLabel=Type: -AssertionAUTControlsHierarchyDialog_Title=AssertionAUTControlsHierarchyDialog -AssertionAUTControlsHierarchyDialog_ColumnNameName=Controls hierarchy -AssertionAUTControlsHierarchyDialog_ColumnNameToolTip=AUT controls hierarchy +ControlHierarchyView_NameColumnText=Controls hierarchy +ControlHierarchyView_NameColumnToolTip=AUT controls hierarchy AssertionPanelWindow_AddAssertButton=Add AssertionPanelWindow_AssertImageButton=Assert Image AssertionPanelWindow_CloseActionName=Close @@ -31,7 +30,7 @@ AssertionPanelWindow_CollapseAllActionToolTip=Collapse All AssertionPanelWindow_ColumnOperationName=Operation AssertionPanelWindow_ColumnOperationToolTip=Assertion operation AssertionPanelWindow_ColumnPropertyName=Property -AssertionPanelWindow_TreeVisibleToolTip=Show/hide controls hierarchy +AssertionPanelWindow_TreeVisibleToolTip=Show/hide control hierarchy AssertionPanelWindow_ColumnPropertyToolTip=Control property to assert AssertionPanelWindow_DeselectAllActionToolTip=Deselect All AssertionPanelWindow_ExpandAllActionToolTip=Expand All @@ -132,7 +131,6 @@ ControlPanelWindow_RecordAction=Record ControlPanelWindow_RecordShortcutToolTip={0} to continue recording ControlPanelWindow_ReplayAction=Replay ControlPanelWindow_ReturnActionTooltip=Return to RCPTT -ControlPanelWindow_OpenAssertionAUTControlsHierarchyDialogActionToolTip=Open assertion mode tree dialog ControlPanelWindow_SaveAction=Save ControlPanelWindow_SaveAsAction=Save As... ControlPanelWindow_SaveDialogMsg=Control Panel contains an unsaved test case. Save it? diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java index 251ecde60..38ff5f7d7 100644 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AssertionPanelWindow.java @@ -142,7 +142,7 @@ public class AssertionPanelWindow extends Dialog { private Composite treeViewerComposite; private Composite autControlsWidgetComposite; private GridData autControlsWidgetCompositeGridData; - private AUTControlsHierarchyView autControlsView; + private ControlHierarchyView autControlsView; private final IAction collapseAll = new Action() { { @@ -492,7 +492,7 @@ protected Control createContents(Composite parent) { autControlsWidgetComposite.setLayoutData(autControlsWidgetCompositeGridData); autControlsWidgetComposite.setVisible(false); - autControlsView = new AUTControlsHierarchyView(recordingSupport.getAUT()); + autControlsView = new ControlHierarchyView(recordingSupport.getAUT()); autControlsView.createPartControl(autControlsWidgetComposite); final Composite assertionComposite = new Composite(composite, SWT.NONE); diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AUTControlsHierarchyView.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/ControlHierarchyView.java similarity index 90% rename from rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AUTControlsHierarchyView.java rename to rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/ControlHierarchyView.java index 85422e239..5de248843 100644 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/AUTControlsHierarchyView.java +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/ControlHierarchyView.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2009, 2016 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.ui.panels.assertion; import java.util.Iterator; @@ -32,12 +42,12 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Tree; -public class AUTControlsHierarchyView { +public class ControlHierarchyView { /** * The ID of the view as specified by the extension. */ - public static final String ID = "org.eclipse.rcptt.ui.panels.assertion.AUTControlsHierarchyView"; //$NON-NLS-1$ + public static final String ID = "org.eclipse.rcptt.ui.panels.assertion.ControlHierarchyView"; //$NON-NLS-1$ private final AutLaunch aut; @@ -53,7 +63,7 @@ public class AUTControlsHierarchyView { private AtomicBoolean canExpanding = new AtomicBoolean(false); - public AUTControlsHierarchyView(AutLaunch aut) { + public ControlHierarchyView(AutLaunch aut) { this.aut = aut; } @@ -182,8 +192,8 @@ public void sleeping(IJobChangeEvent event) { protected TreeViewerColumn createNameColumn() { final TreeViewerColumn column = new TreeViewerColumn(viewer, SWT.NONE); - column.getColumn().setText(Messages.AssertionAUTControlsHierarchyDialog_ColumnNameName); - column.getColumn().setToolTipText(Messages.AssertionAUTControlsHierarchyDialog_ColumnNameToolTip); + column.getColumn().setText(Messages.ControlHierarchyView_NameColumnText); + column.getColumn().setToolTipText(Messages.ControlHierarchyView_NameColumnToolTip); column.setLabelProvider(new ColumnLabelProvider() { @Override public String getText(Object object) { diff --git a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/UIHierarchyResponseUtilities.java b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/UIHierarchyResponseUtilities.java index 9c4146e5f..9646981e6 100644 --- a/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/UIHierarchyResponseUtilities.java +++ b/rcp/org.eclipse.rcptt.ui/src/org/eclipse/rcptt/ui/panels/assertion/UIHierarchyResponseUtilities.java @@ -1,7 +1,7 @@ package org.eclipse.rcptt.ui.panels.assertion; -import org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchy; -import org.eclipse.rcptt.core.ecl.core.model.AUTControlsHierarchyState; +import org.eclipse.rcptt.core.ecl.core.model.ControlHierarchyState; +import org.eclipse.rcptt.core.ecl.core.model.GetControlHierarchy; import org.eclipse.rcptt.core.ecl.core.model.Q7CoreFactory; import org.eclipse.rcptt.internal.ui.Q7UIPlugin; import org.eclipse.rcptt.launching.AutLaunch; @@ -12,14 +12,14 @@ public class UIHierarchyResponseUtilities { public static UIHierarchyResponse getUIHierarchyElement(AutLaunch aut, UIElement uiElement) { - AUTControlsHierarchy assertionAUTControlsHierarchy = Q7CoreFactory.eINSTANCE - .createAUTControlsHierarchy(); + GetControlHierarchy assertionAUTControlsHierarchy = Q7CoreFactory.eINSTANCE + .createGetControlHierarchy(); if (null != uiElement) { setAUTControlsHierarchyCommandByUIElement(assertionAUTControlsHierarchy, uiElement); } - assertionAUTControlsHierarchy.setState(AUTControlsHierarchyState.GET_ELEMENT); + assertionAUTControlsHierarchy.setState(ControlHierarchyState.GET_ELEMENT); try { Object childAUTObject = aut.execute(assertionAUTControlsHierarchy); @@ -34,14 +34,14 @@ public static UIHierarchyResponse getUIHierarchyElement(AutLaunch aut, UIElement public static UIHierarchyResponse getUIHierarchyParent(AutLaunch aut, UIElement uiElement) { - AUTControlsHierarchy assertionAUTControlsHierarchy = Q7CoreFactory.eINSTANCE - .createAUTControlsHierarchy(); + GetControlHierarchy assertionAUTControlsHierarchy = Q7CoreFactory.eINSTANCE + .createGetControlHierarchy(); if (null != uiElement) { setAUTControlsHierarchyCommandByUIElement(assertionAUTControlsHierarchy, uiElement); } - assertionAUTControlsHierarchy.setState(AUTControlsHierarchyState.GET_PARENT); + assertionAUTControlsHierarchy.setState(ControlHierarchyState.GET_PARENT); try { Object childAUTObject = aut.execute(assertionAUTControlsHierarchy); @@ -64,10 +64,10 @@ public static String getUIElementCaption(UIElement uiElement) { public static void highlightWidget(AutLaunch aut, UIElement uiElement) { - AUTControlsHierarchy assertionAUTControlsHierarchy = Q7CoreFactory.eINSTANCE - .createAUTControlsHierarchy(); + GetControlHierarchy assertionAUTControlsHierarchy = Q7CoreFactory.eINSTANCE + .createGetControlHierarchy(); - assertionAUTControlsHierarchy.setState(AUTControlsHierarchyState.HIGHLIGHT_WIDGET); + assertionAUTControlsHierarchy.setState(ControlHierarchyState.HIGHLIGHT_WIDGET); setAUTControlsHierarchyCommandByUIElement(assertionAUTControlsHierarchy, uiElement); try { @@ -79,10 +79,10 @@ public static void highlightWidget(AutLaunch aut, UIElement uiElement) { public static void updateAssertionPanelWindow(AutLaunch aut, UIElement uiElement) { - AUTControlsHierarchy assertionAUTControlsHierarchy = Q7CoreFactory.eINSTANCE - .createAUTControlsHierarchy(); + GetControlHierarchy assertionAUTControlsHierarchy = Q7CoreFactory.eINSTANCE + .createGetControlHierarchy(); - assertionAUTControlsHierarchy.setState(AUTControlsHierarchyState.UPDATE_ASSERT_WINDOW); + assertionAUTControlsHierarchy.setState(ControlHierarchyState.UPDATE_ASSERT_WINDOW); setAUTControlsHierarchyCommandByUIElement(assertionAUTControlsHierarchy, uiElement); try { @@ -93,7 +93,7 @@ public static void updateAssertionPanelWindow(AutLaunch aut, UIElement uiElement } public static void setAUTControlsHierarchyCommandByUIElement( - AUTControlsHierarchy autControlsHierarchyCommand, UIElement uiElement) { + GetControlHierarchy autControlsHierarchyCommand, UIElement uiElement) { autControlsHierarchyCommand.setId(uiElement.getId()); autControlsHierarchyCommand.setKind(uiElement.getKind()); diff --git a/runtime/org.eclipse.rcptt.runtime.ui/plugin.xml b/runtime/org.eclipse.rcptt.runtime.ui/plugin.xml index 909126970..a8311dedb 100755 --- a/runtime/org.eclipse.rcptt.runtime.ui/plugin.xml +++ b/runtime/org.eclipse.rcptt.runtime.ui/plugin.xml @@ -53,8 +53,8 @@ namespace="http://eclipse.org/rcptt/core/ecl">