| [AGR] ClassCastException in Verification Hook [message #94299] |
Wed, 28 March 2007 07:34  |
|
Originally posted by: Christopher.Schick.gmx.de
Guys,
I'm using the AGR to record a couple of user interactions with a custom
plug-in and test the result through Verification Hooks.
Recording works fine as well as creation of the Verification Hook code
skeleton.
However, inside the Hook method I want to access the properties of a
selected view. To achieve this I need to typecast arg0 (IViewPart) to the
type of the selected view (e.g. CustomView).
As soon as I try to cast arg0 to one of our custom view classes, I get a
ClassCastException.
Funny enough, when writing the class name to the console via
"System.out.println(arg0.getClass());"
it returns: "class com.voiceobjects.CustomView"
Now when trying to do the cast it fails: "com.voiceobjects.CustomView CV =
(CustomView)arg0;"
Any insight ?
Thanks
-Chris
P.S.: Type hierarchy for CustomView is WorkbenchPart => ViewPart => VOView
=> CustomView
|
|
|
|
| Re: [AGR] ClassCastException in Verification Hook [message #94376 is a reply to message #94346] |
Wed, 28 March 2007 12:41   |
|
Originally posted by: Christopher.Schick.gmx.de
Hi Ali,
Actually adding the plug-in to the depency list did the trick. Many thanks
for your help.
Imp question: Is there any documentation about the use of classloaders in
the test execution suites ?
I don't want to face similar issues when automating the tests.
Thanks
-Chris
|
|
|
| Re: [AGR] ClassCastException in Verification Hook [message #95125 is a reply to message #94376] |
Mon, 09 April 2007 09:59  |
No real name Messages: 404 Registered: July 2009 |
Senior Member |
|
|
There is no documentation available on the classloader. If you're
interested to dig inside the code, then extract
test/org.eclipse.tptp.test.auto.gui and take a look at
org.eclipse.tptp.test.auto.gui.internal.core.VerifHookClassL oader
"Chris" <Christopher.Schick@gmx.de> wrote in message
news:eue5sf$vnq$1@build.eclipse.org...
> Hi Ali,
>
> Actually adding the plug-in to the depency list did the trick. Many thanks
> for your help.
>
> Imp question: Is there any documentation about the use of classloaders in
> the test execution suites ?
>
> I don't want to face similar issues when automating the tests.
>
> Thanks
> -Chris
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.01660 seconds