Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » View Toolbar button issue while SWTBot and Eclipse Juno(java.lang.NoSuchMethodError while checking for View Tool bar)
View Toolbar button issue while SWTBot and Eclipse Juno [message #1006450] Thu, 31 January 2013 11:29 Go to next message
Syamananda Singh is currently offline Syamananda SinghFriend
Messages: 4
Registered: September 2012
Junior Member
Hi,

I'm using Eclipse 4.2 with SWTBot 2.0.5 for testing my application.
On trying to click on a Toolbar button of a view, it's throwing ava.lang.NoSuchMethodError: org.eclipse.ui.internal.PartPane.getToolBar()Lorg/eclipse/swt/widgets/Control.

Below is my code :

// At this point, the active view returned is Breakpoint point view
SWTBotView activeView = bot.activeView();
// At this point, Breakpoint View has multiple breakpoints
SWTBotToolbarButton toolbarButton = activeView.toolbarButton("Remove All Breakpoints");

At the second line, the below exception is thrown :

org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NoSuchMethodError: org.eclipse.ui.internal.PartPane.getToolBar()Lorg/eclipse/swt/widgets/Control;)
at org.eclipse.swt.SWT.error(SWT.java:4361)
at org.eclipse.swt.SWT.error(SWT.java:4276)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.swtbot.eclipse.core.UITestApplication.start(UITestApplication.java:54)

Please let me know the possible way for resolving this issue.

Thanks in advance,

Regards,
Syam
Re: View Toolbar button issue while SWTBot and Eclipse Juno [message #1006544 is a reply to message #1006450] Thu, 31 January 2013 15:49 Go to previous message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 771
Registered: July 2009
Location: Grenoble, France
Senior Member
On 01/31/2013 12:29 PM, Syamananda Singh wrote:
> Hi,
>
> I'm using Eclipse 4.2 with SWTBot 2.0.5 for testing my application.
> On trying to click on a Toolbar button of a view, it's throwing
> ava.lang.NoSuchMethodError:
> org.eclipse.ui.internal.PartPane.getToolBar()Lorg/eclipse/swt/widgets/Control.
>
>
> Below is my code :
>
> // At this point, the active view returned is Breakpoint point view
> SWTBotView activeView = bot.activeView(); // At this point, Breakpoint
> View has multiple breakpoints
> SWTBotToolbarButton toolbarButton = activeView.toolbarButton("Remove All
> Breakpoints");
>
> At the second line, the below exception is thrown :
>
> org.eclipse.swt.SWTException: Failed to execute runnable
> (java.lang.NoSuchMethodError:
> org.eclipse.ui.internal.PartPane.getToolBar()Lorg/eclipse/swt/widgets/Control;)

That kind of error is typical of an API incompatibility: the method with
this signature used to be there and consumed by SWTBot or a dependency,
and is not present any more in Eclipse 4.2.
Could you please write a small test to reproduce this issue in the
org.eclipse.swtbot.eclipse.finder.test plugin and open a Bugzilla to
report it?
http://wiki.eclipse.org/SWTBot/Contributing

--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Previous Topic:How to using Enter key on a text box
Next Topic:Bug or Error? Using SWTBot and Juno
Goto Forum:
  


Current Time: Sun Dec 21 15:53:49 GMT 2014

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

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