Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Want ShowView menu in Window's menu
Want ShowView menu in Window's menu [message #438067] Thu, 13 October 2005 01:04 Go to next message
Eclipse UserFriend
Hi,
I am using RCP to build my application. I want some views in the Show View
sub-menu on the Window's menu. I am adding it using
"layout.addShowViewShortcut" where layout is IPageLayout in my class that
implements IPerspectiveFactory , but its not appearing in the Window's
menu. If I am adding the view as "layout.addView(IPageLayout.ID_OUTLINE,
IPageLayout.TOP, IPageLayout.RATIO_MAX, IPageLayout.ID_EDITOR_AREA);" its
appearing but its not coming in or I should say the ShowView submenu is
not appearing at all if I am adding it through addShowViewShorcut. Could
you please help me out. Its really urgent.
Thankz
Archana
Re: Want ShowView menu in Window's menu [message #438068 is a reply to message #438067] Thu, 13 October 2005 03:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.eclipse.org

Archana wrote:

> Hi,
> I am using RCP to build my application. I want some views in the Show
> View sub-menu on the Window's menu. I am adding it using
> "layout.addShowViewShortcut" where layout is IPageLayout in my class
> that implements IPerspectiveFactory , but its not appearing in the
> Window's menu. If I am adding the view as
> "layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.TOP,
> IPageLayout.RATIO_MAX, IPageLayout.ID_EDITOR_AREA);" its appearing but
> its not coming in or I should say the ShowView submenu is not
> appearing at all if I am adding it through addShowViewShorcut. Could
> you please help me out. Its really urgent. Thankz Archana

This should work but note that an existing perspective is not affected.
Either open a new on or reset the perspective using Window > Reset
Perspective.

Dani
Re: Want ShowView menu in Window's menu [message #438070 is a reply to message #438068] Thu, 13 October 2005 05:27 Go to previous messageGo to next message
Eclipse UserFriend
I am adding "Window" menu in my RCP application as:

private MenuManager createWindowMenu(IWorkbenchWindow window) {
MenuManager menu = new
MenuManager("Window",IWorkbenchActionConstants.M_WINDOW);
menu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
menu.add(ActionFactory.OPEN_NEW_WINDOW.create(window));
menu.add(ActionFactory.NEW_EDITOR.create(window));
menu.add(new Separator());
menu.add(ActionFactory.PREFERENCES.create(window));
return menu;
}

Now on this "Window" menu I want the option of "Show View" also. For this
i added some views through "addShowViewShortcut" in the my perspective
class but the option of "Show View" was not appearing.

Regarding the resetting of the perspective : i have not created the
CoolToolbar in my RCP and so there is no way to reset the perpective.

Would you also clear few of doubts:
1. Will the menu item "Show View" not appear by default as we add the
"Window" menu in my RCP application. As there is no option in the
ActionFactory to create the "Show view" , is there any other way to add
that in "Window" menu.

2. Is there any way by which we can rearrange the menu items in the menu.

Thankz
Archana
Re: Want ShowView menu in Window's menu [message #438071 is a reply to message #438070] Thu, 13 October 2005 05:59 Go to previous messageGo to next message
Eclipse UserFriend
On Thu, 13 Oct 2005 11:27:57 +0200, Archana <archana@yasutech.com> wrote:
Re: Want ShowView menu in Window's menu [message #438072 is a reply to message #438070] Thu, 13 October 2005 06:00 Go to previous messageGo to next message
Eclipse UserFriend
> menu.add(ActionFactory.PREFERENCES.create(window));

menu.add(ContributionItemFactory.VIEWS_SHORTLIST.create(wind ow));
Re: Want ShowView menu in Window's menu [message #438073 is a reply to message #438072] Thu, 13 October 2005 07:05 Go to previous message
Eclipse UserFriend
Thankz for the response. I also hunted out the same solution.
Previous Topic:Resource API and StateLocation
Next Topic:How can I remove automatically added actions
Goto Forum:
  


Current Time: Thu Jul 03 17:15:06 EDT 2025

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

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

Back to the top