Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 414672 | Differences between
and this patch

Collapse All | Expand All

(-)a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/TableTester.java (+51 lines)
Lines 23-28 import org.eclipse.jubula.rc.common.implclasses.table.Cell; Link Here
23
import org.eclipse.jubula.rc.common.tester.AbstractTableTester;
23
import org.eclipse.jubula.rc.common.tester.AbstractTableTester;
24
import org.eclipse.jubula.rc.common.tester.adapter.interfaces.ITableComponent;
24
import org.eclipse.jubula.rc.common.tester.adapter.interfaces.ITableComponent;
25
import org.eclipse.jubula.rc.common.tester.adapter.interfaces.ITextInputComponent;
25
import org.eclipse.jubula.rc.common.tester.adapter.interfaces.ITextInputComponent;
26
import org.eclipse.jubula.rc.common.util.Verifier;
26
import org.eclipse.jubula.rc.swt.driver.DragAndDropHelperSwt;
27
import org.eclipse.jubula.rc.swt.driver.DragAndDropHelperSwt;
27
import org.eclipse.jubula.rc.swt.tester.adapter.StyledTextAdapter;
28
import org.eclipse.jubula.rc.swt.tester.adapter.StyledTextAdapter;
28
import org.eclipse.jubula.rc.swt.tester.adapter.TableAdapter;
29
import org.eclipse.jubula.rc.swt.tester.adapter.TableAdapter;
Lines 661-664 public class TableTester extends AbstractTableTester { Link Here
661
            pressOrReleaseModifiers(dndHelper.getModifier(), false);
662
            pressOrReleaseModifiers(dndHelper.getModifier(), false);
662
        }
663
        }
663
    }
664
    }
665
    
666
    /**
667
     * Verifies whether the checkbox of the first selected cell in the table is checked
668
     * 
669
     * @param checked true if checkbox in cell is selected, false otherwise
670
     * @throws StepExecutionException If no cell is selected or the verification fails.
671
     */
672
    public void rcVerifyCheckboxOfSelectedRow(boolean checked)
673
        throws StepExecutionException {
674
        
675
        int row = ((ITableComponent) getComponent()).getSelectedCell().getRow();
676
        verifyCheckboxInRow(checked, row);
677
    }
678
    
679
    /**
680
     * Verifies whether the checkbox of the row with the given
681
     * <code>index</code> is checked
682
     * 
683
     * @param checked true if checkbox in cell is selected, false otherwise
684
     * @param row the row-index of the cell in which the checkbox-state should be verified
685
     */
686
    public void verifyCheckboxInRow(boolean checked, final int row) {
687
        
688
        Boolean checkIndex = ((Boolean)getEventThreadQueuer().invokeAndWait(
689
                "rcVerifyTableCheckboxIndex", new IRunnable() { //$NON-NLS-1$
690
                    public Object run() throws StepExecutionException {
691
                        Table table = getTable();
692
                        if ((table.getStyle() & SWT.CHECK) == 0) {
693
                            throw new StepExecutionException(
694
                                    "No checkbox found", //$NON-NLS-1$
695
                                    EventFactory.createActionError(
696
                                            TestErrorEvent.CHECKBOX_NOT_FOUND));
697
                        }
698
                        return new Boolean(table.getItem(row).
699
                                getChecked());
700
                    }
701
                }));
702
        Verifier.equals(checked, checkIndex.booleanValue());
703
    }
704
    
705
    /**
706
     * Verifies whether the checkbox of the cell under the Mouse Pointer 
707
     * is checked
708
     * 
709
     * @param checked true if checkbox in cell is selected, false otherwise
710
     */
711
    public void rcVerifyCheckboxOfRowAtMousePosition(boolean checked) {
712
        int row = getCellAtMousePosition().getRow();
713
        verifyCheckboxInRow(checked, row);
714
    }
664
}
715
}
(-)a/org.eclipse.jubula.toolkit.provider.swt/resources/xml/ComponentConfiguration.xml (-3 / +2 lines)
Lines 234-244 Link Here
234
		<componentClass name="org.eclipse.swt.custom.CTabFolder" />
234
		<componentClass name="org.eclipse.swt.custom.CTabFolder" />
235
	</toolkitComponent>
235
	</toolkitComponent>
236
	
236
	
237
	<toolkitComponent type="org.eclipse.swt.widgets.Table" visible="false">
237
	<toolkitComponent type="org.eclipse.swt.widgets.Table" visible="true">
238
		<realizes>guidancer.concrete.Table</realizes>
238
		<realizes>guidancer.concrete.Table</realizes>
239
		<testerClass>org.eclipse.jubula.rc.swt.tester.TableTester</testerClass>
239
		<testerClass>org.eclipse.jubula.rc.swt.tester.TableTester</testerClass>
240
		<componentClass name="org.eclipse.swt.widgets.Table" />
240
		<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>
241
	</toolkitComponent>
242
	
241
	
243
	<toolkitComponent type="org.eclipse.swt.widgets.Tree" observable="false">
242
	<toolkitComponent type="org.eclipse.swt.widgets.Tree" observable="false">
244
		<realizes>guidancer.concrete.Tree</realizes>
243
		<realizes>guidancer.concrete.Tree</realizes>
(-)a/org.eclipse.jubula.toolkit.provider.swt/src/org/eclipse/jubula/toolkit/provider/swt/I18nStrings.properties (-1 / +3 lines)
Lines 31-34 org.eclipse.swt.widgets.Link=(SWT) Link Link Here
31
org.eclipse.swt.widgets.Spinner=(SWT) Spinner
31
org.eclipse.swt.widgets.Spinner=(SWT) Spinner
32
org.eclipse.swt.widgets.Slider=(SWT) Slider
32
org.eclipse.swt.widgets.Slider=(SWT) Slider
33
org.eclipse.swt.widgets.Scale=(SWT) Scale
33
org.eclipse.swt.widgets.Scale=(SWT) Scale
34
org.eclipse.swt.widgets.DateTime=(SWT) DateTime
34
org.eclipse.swt.widgets.DateTime=(SWT) DateTime
35
CompSystem.VerifyCheckboxOfSelectedRow=Check Selection of Checkbox in Selected Row
36
CompSystem.VerifyCheckboxOfRowAtMousePosition=Check Selection of Checkbox in Row of Mouse Position
(-)a/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/i18n/guidancerStrings.properties (+1 lines)
Lines 952-957 TestErrorEvent.UnsupportedParameterValue=Parameter value "{0}" is not supported Link Here
952
TestErrorEvent.UnsupportedUI=Unsupported UI class\: "{0}"
952
TestErrorEvent.UnsupportedUI=Unsupported UI class\: "{0}"
953
TestErrorEvent.VerifyFailed=Check Failed
953
TestErrorEvent.VerifyFailed=Check Failed
954
TestErrorEvent.WindowActivationFailed=Window activation failed.
954
TestErrorEvent.WindowActivationFailed=Window activation failed.
955
TestErrorEvent.CheckboxNotFound=Checkbox not found
955
TestExecutionContributor.AUTNotFound=AUT not found.\nPlease check the AUT configuration.
956
TestExecutionContributor.AUTNotFound=AUT not found.\nPlease check the AUT configuration.
956
TestExecutionContributor.AUTStartedRecording=Observation mode
957
TestExecutionContributor.AUTStartedRecording=Observation mode
957
TestExecutionContributor.AUTStartedRecordingCheckMode=Observation mode (Check Mode)
958
TestExecutionContributor.AUTStartedRecordingCheckMode=Observation mode (Check Mode)
(-)a/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/objects/event/TestErrorEvent.java (-2 / +6 lines)
Lines 180-185 public class TestErrorEvent { Link Here
180
     * Required file was not found
180
     * Required file was not found
181
     */
181
     */
182
    public static final String FILE_NOT_FOUND = "TestErrorEvent.FileNotFound"; //$NON-NLS-1$
182
    public static final String FILE_NOT_FOUND = "TestErrorEvent.FileNotFound"; //$NON-NLS-1$
183
    
184
    /**
185
     * Unsupported parameter value.
186
     */
187
    public static final String CHECKBOX_NOT_FOUND = "TestErrorEvent.CheckboxNotFound"; //$NON-NLS-1$
183
    
188
    
184
    /** 
189
    /** 
185
     * No such command exists
190
     * No such command exists
Lines 209-215 public class TestErrorEvent { Link Here
209
    /**
214
    /**
210
     * Clipboard not available.
215
     * Clipboard not available.
211
     */
216
     */
212
    public static final String CLIPBOARD_NOT_AVAILABLE = "TestErrorEvent.ClipboardNotAvailable"; //$NON-NLS-1$
217
    public static final String CLIPBOARD_NOT_AVAILABLE = "TestErrorEvent.ClipboardNotAvailable"; //$NON-NLS-1$
213
218
214
    /**
219
    /**
215
     * Unsupported parameter value.
220
     * Unsupported parameter value.
216
- 

Return to bug 414672