Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsHow to access toolbar buttons of an Eclipse editor?
https://www.eclipse.org/forums/index.php/mv/msg/205239/656595/#msg_656595
I'm trying to access a button in the global toolbar which was
contributed for an Eclipse editor using the usual
EditorActionBarContributor#contributeToToolBar() method. I've tried
accessing the button in SWTBot using the following methods but neither
of them is able to find the button:
Is there another way of accessing the buttons in the global toolbar
which belong to an Eclipse editor?
Thanks in advance for any help!
Ovidio]]>Ovidio Mallo2011-02-27T10:10:27-00:00Re: How to access toolbar buttons of an Eclipse editor?
https://www.eclipse.org/forums/index.php/mv/msg/205239/656943/#msg_656943
> Hi all,
>
> I'm trying to access a button in the global toolbar which was
> contributed for an Eclipse editor using the usual
> EditorActionBarContributor#contributeToToolBar() method. I've tried
> accessing the button in SWTBot using the following methods but neither
> of them is able to find the button:
>
> SWTBotEditor#toolbarButton(String tooltip);
> SWTWorkbenchBot#SWTWorkbenchBot(String tooltip);
>
> Is there another way of accessing the buttons in the global toolbar
> which belong to an Eclipse editor?
>
> Thanks in advance for any help!
>
> Ovidio
You need to use #toolbarButtonWithTooltip() as documented here: http://goo.gl/nLgDm
--
Ketan http://ketan.padegaonkar.name | http://eclipse.org/swtbot | @ketanpkr]]>Ketan Padegaonkar2011-03-01T05:57:33-00:00Re: How to access toolbar buttons of an Eclipse editor?
https://www.eclipse.org/forums/index.php/mv/msg/205239/657476/#msg_657476
thanks for your feedback! I've tried to use
SWTWorkbenchBot#toolbarButtonWithTooltip() as you've suggested but this
seems not to find the button. The same method is working fine for
finding buttons in the normal global toolbar of the workbench but it
seems not to work for the buttons belonging to an editor. Is this method
also supposed to work for the toolbar associated to an Eclipse editor?
Thanks again & kind regards,
Ovidio
On 01.03.2011 06:57, Ketan Padegaonkar wrote:
> On 2/27/11 2:10 AM, Ovidio Mallo wrote:
>> Hi all,
>>
>> I'm trying to access a button in the global toolbar which was
>> contributed for an Eclipse editor using the usual
>> EditorActionBarContributor#contributeToToolBar() method. I've tried
>> accessing the button in SWTBot using the following methods but neither
>> of them is able to find the button:
>>
>> SWTBotEditor#toolbarButton(String tooltip);
>> SWTWorkbenchBot#SWTWorkbenchBot(String tooltip);
>>
>> Is there another way of accessing the buttons in the global toolbar
>> which belong to an Eclipse editor?
>>
>> Thanks in advance for any help!
>>
>> Ovidio
>
> You need to use #toolbarButtonWithTooltip() as documented here:
> http://goo.gl/nLgDm
>]]>Ovidio Mallo2011-03-02T22:15:54-00:00