[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: where to hook in for a coolbar

Hi Martin,

  i set the coolbar visible in my WorkbenchWindowAdvisor like this:

public class  MyWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {

  /**
   * Logger for this class
   */
  private static final Logger logger_ = Logger
      .getLogger( EbmRcWorkbenchWindowAdvisor.class );

/**
*
* @param _workbench_window_configurer
*/
public MyWorkbenchWindowAdvisor ( IWorkbenchWindowConfigurer _workbench_window_configurer ) {
super( _workbench_window_configurer );
}


  /**
   *
   */
  public void preWindowOpen() {
    if ( logger_.isDebugEnabled() ) {
      logger_.debug( "preWindowOpen() - start" ); //$NON-NLS-1$
    }
    super.preWindowOpen();
    IWorkbenchWindowConfigurer workbench_window_configurer = this
        .getWindowConfigurer();
    workbench_window_configurer.setShowCoolBar( true );
    workbench_window_configurer.setTitle( "My title" );
    if ( logger_.isDebugEnabled() ) {
      logger_.debug( "preWindowOpen() - end" ); //$NON-NLS-1$
    }
  }

Thats it!

Hope this helps

Reinhard

martin schrieb:
Dieter Krause wrote:

Hi Mihael,

you should have a class extending the ActionBarAdvisor.
There you need to overwrite the method fillCollBar(...)
e.g.
protected void fillCoolBar(ICoolBarManager coolBar)
{
    ToolBarManager manager = new ToolBarManager(SWT.FLAT |     SWT.WRAP);
    manager.add(yourAction1);
    manager.add(yourAction2);
    coolBar.add(manager);
}


Mihael Knezevic wrote:

i want to add a coolbar to my rcp application. but i don't know where to
hook in for adding a coolbar to it.

any help is appreciated

thanx in advance

mk



Is there anything else one has to do in order to show the coolbar? I implemented fillCoolBar, added an action, but no coolbar is shown in my app.


Any further suggestions?

thx,
M