Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » Widget Resolver problem
Widget Resolver problem [message #61899] Wed, 29 March 2006 12:06 Go to next message
Eclipse UserFriend
Originally posted by: mvjaibharatreddy.yahoo.com

Hi all,

I have problem to understand widget revolver:

How AGR generates the unique identifier?. ( Example : Button#2).

what i am feeling:
It is getData property of the button.

Please correct me.

Thanks in advance.
Jai
Re: Widget Resolver problem [message #62319 is a reply to message #61899] Wed, 29 March 2006 17:25 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 404
Registered: July 2009
Senior Member
The recorder will first request the registered widget resolvers to resolve
the widget in question. If that fails, then the recorder will attempt to
use a primitive resolving mechanism to resolve the widget.

The adaptive widget resolver for example uses a xml file to resolve widgets.
Consider its entry for buttons:

<class name = "org.eclipse.swt.widgets.Button" matchThreshold = "1.0">
<method name = "getData" weight = "1.0"/>
</class>

In the case of buttons, if the value returned by getData happens to be null,
then the recorder will attempt to resolve the button using its index
relative to the composite that contains it. If a composite contains two
buttons, then the first button is resolved as Button#1 and the second button
is resolved as Button#2.

It's strongly recommended for users to define a well-established widget
resolver or contribute entries under the widgetReg.xml file before creating
test cases.
See the user guide for more details.

"Jai9999" <mvjaibharatreddy@yahoo.com> wrote in message
news:e0dt95$cd8$1@utils.eclipse.org...
> Hi all,
>
> I have problem to understand widget revolver:
>
> How AGR generates the unique identifier?. ( Example : Button#2).
>
> what i am feeling:
> It is getData property of the button.
>
> Please correct me.
>
> Thanks in advance.
> Jai
>
>
>
>
>
>
>
Re: Widget Resolver problem [message #62606 is a reply to message #62319] Thu, 30 March 2006 11:01 Go to previous message
Eclipse UserFriend
Originally posted by: mvjaibharatreddy.yahoo.com

Hi ali,

Thank you for the suggestion. It clears my understanding.

One more question on macro syntax :

I see different macro syntax for different setData() key property.

1.
In pulg-in code:
button.setData("tptp.persistance.id", "select_button");
Adaptive widget resolver:
<class name = "org.eclipse.swt.widgets.Button" matchThreshold = "1.0">
<method name = "getData" weight = "1.0">
<argument value = "key"/>
</method>
</class>
Result macro :
<command type="select" contextId="editor/com.xxx"
widgetId=" org.eclipse.swt.widgets.Button#{{select_button}}-{{1.0}}{{se lect_button}}-{{1.0}} "/>
2.
In pulg-in code:
button.setData("key", "select_button");
Adaptive widget resolver:
<class name = "org.eclipse.swt.widgets.Button" matchThreshold = "1.0">
<method name = "key" weight = "1.0">
<argument value = "key"/>
</method>
</class>
Result macro:
<command type="select" contextId="editor/com.xxx"
widgetId="org.eclipse.swt.widgets.Button#{{select_button}}-{{1.0}} "/>

Can any one explain me why the Result macro is different ( widget
identification )?.

Thanks for any insight.

Jai






Button

"Ali Mehregani" <amehrega@ca.ibm.com> wrote in message
news:e0eftt$qbd$1@utils.eclipse.org...
> The recorder will first request the registered widget resolvers to resolve
> the widget in question. If that fails, then the recorder will attempt to
> use a primitive resolving mechanism to resolve the widget.
>
> The adaptive widget resolver for example uses a xml file to resolve
> widgets.
> Consider its entry for buttons:
>
> <class name = "org.eclipse.swt.widgets.Button" matchThreshold = "1.0">
> <method name = "getData" weight = "1.0"/>
> </class>
>
> In the case of buttons, if the value returned by getData happens to be
> null,
> then the recorder will attempt to resolve the button using its index
> relative to the composite that contains it. If a composite contains two
> buttons, then the first button is resolved as Button#1 and the second
> button
> is resolved as Button#2.
>
> It's strongly recommended for users to define a well-established widget
> resolver or contribute entries under the widgetReg.xml file before
> creating
> test cases.
> See the user guide for more details.
>
> "Jai9999" <mvjaibharatreddy@yahoo.com> wrote in message
> news:e0dt95$cd8$1@utils.eclipse.org...
>> Hi all,
>>
>> I have problem to understand widget revolver:
>>
>> How AGR generates the unique identifier?. ( Example : Button#2).
>>
>> what i am feeling:
>> It is getData property of the button.
>>
>> Please correct me.
>>
>> Thanks in advance.
>> Jai
>>
>>
>>
>>
>>
>>
>>
>
>
Previous Topic:Where is the memory usage?
Next Topic:Different variations of a rule without killing perf?
Goto Forum:
  


Current Time: Thu Apr 18 08:54:39 GMT 2024

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

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

Back to the top