Dynamic Menus with perspectiveExtension viewShortcut in RCP [message #453426] |
Sun, 30 July 2006 22:05  |
Eclipse User |
|
|
|
Hello, i know you can, in theory, use viewShortcut to put a menuAction
in the Window/showView menu.
Can you tellme how to enable the Windows/showView menu?
At this moment i only have one menu in my RCP "File", so when i use this
extension point i get no results since no "windows/show view" is
automatically populated.
so, how can i enable this placeholder
can i use this extension with my own File/showView menu?
thanks in advance.
|
|
|
Re: Dynamic Menus with perspectiveExtension viewShortcut in RCP [message #453625 is a reply to message #453426] |
Fri, 04 August 2006 07:44  |
Eclipse User |
|
|
|
sensystems wrote:
> Hello, i know you can, in theory, use viewShortcut to put a menuAction
> in the Window/showView menu.
>
> Can you tellme how to enable the Windows/showView menu?
>
> At this moment i only have one menu in my RCP "File", so when i use this
> extension point i get no results since no "windows/show view" is
> automatically populated.
>
> so, how can i enable this placeholder
> can i use this extension with my own File/showView menu?
Add the following in your ActionAdvisor:
private final void addPerspectiveActions(MenuManager menu) {
MenuManager showViewMenuMgr = new MenuManager(<your label>, <your id>);
IContributionItem showViewMenu =
ContributionItemFactory.VIEWS_SHORTLIST.create(window);
showViewMenuMgr.add(showViewMenu);
menu.add(showViewMenuMgr);
}
Greetings from Bremen,
Daniel Krügler
|
|
|
Powered by
FUDForum. Page generated in 0.03149 seconds