Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Popup menu on View not showing
Popup menu on View not showing [message #460103] Wed, 13 December 2006 13:00 Go to next message
Eclipse UserFriend
Originally posted by: eclipse.patcom.demon.co.uk

Hello

I have a Tree Viewer and am trying to add a context menu. I have
followed the example in "Contributing Actions to the Eclipse Workbench"

I have added the following to plugin.xml


<extension
point="org.eclipse.ui.views">
<view
name="Account"
allowMultiple="false"
icon="icons/logo-16-16.gif"
class="com.wcg.catalyst.common.designer.parts.AccountView"
id="com.wcg.catalyst.common.designer.parts.AccountView">
</view>
</extension>

<extension point="org.eclipse.ui.popupMenus">
<viewerContribution
id="com.wcg.catalyst.common.designer.popup.accountViewer"
targetID="com.wcg.catalyst.common.designer.parts.AccountView ">
<action

id=" com.wcg.catalyst.common.designer.controller.OpenDiagramActio n "
label="Open"
menubarPath="additions"

class=" com.wcg.catalyst.common.designer.controller.OpenDiagramActio n "/>
</viewerContribution>
</extension>

OpenDiagramAction extends Action and implements IViewActionDelegate

The Tree viewer displays the model but using right click has no effect

Is there something else I should be doing

Thanks

Mike
Re: Popup menu on View not showing [message #460106 is a reply to message #460103] Wed, 13 December 2006 13:33 Go to previous messageGo to next message
Eclipse UserFriend
The section you want is:

http://www.eclipse.org/articles/Article-action-contribution/ index.html#Developer:%20Allowing%20action%20contribution%20t o%20your


That talks about the code portion of your context menu. For an example,
check out ResourceNavigator#initContextMenu() in the org.eclipse.ui.ide
plugin.

Later,
PW
Re: Popup menu on View not showing [message #460138 is a reply to message #460106] Thu, 14 December 2006 11:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.patcom.demon.co.uk

Thanks Paul

It was adding the Menu Listener to the Menu Manager that I missed.

I now have the context menu appearing with my new menu items.

There is one bit that puzzles me, in the action the documentation refers
to the run(IAction action) method. This does not get fired when the menu
item is selected, however the run() method does

Cheers

Mike
Paul Webster wrote:
> The section you want is:
>
> http://www.eclipse.org/articles/Article-action-contribution/ index.html#Developer:%20Allowing%20action%20contribution%20t o%20your
>
>
>
> That talks about the code portion of your context menu. For an example,
> check out ResourceNavigator#initContextMenu() in the org.eclipse.ui.ide
> plugin.
>
> Later,
> PW
>
>
Re: Popup menu on View not showing [message #460140 is a reply to message #460138] Thu, 14 December 2006 12:44 Go to previous messageGo to next message
Eclipse UserFriend
run() or run(Event) is called if you programmatically place an Action
subclass in an MenuManager or ToolBarManager.

run(IAction) is called if you use an extension point to create a menu or
toolbar item ... since it's actually an IActionDelegate.

Later,
PW
Re: Popup menu on View not showing [message #460153 is a reply to message #460140] Fri, 15 December 2006 07:46 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse.patcom.demon.co.uk

Thanks Paul
Paul Webster wrote:
> run() or run(Event) is called if you programmatically place an Action
> subclass in an MenuManager or ToolBarManager.
>
> run(IAction) is called if you use an extension point to create a menu or
> toolbar item ... since it's actually an IActionDelegate.
>
> Later,
> PW
Previous Topic:Reusing PropertySheetPage in dialogs and wizards
Next Topic:Alternative location for plugins and features to be updated
Goto Forum:
  


Current Time: Sat Mar 22 09:11:11 EDT 2025

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

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

Back to the top