Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 234457 Details for
Bug 414672
New SWT table actions (Checking checked-state of checkboxes in first column)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Reworked table actions
0008-Add-Table_newCheckboxActions.patch (text/plain), 8.70 KB, created by
Jan Philipp Wiegmann
on 2013-08-15 09:39:58 EDT
(
hide
)
Description:
Reworked table actions
Filename:
MIME Type:
Creator:
Jan Philipp Wiegmann
Created:
2013-08-15 09:39:58 EDT
Size:
8.70 KB
patch
obsolete
>From 90842806eeec97ccdab9ea866e1388aa22f34725 Mon Sep 17 00:00:00 2001 >From: Jan Wiegmann <Jan.Wiegmann@bredex.de> >Date: Thu, 15 Aug 2013 15:35:44 +0200 >Subject: [PATCH] new table actions on checkboxes > >--- > .../eclipse/jubula/rc/swt/tester/TableTester.java | 51 ++++++++++++++++++++++ > .../resources/xml/ComponentConfiguration.xml | 5 +-- > .../toolkit/provider/swt/I18nStrings.properties | 4 +- > .../jubula/tools/i18n/guidancerStrings.properties | 1 + > .../jubula/tools/objects/event/TestErrorEvent.java | 7 ++- > 5 files changed, 63 insertions(+), 5 deletions(-) > >diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/TableTester.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/TableTester.java >index 5f5ef2a..bc69042 100644 >--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/TableTester.java >+++ b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/TableTester.java >@@ -23,6 +23,7 @@ import org.eclipse.jubula.rc.common.implclasses.table.Cell; > import org.eclipse.jubula.rc.common.tester.AbstractTableTester; > import org.eclipse.jubula.rc.common.tester.adapter.interfaces.ITableComponent; > import org.eclipse.jubula.rc.common.tester.adapter.interfaces.ITextInputComponent; >+import org.eclipse.jubula.rc.common.util.Verifier; > import org.eclipse.jubula.rc.swt.driver.DragAndDropHelperSwt; > import org.eclipse.jubula.rc.swt.tester.adapter.StyledTextAdapter; > import org.eclipse.jubula.rc.swt.tester.adapter.TableAdapter; >@@ -661,4 +662,54 @@ public class TableTester extends AbstractTableTester { > pressOrReleaseModifiers(dndHelper.getModifier(), false); > } > } >+ >+ /** >+ * Verifies whether the checkbox of the first selected cell in the table is checked >+ * >+ * @param checked true if checkbox in cell is selected, false otherwise >+ * @throws StepExecutionException If no cell is selected or the verification fails. >+ */ >+ public void rcVerifyCheckboxOfSelectedRow(boolean checked) >+ throws StepExecutionException { >+ >+ int row = ((ITableComponent) getComponent()).getSelectedCell().getRow(); >+ verifyCheckboxInRow(checked, row); >+ } >+ >+ /** >+ * Verifies whether the checkbox of the row with the given >+ * <code>index</code> is checked >+ * >+ * @param checked true if checkbox in cell is selected, false otherwise >+ * @param row the row-index of the cell in which the checkbox-state should be verified >+ */ >+ public void verifyCheckboxInRow(boolean checked, final int row) { >+ >+ Boolean checkIndex = ((Boolean)getEventThreadQueuer().invokeAndWait( >+ "rcVerifyTableCheckboxIndex", new IRunnable() { //$NON-NLS-1$ >+ public Object run() throws StepExecutionException { >+ Table table = getTable(); >+ if ((table.getStyle() & SWT.CHECK) == 0) { >+ throw new StepExecutionException( >+ "No checkbox found", //$NON-NLS-1$ >+ EventFactory.createActionError( >+ TestErrorEvent.CHECKBOX_NOT_FOUND)); >+ } >+ return new Boolean(table.getItem(row). >+ getChecked()); >+ } >+ })); >+ Verifier.equals(checked, checkIndex.booleanValue()); >+ } >+ >+ /** >+ * Verifies whether the checkbox of the cell under the Mouse Pointer >+ * is checked >+ * >+ * @param checked true if checkbox in cell is selected, false otherwise >+ */ >+ public void rcVerifyCheckboxOfRowAtMousePosition(boolean checked) { >+ int row = getCellAtMousePosition().getRow(); >+ verifyCheckboxInRow(checked, row); >+ } > } >diff --git a/org.eclipse.jubula.toolkit.provider.swt/resources/xml/ComponentConfiguration.xml b/org.eclipse.jubula.toolkit.provider.swt/resources/xml/ComponentConfiguration.xml >index ca99e01..8e49851 100644 >--- a/org.eclipse.jubula.toolkit.provider.swt/resources/xml/ComponentConfiguration.xml >+++ b/org.eclipse.jubula.toolkit.provider.swt/resources/xml/ComponentConfiguration.xml >@@ -234,11 +234,10 @@ > <componentClass name="org.eclipse.swt.custom.CTabFolder" /> > </toolkitComponent> > >- <toolkitComponent type="org.eclipse.swt.widgets.Table" visible="false"> >+ <toolkitComponent type="org.eclipse.swt.widgets.Table" visible="true"> > <realizes>guidancer.concrete.Table</realizes> > <testerClass>org.eclipse.jubula.rc.swt.tester.TableTester</testerClass> >- <componentClass name="org.eclipse.swt.widgets.Table" /> >- </toolkitComponent> >+ <componentClass name="org.eclipse.swt.widgets.Table" /> <action name="CompSystem.VerifyCheckboxOfSelectedRow" changed="1.0"> <method>rcVerifyCheckboxOfSelectedRow</method> <param name="CompSystem.Checked"> <type>java.lang.Boolean</type> <defaultValue>true</defaultValue> <valueSet> <element name="CompSystem.True" value="true"/> <element name="CompSystem.False" value="false"/> </valueSet> </param> </action> <action name="CompSystem.VerifyCheckboxOfRowAtMousePosition" changed="1.0"> <method>rcVerifyCheckboxOfRowAtMousePosition</method> <param name="CompSystem.Checked"> <type>java.lang.Boolean</type> <defaultValue>true</defaultValue> <valueSet> <element name="CompSystem.True" value="true"/> <element name="CompSystem.False" value="false"/> </valueSet> </param> </action> </toolkitComponent> > > <toolkitComponent type="org.eclipse.swt.widgets.Tree" observable="false"> > <realizes>guidancer.concrete.Tree</realizes> >diff --git a/org.eclipse.jubula.toolkit.provider.swt/src/org/eclipse/jubula/toolkit/provider/swt/I18nStrings.properties b/org.eclipse.jubula.toolkit.provider.swt/src/org/eclipse/jubula/toolkit/provider/swt/I18nStrings.properties >index e3420d7..fecb3cd 100644 >--- a/org.eclipse.jubula.toolkit.provider.swt/src/org/eclipse/jubula/toolkit/provider/swt/I18nStrings.properties >+++ b/org.eclipse.jubula.toolkit.provider.swt/src/org/eclipse/jubula/toolkit/provider/swt/I18nStrings.properties >@@ -31,4 +31,6 @@ org.eclipse.swt.widgets.Link=(SWT) Link > org.eclipse.swt.widgets.Spinner=(SWT) Spinner > org.eclipse.swt.widgets.Slider=(SWT) Slider > org.eclipse.swt.widgets.Scale=(SWT) Scale >-org.eclipse.swt.widgets.DateTime=(SWT) DateTime >\ No newline at end of file >+org.eclipse.swt.widgets.DateTime=(SWT) DateTime >+CompSystem.VerifyCheckboxOfSelectedRow=Check Selection of Checkbox in Selected Row >+CompSystem.VerifyCheckboxOfRowAtMousePosition=Check Selection of Checkbox in Row of Mouse Position >\ No newline at end of file >diff --git a/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/i18n/guidancerStrings.properties b/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/i18n/guidancerStrings.properties >index 53a97ba..190bd9a 100644 >--- a/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/i18n/guidancerStrings.properties >+++ b/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/i18n/guidancerStrings.properties >@@ -952,6 +952,7 @@ TestErrorEvent.UnsupportedParameterValue=Parameter value "{0}" is not supported > TestErrorEvent.UnsupportedUI=Unsupported UI class\: "{0}" > TestErrorEvent.VerifyFailed=Check Failed > TestErrorEvent.WindowActivationFailed=Window activation failed. >+TestErrorEvent.CheckboxNotFound=Checkbox not found > TestExecutionContributor.AUTNotFound=AUT not found.\nPlease check the AUT configuration. > TestExecutionContributor.AUTStartedRecording=Observation mode > TestExecutionContributor.AUTStartedRecordingCheckMode=Observation mode (Check Mode) >diff --git a/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/objects/event/TestErrorEvent.java b/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/objects/event/TestErrorEvent.java >index 1aa1344..227c28e 100644 >--- a/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/objects/event/TestErrorEvent.java >+++ b/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/objects/event/TestErrorEvent.java >@@ -180,6 +180,11 @@ public class TestErrorEvent { > * Required file was not found > */ > public static final String FILE_NOT_FOUND = "TestErrorEvent.FileNotFound"; //$NON-NLS-1$ >+ >+ /** >+ * Unsupported parameter value. >+ */ >+ public static final String CHECKBOX_NOT_FOUND = "TestErrorEvent.CheckboxNotFound"; //$NON-NLS-1$ > > /** > * No such command exists >@@ -209,7 +214,7 @@ public class TestErrorEvent { > /** > * Clipboard not available. > */ >- public static final String CLIPBOARD_NOT_AVAILABLE = "TestErrorEvent.ClipboardNotAvailable"; //$NON-NLS-1$ >+ public static final String CLIPBOARD_NOT_AVAILABLE = "TestErrorEvent.ClipboardNotAvailable"; //$NON-NLS-1$ > > /** > * Unsupported parameter value. >-- >1.7.11 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 414672
:
234195
|
234457
|
235088