Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Adding a control to the toolbar
Adding a control to the toolbar [message #330166] Thu, 17 July 2008 17:19 Go to next message
David  Pérez is currently offline David PérezFriend
Messages: 228
Registered: July 2009
Senior Member
Hi,

I have managed to add a control to the status bar with this extension:

<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="toolbar:org.eclipse.ui.trim.status">
<toolbar
id="com.jobisjob.line.count">
<control
class="com.jobisjob.ui.linecount.LineCountControl"
id="com.jobisjob.ui.grid.view.LineCountControl">
</control>
</toolbar>
</menuContribution>
</extension>


Now, I want to do the same to the toolbar of the RCP app. Currently I
haven't defined any actionSets nor toolbars.

<menuContribution

locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions ">
<toolbar
id="com.jobisjob.location.bar">
<control
class="com.jobisjob.ui.linecount.LineCountControl"
id="com.jobisjob.ui.grid.view.LineCountControl">
</control>
</toolbar>
</menuContribution>

It doesn't display anything. :-(

I have tried to do it in the ActionBarAdvisor, but I'm a little lost.
Any help will be greatly appreciated.
Re: Adding a control to the toolbar [message #330167 is a reply to message #330166] Thu, 17 July 2008 17:36 Go to previous message
David  Pérez is currently offline David PérezFriend
Messages: 228
Registered: July 2009
Senior Member
I have managed to show it:

configurer.setShowCoolBar(true); must be called.

I was confused by the fact that at first, the toolbar area was shown empty
and with a height 3 times of a normal toolbar, when I enabled the cool
bar. Maybe now it works because I have deleted my workspace data.

David Perez wrote:

> Hi,

> I have managed to add a control to the status bar with this extension:

> <extension
> point="org.eclipse.ui.menus">
> <menuContribution
> locationURI="toolbar:org.eclipse.ui.trim.status">
> <toolbar
> id="com.jobisjob.line.count">
> <control
> class="com.jobisjob.ui.linecount.LineCountControl"
> id="com.jobisjob.ui.grid.view.LineCountControl">
> </control>
> </toolbar>
> </menuContribution>
> </extension>


> Now, I want to do the same to the toolbar of the RCP app. Currently I
> haven't defined any actionSets nor toolbars.

> <menuContribution

> locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions ">
> <toolbar
> id="com.jobisjob.location.bar">
> <control
> class="com.jobisjob.ui.linecount.LineCountControl"
> id="com.jobisjob.ui.grid.view.LineCountControl">
> </control>
> </toolbar>
> </menuContribution>

> It doesn't display anything. :-(

> I have tried to do it in the ActionBarAdvisor, but I'm a little lost.
> Any help will be greatly appreciated.
Previous Topic:[p2] Re: uninstalling a plugin
Next Topic:exit eclipse IPlatformRunnable with error exit code
Goto Forum:
  


Current Time: Sun Jun 30 00:12:49 GMT 2024

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

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

Back to the top