[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.rcp] Re: How to enable Window menu/functionality
|
Hi Alexander,
thanks a million, you gave me the right place to start looking. :-)
Cheers,
Martin (Kersten)
PS: You saved the day!
> sorry, last post was a accident:(
>
> ok, now I know what you mean! I will help you and show a code snipe which
> add's the window item. I'am not sure how many experinace you have with
> this platform. So ask again, when the example are not clears all
questions.
>
> The following methods are part of my workbench advisor class definition.
> It was called from framework!
>
> /* (non-Javadoc)
> * @see org.eclipse.ui.application.WorkbenchAdvisor#fillActionBars
> * (org.eclipse.ui.IWorkbenchWindow,
> * org.eclipse.ui.application.IActionBarConfigurer, int)
> */
> public void fillActionBars(IWorkbenchWindow window,
> IActionBarConfigurer configurer, int flags)
> {
> super.fillActionBars(window, configurer, flags);
> System.out.println("CBasisWorkbenchAdvisor.fillActionBars()");
> if((flags & FILL_MENU_BAR) != 0)
> {
> initDefaultMenuBar(window, configurer);
> }
>
> if((flags & FILL_COOL_BAR) != 0);
> if((flags & FILL_STATUS_LINE) != 0);
> if((flags & FILL_PROXY) != 0);
> }
>
> private void initDefaultMenuBar(IWorkbenchWindow window,
> IActionBarConfigurer configurer)
> {
> System.out.println("CBasisWorkbenchAdvisor.initDefaultMenus()");
> IMenuManager manager = configurer.getMenuManager();
> manager.add(createFileMenu(window));
> manager.add(createWindowMenu(window));
> manager.add(ActionFactory.OPEN_NEW_WINDOW.create(window));
> manager.add(createHelpMenu(window));
> }
>
> You will see the creation OPEN_NEW_WINDOW in "initDefaultMenuBar" with
> Help of
> the ActionFactory class. These class provice more standard menuitems.
>
> Have a look into help system for "retargetable" action. That is a set of
> Action which you can reuse by platform.
>
> regards
>
> alexander
> > Martin Kersten wrote:
>
> > > > I'am not sure what you mean.
>
> > > Well actually I am looking for a way to add the Window menu item your
> > > ordinary Eclipse IDE provides. You know the menu you are using
> > > to open new windows, open the workbench preferences dialog, customize
> > > your perspective and open new views.
>
> > > Thanks,
>
> > > Martin (Kersten)
>
> > > > Let's try to help you with some examples
> > > > - ActionFactory.OPEN_NEW_WINDOW.create(window) // creates standards
> > > > actions
> > > > - Extension point org.eclipse.ui.popupMenus
> > > > - Extension point org.eclipse.ui.actionSets
> > > > - ....
> > > >
> > > > regards
> > > >
> > > > alexander
> > > >
> > > > ActionFactory.FILE
> > > >
> > > > Martin Kersten wrote:
> > > >
> > > > > Hi there,
> > > >
> > > > > I am writing a RCP and I am wondering how I can add the
> functionality
> > > > > the normal Window-menu adds within the normal Eclipse IDE.
> > > >
> > > > > You know having a window item where to add/save perspectives, set
> > > > > properties and everything... .
> > > >
> > > >
> > > > > Thanks,
> > > >
> > > > > Martin (Kersten)
> > > >
> > > >
>
>