Widget Resolver problem [message #61899] |
Wed, 29 March 2006 07:06  |
Eclipse User |
|
|
|
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 #62606 is a reply to message #62319] |
Thu, 30 March 2006 06:01  |
Eclipse User |
|
|
|
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
>>
>>
>>
>>
>>
>>
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03045 seconds