Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » Widget Resolver help needed
Widget Resolver help needed [message #112349] Thu, 13 September 2007 12:03 Go to next message
Matthias Wiskow is currently offline Matthias Wiskow
Messages: 25
Registered: July 2009
Junior Member
Hi,
I could not find any instructions *for beginners* on how to
implement/incorporate a custom widget resolver.

I got some spread information from this newsgroup and from the internet
but I cannot tie them together.

What I know is:
- I can write my custom widget resolver code. But how exactly is it
integrated in TPTP?
- Widget resolvers are entered into plugin.xml of the
org.eclipse.tptp.test.auto.gui plug-in. Is this a necessary step for a
custom resolver?
- How do I assure that e.g. a button is not recorded by the nontrivial
resolver but by my custom resolver?

Thanks for any enlightenment,
Matthias
Re: Widget Resolver help needed [message #112803 is a reply to message #112349] Wed, 19 September 2007 14:34 Go to previous messageGo to next message
Joe Toomey is currently offline Joe Toomey
Messages: 79
Registered: July 2009
Member
Hi Matthias,

First, thanks very much for helping out here in the newsgroup. It is
nice to see non-committer contributors giving back by helping people who
are new to the project, and the community of over-burdened committers
greatly appreciates your help. :-)

I haven't implemented my own widget resolvers, but I have done a lot of
work on the TPTP Test Project over the years, and I think I can help
with some of your questions.

> - I can write my custom widget resolver code. But how exactly is it
> integrated in TPTP?
> - Widget resolvers are entered into plugin.xml of the
> org.eclipse.tptp.test.auto.gui plug-in. Is this a necessary step for a
> custom resolver?

Widget resolvers are integrated/registered with TPTP by extending the
extension point "org.eclipse.tptp.test.auto.gui.widgetResolver".
Extension Points are the eclipse mechanism to expose extensibility to
other plug-ins. It is not necessary for you to make changes to the
org.eclipse.tptp.test.auto.gui plug-in in order to add a new widget
resolver. Rather, in your own plug-in, you should declare a manifest
dependency on org.eclipse.tptp.test.auto.gui, and then create your an
extension of the org.eclipse.tptp.test.auto.gui.widgetResolver extension
point in your plug-in as well. When the AGR gets the list of all
registered widget resolvers, it does so by asking eclipse to enumerate
all extensions of this extension point, and the resulting enumeration
will contain your contributions as well as those in the
org.eclipse.tptp.test.auto.gui plug-in.

> - How do I assure that e.g. a button is not recorded by the nontrivial
> resolver but by my custom resolver?

If the nontrivial resolver currently returns non-null for getUniqueID()
(meaning that it believes it can properly identify the widget), then you
should register your widget resolver with a higher priority than the
nontrivial resolver (so your resolver gets called first.) If you put
yourself first in the list of resolvers (highest priority), be sure to
make your methods fail quickly when they determine that they can not
identify or find a widget (so you don't slow down the record and
playback significantly.)

You may also want to take a look at the Adaptive widget resolver, which
is customizable without requiring coding. See
http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI.html#2.4.1
(and the source code) for more information.

Hope this helps,
--Joe
Re: Widget Resolver help needed [message #113756 is a reply to message #112803] Mon, 01 October 2007 13:04 Go to previous message
Matthias Wiskow is currently offline Matthias Wiskow
Messages: 25
Registered: July 2009
Junior Member
Hi Joe,

thanks for your answer which really helped a lot!

Matthias

Joe Toomey wrote:
> Hi Matthias,
>
> First, thanks very much for helping out here in the newsgroup. It is
> nice to see non-committer contributors giving back by helping people who
> are new to the project, and the community of over-burdened committers
> greatly appreciates your help. :-)
>
> I haven't implemented my own widget resolvers, but I have done a lot of
> work on the TPTP Test Project over the years, and I think I can help
> with some of your questions.
>
> > - I can write my custom widget resolver code. But how exactly is it
> > integrated in TPTP?
> > - Widget resolvers are entered into plugin.xml of the
> > org.eclipse.tptp.test.auto.gui plug-in. Is this a necessary step for a
> > custom resolver?
>
> Widget resolvers are integrated/registered with TPTP by extending the
> extension point "org.eclipse.tptp.test.auto.gui.widgetResolver".
> Extension Points are the eclipse mechanism to expose extensibility to
> other plug-ins. It is not necessary for you to make changes to the
> org.eclipse.tptp.test.auto.gui plug-in in order to add a new widget
> resolver. Rather, in your own plug-in, you should declare a manifest
> dependency on org.eclipse.tptp.test.auto.gui, and then create your an
> extension of the org.eclipse.tptp.test.auto.gui.widgetResolver extension
> point in your plug-in as well. When the AGR gets the list of all
> registered widget resolvers, it does so by asking eclipse to enumerate
> all extensions of this extension point, and the resulting enumeration
> will contain your contributions as well as those in the
> org.eclipse.tptp.test.auto.gui plug-in.
>
> > - How do I assure that e.g. a button is not recorded by the nontrivial
> > resolver but by my custom resolver?
>
> If the nontrivial resolver currently returns non-null for getUniqueID()
> (meaning that it believes it can properly identify the widget), then you
> should register your widget resolver with a higher priority than the
> nontrivial resolver (so your resolver gets called first.) If you put
> yourself first in the list of resolvers (highest priority), be sure to
> make your methods fail quickly when they determine that they can not
> identify or find a widget (so you don't slow down the record and
> playback significantly.)
>
> You may also want to take a look at the Adaptive widget resolver, which
> is customizable without requiring coding. See
> http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI.html#2.4.1
> (and the source code) for more information.
>
> Hope this helps,
> --Joe
Previous Topic:Plugin does not work properly in standard mode
Next Topic:api recorder problems
Goto Forum:
  


Current Time: Wed Oct 22 06:35:52 GMT 2014

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

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