[SOLVED] Swing control interaction [message #1468954] |
Tue, 11 November 2014 07:17 |
Nam Ha Messages: 4 Registered: November 2013 |
Junior Member |
|
|
Hi Everybody,
I'm investigating the RCPTT to test my RCP application. In my project, I have some swing components inside swt control. I used record feature of RCPTT but seem that it doesn't know swing.
Does anybody know how can I touch those swing controls via ECL? or any possible way? Can I use custom ECL to do this?
[Updated on: Wed, 30 September 2015 07:21] by Moderator Report message to a moderator
|
|
|
Re: Swing control interaction [message #1469010 is a reply to message #1468954] |
Tue, 11 November 2014 08:14 |
Ivan Inozemtsev Messages: 0 Registered: January 2015 |
|
|
|
Hi Nam,
Overall, RCPTT is not aware about Swing at all and unfortunately at the moment we have no plans in adding support for it. By writing custom ECL commands, basically it is possible to do everything you can do in Java code, so I think you should be able to interact with Swing controls via API too.
As a 'bridge' between RCPTT commands and your custom commands you might find useful commands like "get-object" and "invoke", to minimize the amount of logic in your custom commands. For example, if a swing is embedded inside some group, you can do something like this to pass a reference to SWT group composite
get-editor "Foo" | get-group "My group" | get-object // use RCPTT selection commands and "extract" SWT object from result
| your-command-to-find-swing-button // your custom command to find embedded swing in SWT control and to find an element in swing frame
| invoke doClick // call Swing API method via reflection
Just curious, how much Swing UI do you have embedded into SWT and how much do you need to interact with it?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04171 seconds