Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] EGit UI tests fail on Eclipse 4.2 with java.lang.NoSuchMethodError: org.eclipse.ui.internal.PartPane.getToolBar()Lorg/eclipse/swt/widgets/Control

Hi Paul,

maybe I am asking a silly question here, but since Riena experienced some APIs in E4 which didnt work to our surprise I have to ask this. Is the method getToolbar() DEPRECATED (as it should be) ???

I am pretty sure more people will fall over this and would appreciate a DEPRECATED annotation and a javadoc explaining what to do……

On the other hand I could argue why PartPane does not implement the code you pointed out in your reply. Wouldnt that help all the people that assume API compatibility ?

just my 2 cents
christian

Von: Paul Webster <pwebster@xxxxxxxxxxxxxxxxxxx>
Datum: Tue, 10 Apr 2012 13:35:10 +0200
An: Matthias Sohn <matthias.sohn@xxxxxxxxxxxxxx>
Cc: EGit developer discussion <egit-dev@xxxxxxxxxxx>, SWTBot developers list <swtbot-dev@xxxxxxxxxxx>
Betreff: Re: [egit-dev] EGit UI tests fail on Eclipse 4.2 with java.lang.NoSuchMethodError: org.eclipse.ui.internal.PartPane.getToolBar()Lorg/eclipse/swt/widgets/Control

On Thu, Apr 5, 2012 at 7:32 PM, Matthias Sohn <matthias.sohn@xxxxxxxxxxxxxx> wrote:
I am trying to make the EGit UI tests run on Eclipse 4.2, I can't get over the following
problem which seems to be caused by SWTBot using the following method of an 
internal class org.eclipse.ui.internal.PartPane.getToolBar()
which is no longer available in 4.2. This affects quite a number of EGit UI tests.

I tried both the Helios and Indigo nightly build versions of SWTBot.
I couldn't find any Juno / 4.2 based SWTBot version.

Any hints how to fix this ?

testCreateCheckoutDeleteLocalBranch(org.eclipse.egit.ui.view.repositories.GitRepositoriesViewBranchHandlingTest)  Time elapsed: 3.965 sec  <<< ERROR!
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NoSuchMethodError: org.eclipse.ui.internal.PartPane.getToolBar()Lorg/eclipse/swt/widgets/Control;)


They'd need to replace that code with something like:

ToolBar toolbar = null;
IToolBarManager t = ((IViewSite)part.getSite()).getActionBars().getToolBarManager();
if (t instanceof ToolBarManager) {
    toolbar = ((ToolBarManager)t).getControl();
}


Later,
PW


--
Paul Webster
Hi floor.  Make me a sammich! - GIR

-------------------------------------------------------------
compeople AG
Untermainanlage 8
60329 Frankfurt/Main
fon: +49 (0) 69 / 27 22 18 0
fax: +49 (0) 69 / 27 22 18 22
web: www.compeople.de

Vorstand: Jürgen Wiesmaier
Aufsichtsratsvorsitzender: Christian Glanz

Sitz der Gesellschaft: Frankfurt/Main
Handelsregister Frankfurt HRB 56759
USt-IdNr. DE207665352
-------------------------------------------------------------

Back to the top