Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 394179

Summary: Enhancement: Refactoring and generalization of the RC Swing and SWT
Product: [Technology] Jubula Reporter: Marvin Mueller <marvin_m>
Component: RCAssignee: Markus Tiede <markus.tiede>
Status: CLOSED FIXED QA Contact: Oliver Goetz <Oliver.Goetz>
Severity: enhancement    
Priority: P3 CC: markus.tiede
Version: unspecified   
Target Milestone: Kepler   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 396585, 396594, 396719, 396722, 396814    
Bug Blocks:    
Attachments:
Description Flags
generalized implementation of Buttons,Trees, Tables and Menus
none
Changes of the generalization and implementation of lists
none
Changed List patch
none
Implementation of text components
none
Implementing the testability of ComboBoxes (Swing and SWT)
none
One big patch for alle implemented Components, including Label and TabPanes
markus.tiede: iplog+
Refactoring of the Application actions markus.tiede: iplog+

Description Marvin Mueller CLA 2012-11-13 08:25:06 EST
Created attachment 223499 [details]
generalized implementation of Buttons,Trees, Tables and Menus

This enhancement is for a lot of Code refactoring from the rc implementation of Swing and SWT.
The intention is to minimize the code duplication between Swing and SWT and hopefully get a good base for other toolkits.
 
I have changed the implementation of the Toolkits, in the way that they have the same code base and share the most and identical testing actions between the implementations. Also that both implementations have now the same checks and Exceptions. 


The attached patch contains the full functional generalization of Buttons,Trees,Tables and Menus. This implementation touches none of the old implementation only changes the toolkit provider for Swing and SWT that they are using the new classes.
The deprecated methods are missing in this general implementation because we does not want to have them anymore.

In org.eclipse.jubula.rc.common are the generalized classes and interfaces which are shared between the toolkits.
In org.eclipse.jubula.rc.swing/swt are the toolkit specific classes and adapter.
Comment 1 Marvin Mueller CLA 2012-11-21 04:19:56 EST
The whole patch is authored by myself. There are only parts used from the swing and swt implementation in Jubula (cause it is a refactoring of these parts).
Comment 2 Marvin Mueller CLA 2012-11-22 05:49:22 EST
Created attachment 223848 [details]
Changes of the generalization and implementation of lists

I have done extending the above Implementation with the generalization of Lists.
As mentioned above the work is 100% authored by myself.

As i extended the generalization, i has changed a big thing in the implementation of the RobotFactory as it worked in my implementation. I also changed and implemented the AbstractTextVerifiable so that it is used now in the different components like Buttons and Lists.

So here is the patch which extends the first one.
Comment 3 Marvin Mueller CLA 2012-11-26 07:02:54 EST
Created attachment 223948 [details]
Changed List patch

Because i forgot to add the EPL Header i changed the patch.
Comment 4 Marvin Mueller CLA 2012-11-26 07:13:57 EST
Created attachment 223950 [details]
Implementation of text components

I have extended the implementation with the next graphical component which are TextFields/Areas and so on.

This patch extends the second one. If there is a need in a single patch please ask.

This authored 100% by me.
Comment 5 Marvin Mueller CLA 2012-11-29 06:13:38 EST
Created attachment 224096 [details]
Implementing the testability of ComboBoxes (Swing and SWT)

This patch is extending the Text Component patch.

It implements all functions that are available for Testing in Jubula for JComboBox, Combo and CCombo.

This work is authored 100% by myself.
Comment 6 Markus Tiede CLA 2012-12-13 05:10:55 EST
Attachment 223499 [details] is not applicable to the current HEAD:

git apply ../../generalized_Swing_SWT_rc.patch --check
error: patch failed: org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/SwingAUTServer.java:22
error: org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/SwingAUTServer.java: patch does not apply
error: patch failed: org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/SwtAUTServer.java:25
error: org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/SwtAUTServer.java: patch does not apply


@Marvin: Could you please address this issue?
Comment 7 Marvin Mueller CLA 2012-12-13 06:26:33 EST
Created attachment 224662 [details]
One big patch for alle implemented Components, including Label and TabPanes

After speaking to Markus we agreed, that we want to do one patch.

In this patch all other patches are included and therefore i mark them as obsolete.

In addition i added the support for TabbedPanes and Labels, which are also authored 100% by myself.

With this patch nearly all Components which are the moment implemented are also in the generalization.
Comment 8 Markus Tiede CLA 2012-12-13 10:50:05 EST
The patch has been applied with changeset

http://git.eclipse.org/c/jubula/org.eclipse.jubula.core.git/commit/?id=87dcf3117f746a5bd16bd3d71fa23827ee508e58

Now we'll - at first - have to wait and see whether all regression tests are still running.
Comment 9 Marvin Mueller CLA 2013-01-03 03:55:08 EST
Created attachment 225163 [details]
Refactoring of the Application actions

This is the last part of the refactoring. 
With this patch all component actions which are shared between Swing and SWT are generalized.
Comment 10 Markus Tiede CLA 2013-01-04 04:02:46 EST
The second patch (225163) has been applied with changeset

http://git.eclipse.org/c/jubula/org.eclipse.jubula.core.git/commit/?id=bd45bc8860028ca7010b772532e8458a11ba30ce
Comment 11 Oliver Goetz CLA 2013-01-08 10:32:25 EST
All patches have been applied, nightly tests are still running (successfully). Closing this ticket.