Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » [AGR] How is attribute choiceId determined?
[AGR] How is attribute choiceId determined? [message #105115] Mon, 16 July 2007 19:50 Go to next message
Barbara Rosi-Schwartz is currently offline Barbara Rosi-SchwartzFriend
Messages: 448
Registered: July 2009
Senior Member
Hello.

I have a quick question: in a "choice-select" type command, how is the
value of the choiceId attribute determined? I am particularly interested
at the case of a tab selection.

TIA,
B.
Re: [AGR] How is attribute choiceId determined? [message #105176 is a reply to message #105115] Mon, 16 July 2007 21:23 Go to previous messageGo to next message
Liz Dancy is currently offline Liz DancyFriend
Messages: 77
Registered: July 2009
Member
Hi Barbara,

The "choiceId" as you see it in the test case Macro, is determined by the
following procedure:

First, we try to resolve the widget which has been selected by attempting to
resolve the widget using registered widget resolvers.

In most cases, one of the widget resolvers will return a valid WidgetId of
which we use the actual id attribute. This may be, for example, the text of
the TabItem.

If the resolvers can not resolve the widget then we compute a default
choiceId by combining "item#" with the index of the selection in terms of
the parent TabFolder (for the tab selection case).

I hope this answers your question. Let me know if anything remains unclear.

Sincerely,

Liz Dancy

"Barbara Rosi-Schwartz" <Barbara.Rosi-Schwartz@Etish.org> wrote in message
news:f7gi66$9qd$1@build.eclipse.org...
> Hello.
>
> I have a quick question: in a "choice-select" type command, how is the
> value of the choiceId attribute determined? I am particularly interested
> at the case of a tab selection.
>
> TIA,
> B.
Re: [AGR] How is attribute choiceId determined? [message #105189 is a reply to message #105176] Tue, 17 July 2007 10:03 Go to previous messageGo to next message
Barbara Rosi-Schwartz is currently offline Barbara Rosi-SchwartzFriend
Messages: 448
Registered: July 2009
Senior Member
Hi Liz.

Thanks for your clear reply. The reason I asked is the fact that I was
having some problem that I now resolved.

However I now have two related question. I am trying to customise my
widgets IDs as much as I can by using setData() on the widgets at
construction time and then by having my widgetReg.xml using the
getData() method to define their ID. The questions are as follows:

1) A CTabFolder that is used in a MultiPageEditor looks in my object
mine as follows:

<object descriptive="CTabFolder" referenceId="15"
contextId=" editor/com.etish.useme.client.editor.usecase.ui.editor.useca se.UseCaseEditor/aaa "
id="org.eclipse.swt.widgets.Composite#3"/>

In other words, try as I may, the id is still a generic one. Which
Composite do I need to setData() on to have a customised ID?

2) The object mine has the following element:

<object descriptive="CTabFolder: Conditions" referenceId="14"
contextId=" editor/com.etish.useme.client.editor.usecase.ui.editor.useca se.UseCaseEditor/aaa "
resolverId="org.eclipse.tptp.test.auto.gui.adaptive"
id=" {{com.etish.useme.client.editor.usecase.ui.editor.usecase.de scription.DescriptionPage/1}}-{{1.0}} "/>

Although my test case works at playback time, I am baffled by the fact
that I am sitting on an editor page that is called DescriptionPage and I
am clicking on a tab called Conditions. The object in the mine refers to
the Conditions page but the ID is still that of the first tab, the
DescriptionPage.

As I mentioned, my widgetReg.xml has got the following rule:

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

As I said, my test works, but I would like to understand what is happening.

Thank you very much,
B.

Liz Dancy wrote:
> Hi Barbara,
>
> The "choiceId" as you see it in the test case Macro, is determined by the
> following procedure:
>
> First, we try to resolve the widget which has been selected by attempting to
> resolve the widget using registered widget resolvers.
>
> In most cases, one of the widget resolvers will return a valid WidgetId of
> which we use the actual id attribute. This may be, for example, the text of
> the TabItem.
>
> If the resolvers can not resolve the widget then we compute a default
> choiceId by combining "item#" with the index of the selection in terms of
> the parent TabFolder (for the tab selection case).
>
> I hope this answers your question. Let me know if anything remains unclear.
>
> Sincerely,
>
> Liz Dancy
>
> "Barbara Rosi-Schwartz" <Barbara.Rosi-Schwartz@Etish.org> wrote in message
> news:f7gi66$9qd$1@build.eclipse.org...
>> Hello.
>>
>> I have a quick question: in a "choice-select" type command, how is the
>> value of the choiceId attribute determined? I am particularly interested
>> at the case of a tab selection.
>>
>> TIA,
>> B.
>
>
Re: [AGR] How is attribute choiceId determined? [message #106294 is a reply to message #105189] Tue, 24 July 2007 15:10 Go to previous messageGo to next message
Liz Dancy is currently offline Liz DancyFriend
Messages: 77
Registered: July 2009
Member
Hi Barbara,

I would recommend creating a custom widget resolver in this case. This gives
you more control and is a more modular solution.

However, if you prefer to modify the widgetReg.xml, could you send me your
test suite (with Object Mine) as well as any setup required so I can step
through and see the specifics leading to the Object Mine entry (and also the
ID from question 1)).

Sincerely,

Liz Dancy

"Barbara Rosi-Schwartz" <Barbara.Rosi-Schwartz@Etish.org> wrote in message
news:f7i45i$306$1@build.eclipse.org...
> Hi Liz.
>
> Thanks for your clear reply. The reason I asked is the fact that I was
> having some problem that I now resolved.
>
> However I now have two related question. I am trying to customise my
> widgets IDs as much as I can by using setData() on the widgets at
> construction time and then by having my widgetReg.xml using the getData()
> method to define their ID. The questions are as follows:
>
> 1) A CTabFolder that is used in a MultiPageEditor looks in my object mine
> as follows:
>
> <object descriptive="CTabFolder" referenceId="15"
> contextId=" editor/com.etish.useme.client.editor.usecase.ui.editor.useca se.UseCaseEditor/aaa "
> id="org.eclipse.swt.widgets.Composite#3"/>
>
> In other words, try as I may, the id is still a generic one. Which
> Composite do I need to setData() on to have a customised ID?
>
> 2) The object mine has the following element:
>
> <object descriptive="CTabFolder: Conditions" referenceId="14"
> contextId=" editor/com.etish.useme.client.editor.usecase.ui.editor.useca se.UseCaseEditor/aaa "
> resolverId="org.eclipse.tptp.test.auto.gui.adaptive"
> id=" {{com.etish.useme.client.editor.usecase.ui.editor.usecase.de scription.DescriptionPage/1}}-{{1.0}} "/>
>
> Although my test case works at playback time, I am baffled by the fact
> that I am sitting on an editor page that is called DescriptionPage and I
> am clicking on a tab called Conditions. The object in the mine refers to
> the Conditions page but the ID is still that of the first tab, the
> DescriptionPage.
>
> As I mentioned, my widgetReg.xml has got the following rule:
>
> <class name = "org.eclipse.swt.custom.CTabFolder" matchThreshold = "1.0">
> <method name = "getData" weight = "1.0"/> </class>
>
> As I said, my test works, but I would like to understand what is
> happening.
>
> Thank you very much,
> B.
>
> Liz Dancy wrote:
>> Hi Barbara,
>>
>> The "choiceId" as you see it in the test case Macro, is determined by the
>> following procedure:
>>
>> First, we try to resolve the widget which has been selected by attempting
>> to resolve the widget using registered widget resolvers.
>>
>> In most cases, one of the widget resolvers will return a valid WidgetId
>> of which we use the actual id attribute. This may be, for example, the
>> text of the TabItem.
>>
>> If the resolvers can not resolve the widget then we compute a default
>> choiceId by combining "item#" with the index of the selection in terms of
>> the parent TabFolder (for the tab selection case).
>>
>> I hope this answers your question. Let me know if anything remains
>> unclear.
>>
>> Sincerely,
>>
>> Liz Dancy
>>
>> "Barbara Rosi-Schwartz" <Barbara.Rosi-Schwartz@Etish.org> wrote in
>> message news:f7gi66$9qd$1@build.eclipse.org...
>>> Hello.
>>>
>>> I have a quick question: in a "choice-select" type command, how is the
>>> value of the choiceId attribute determined? I am particularly interested
>>> at the case of a tab selection.
>>>
>>> TIA,
>>> B.
>>
Re: [AGR] How is attribute choiceId determined? [message #106308 is a reply to message #106294] Tue, 24 July 2007 15:55 Go to previous message
Barbara Rosi-Schwartz is currently offline Barbara Rosi-SchwartzFriend
Messages: 448
Registered: July 2009
Senior Member
Thanks for your reply, Liz.

I will have a look at the custom widget resolver path and try and follow
it if it is not too complex or time consuming.

Thanks again.

So long,
B.

Liz Dancy wrote:
> Hi Barbara,
>
> I would recommend creating a custom widget resolver in this case. This gives
> you more control and is a more modular solution.
>
> However, if you prefer to modify the widgetReg.xml, could you send me your
> test suite (with Object Mine) as well as any setup required so I can step
> through and see the specifics leading to the Object Mine entry (and also the
> ID from question 1)).
>
> Sincerely,
>
> Liz Dancy
Previous Topic:Where is the java src attachments for TPTP 4.4?
Next Topic:Agent Controller unavailable on amd64
Goto Forum:
  


Current Time: Thu Apr 25 15:01:20 GMT 2024

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

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

Back to the top