Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Popup menus in RCP application
Popup menus in RCP application [message #448430] Mon, 24 April 2006 14:34 Go to next message
Eclipse UserFriend
Originally posted by: fredrik.ferm.se.ibm.com

Hello
I am developing an RCP application to learn more about EMF, RCP & various
user interface technologies such as JFace & SWT.
I now have the problem of creating a popup menu.
I have a view that shows EMF objects of my own defined type Person. I also
have an action that is supposed to add a new person to the list. When I run
this action from a menu it works fine. Now I want to create a popup menu so
that new persons can be created easily directly from the view.
I have used the exension point org.eclipse.ui.popupMenus to do this. I have
tried to add the action both as an objectContribution and as a
viewerContribution, but nothing works. When I run the example and
right-click in the view nothing happens, no popup menu appears. I have no
idea how to move further. I suspect that the menu has to be initialized
somewhere, but how and where ?
If anybody has some insights into this, I would be grateful for some
pointers.
Regards
Fredrik Ferm

P.S. here is the part of my plugin.xml-file that defines the
org.eclipse.ui.popupMenus extension.
<extension point="org.eclipse.ui.popupMenus">
<objectContribution
objectClass="net.sofft.recept.emf.recept.Person"
adaptable="false"
nameFilter="*"
id="net.sofft.recept.popup.Person">
<action
label="RCPProject.action3"
class="net.sofft.recept.rcp.actions.AddPersonAction"
menubarPath="additions"
id="RCPProject.action3"/>
</objectContribution>
<viewerContribution
targetID="net.sofft.recept.rcp.views.PersonList"
id="net.sofft.recept.popup.PersonViewerContribution">
<action
label="RCPProject.action4"
class="net.sofft.recept.rcp.actions.AddPersonAction"
menubarPath="additions"
id="RCPProject.action4"/>
</viewerContribution>
</extension>
Re: Popup menus in RCP application [message #448727 is a reply to message #448430] Sun, 30 April 2006 19:53 Go to previous message
Roman Mukhin is currently offline Roman MukhinFriend
Messages: 52
Registered: July 2009
Member
No Message Body
Previous Topic:place view independent of a perspective
Next Topic:Why help system was shown in external browser?
Goto Forum:
  


Current Time: Thu Dec 05 00:37:40 GMT 2024

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

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

Back to the top