[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: Adding a control to the toolbar

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.