Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » AGR and Window Problem
AGR and Window Problem [message #80246] Wed, 09 August 2006 11:57 Go to next message
Marco Maniscalco is currently offline Marco ManiscalcoFriend
Messages: 9
Registered: July 2009
Junior Member
I used AGR and it works great on 'ApplicationWindow's. But in case of a
own window with its own 'Shell', not using JFace (plain SWT), it fails. I
have the possibility to convert all windows to 'JFace's Windows. But is
there also the possibility to extend the recorder with en extension-point
or something? The docs doesn't help me further ... help appreciated!
Re: AGR and Window Problem [message #80275 is a reply to message #80246] Wed, 09 August 2006 14:39 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 404
Registered: July 2009
Senior Member
Hi Marco,

When AGR attempts to resolve a shell, it first consults registered widget
resolvers to determine if they can resolve the id of the shell. If that
fails, then the following method is used to resolve the shell's id:

org.eclipse.tptp.test.auto.gui.internal.macro.getDefaultShel lId(Shell);

I believe that in your case, the id of the shell can't be resolved. The
following extension point: org.eclipse.tptp.test.auto.gui.widgetResolver is
used to register new widget resolvers. See if providing an extension will
help.

Thanks,
Ali Mehregani

"Marco Maniscalco" <marco.maniscalco@vector-informatik.de> wrote in message
news:9e041c353b8c1ccc13a8463d9ace85bf$1@www.eclipse.org...
> I used AGR and it works great on 'ApplicationWindow's. But in case of a
> own window with its own 'Shell', not using JFace (plain SWT), it fails. I
> have the possibility to convert all windows to 'JFace's Windows. But is
> there also the possibility to extend the recorder with en extension-point
> or something? The docs doesn't help me further ... help appreciated!
>
>
Re: AGR and Window Problem [message #80288 is a reply to message #80275] Wed, 09 August 2006 14:57 Go to previous messageGo to next message
Marco Maniscalco is currently offline Marco ManiscalcoFriend
Messages: 9
Registered: July 2009
Junior Member
Hello Ali,

what would happen if my objects uses setData() and getData() for their own
purposes? I am a little bit scared because of the fact that getData() is
used to identify.

Thanks,
Marco
Re: AGR and Window Problem [message #80317 is a reply to message #80288] Wed, 09 August 2006 15:02 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 404
Registered: July 2009
Senior Member
getData() is used as the last resort to identify an object. If you're
concerned with the value of getData() being used as an ID, then you can
register your own resolver to use other properties as widget keys (e.g. the
title of the window).

"Marco Maniscalco" <marco.maniscalco@vector-informatik.de> wrote in message
news:e28666fb769edeeb4d104e3bdc8f7f94$1@www.eclipse.org...
> Hello Ali,
>
> what would happen if my objects uses setData() and getData() for their own
> purposes? I am a little bit scared because of the fact that getData() is
> used to identify.
>
> Thanks,
> Marco
>
Re: AGR and Window Problem [message #80448 is a reply to message #80317] Thu, 10 August 2006 06:51 Go to previous messageGo to next message
Marco Maniscalco is currently offline Marco ManiscalcoFriend
Messages: 9
Registered: July 2009
Junior Member
now I saw it ;-) nice design. but would you suggest to convert the windows
so that they inherit from ApplicationWindow or Window, in order to work
properly?

Thanks in advance
Marco
Re: AGR and Window Problem [message #80464 is a reply to message #80448] Thu, 10 August 2006 08:14 Go to previous messageGo to next message
Marco Maniscalco is currently offline Marco ManiscalcoFriend
Messages: 9
Registered: July 2009
Junior Member
I have one last question... I saw the command-type "item-select" and used
it on some Tree and List controls. Is it right that there is no way to
select an item with a special 'Caption' or even better 'Data' ?

Thanks for helping !
Re: AGR and Window Problem [message #80504 is a reply to message #80448] Thu, 10 August 2006 14:45 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 404
Registered: July 2009
Senior Member
The way that the default shell id is determined is by considering windows
that inherit from Window:

public static IWidgetId getDefaultShellId(Shell shell)
{
Object data = shell.getData();
String id = "";

if (data instanceof WizardDialog)
{
id = data.getClass().getName().toString();
}
else if (data instanceof Window)
{
id = data.getClass().getName().toString();
}

PrimitiveWidgetId widgetId = new PrimitiveWidgetId();
widgetId.setId(id);

return widgetId;
}




"Marco Maniscalco" <marco.maniscalco@vector-informatik.de> wrote in message
news:0876df74f39e11a54cb14ff0a27882c6$1@www.eclipse.org...
> now I saw it ;-) nice design. but would you suggest to convert the windows
> so that they inherit from ApplicationWindow or Window, in order to work
> properly?
>
> Thanks in advance
> Marco
>
>
Re: AGR and Window Problem [message #80519 is a reply to message #80464] Thu, 10 August 2006 14:46 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 404
Registered: July 2009
Senior Member
I'm not sure why you got that idea. What exactly do you mean by special
'Caption'?
Just like any other widget, you can define a resolver that resolves
table/tree items.

"Marco Maniscalco" <marco.maniscalco@vector-informatik.de> wrote in message
news:c747c4892727ee6b4d6d241a502c0158$1@www.eclipse.org...
> I have one last question... I saw the command-type "item-select" and used
> it on some Tree and List controls. Is it right that there is no way to
> select an item with a special 'Caption' or even better 'Data' ?
>
> Thanks for helping !
>
Re: AGR and Window Problem [message #80666 is a reply to message #80519] Mon, 14 August 2006 09:42 Go to previous messageGo to next message
Marco Maniscalco is currently offline Marco ManiscalcoFriend
Messages: 9
Registered: July 2009
Junior Member
Thanks for your help!
is there an example of an custom resolver avialable out there? haven't
found one jet ..

now there is e.g.

<command descriptive="Users" type="item-select"
contextId="view/foo.bar"
widgetId="org.eclipse.swt.widgets.Tree#1">
<item path="foo.bar.LaunchItem3|0|"/>
</command>

can I use the "path" attribute to resolve e.g. the widget by the caption
of an item?
Re: AGR and Window Problem [message #80681 is a reply to message #80666] Mon, 14 August 2006 14:17 Go to previous message
No real name is currently offline No real nameFriend
Messages: 404
Registered: July 2009
Senior Member
For a sample of a widget resolver you can check out:
org.eclipse.tptp.test.auto.gui.internal.resolvers.NonTrivial WidgetResolver.

> can I use the "path" attribute to resolve e.g. the widget by the caption
> of an item?
Yes, you can either register foo.bar.LaunchItem with the adaptive widget
resolver or your custom widget resolver.

Thanks.

"Marco Maniscalco" <marco.maniscalco@vector-informatik.de> wrote in message
news:5e444fc2382953b622c412d3a2d98054$1@www.eclipse.org...
> Thanks for your help!
> is there an example of an custom resolver avialable out there? haven't
> found one jet ..
>
> now there is e.g.
>
> <command descriptive="Users" type="item-select"
> contextId="view/foo.bar"
> widgetId="org.eclipse.swt.widgets.Tree#1">
> <item path="foo.bar.LaunchItem3|0|"/>
> </command>
>
> can I use the "path" attribute to resolve e.g. the widget by the caption
> of an item?
>
>
Previous Topic:Debug the Virification Hook
Next Topic:TPTP 4.2 and JDK 1.6
Goto Forum:
  


Current Time: Thu Apr 25 05:05:33 GMT 2024

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

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

Back to the top