Skip to main content



      Home
Home » Archived » Jubula » Creating a custom JFace based extension(Jubulize a custom JFace Component )
Creating a custom JFace based extension [message #1777076] Fri, 24 November 2017 05:28 Go to next message
Eclipse UserFriend
Hello everyone,

I have some questions regarding "Creating toolkit extensions for custom UI widgets"

Introduction
I have a custom component based on org.eclipse.jface.viewers.Viewer. This component (or Viewer for that matter) basically contains a org.eclipse.swt.widgets.Canvas somewhere deep inside, which will be used to render "stuff". It basically draws "things" on this canvas.
I'd like to make the Viewer itself testable by providing a custom Adapter similar to what you got with "JComponentAdapter" which implements all sorts of interaction on a JComponent.

My Attempt - The Plug-In
Is it correct to create the extension plug-in and define a toolkitsupport with a IToolkitProvider based on "level=toolkit"?
Also put a "WidgetTester" based Tester Implementation in that bundle, which is later being referenced through the "ComponentConfiguration.xml":
 <toolkitComponent type="country.company.project.MyCustomJFaceViewer" visible="true">
        <realizes>org.eclipse.jface.viewers.Viewer</realizes>
        <testerClass>myCustomViewerTester</testerClass>        
        <action name="UserExtension.rcverifytest">
            <method>rcverifytest</method>
            <param name="UserExtension.rcverifytest.test">
                <type>java.lang.String</type>
            </param>
        </action>
    </toolkitComponent>


My Attempt - The Fragment
Furthermore is it correct to create the required fragment with "org.eclipse.jubula.rc.rcp.swt" as host? I have a package named "org.eclipse.jubula.ext.rc.common.adapter" which contains my Adapter and the Factory.
The factory checks whether the adaptableType isAssignableFrom IComponent.class and passes the objectToAdapt to the CustomAdapter based on AbstractComponentAdapter implementing IWidgetComponent. Within the constructor of the CustomAdapter I can cast the parameter to my MyCustomJFaceViewer and forward all calls accordingly.

Am I on the right track here? Or should I rather follow the "JavaFX" way?

The help documentation continues with the ToolkitInfo and ToolkitInformation implementation. But here I totally get lost: Where to put these implementations? Or is there an extension point I overlooked?

Thanks for taking the time to read this lengthy gibberish :)
Re: Creating a custom JFace based extension [message #1777284 is a reply to message #1777076] Tue, 28 November 2017 02:06 Go to previous message
Eclipse UserFriend
ADMINS: Please close/delete this post. I wasn't sure whether it came through and reposted yesterday. People should refer to https://www.eclipse.org/forums/index.php/t/1090261/ instead of this one. It basically the same.
Previous Topic:Jubula API JAVA Swing "Timeout received" & "ActionException"
Next Topic:why my tests connect to AUT timeout sometimes
Goto Forum:
  


Current Time: Fri Apr 18 10:35:16 EDT 2025

Powered by FUDForum. Page generated in 0.03990 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top