Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to add a menu item on the context menu
How to add a menu item on the context menu [message #234727] Fri, 26 June 2009 09:23 Go to next message
Eclipse UserFriend
Originally posted by: billgrand08.gmail.com

I see that we can use the
" org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProviders "
extension point, can someone give a example how to add a menu item on the
context menu, I define as below, but it doesn't work(add a menu named
"AssignToGlossaryMenu"), thanks.

<extension
id="ContributionItemProvider"
name="ContributionItemProvider"

point=" org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProviders ">
<contributionItemProvider
checkPluginLoaded="false"
class="com.mine.actions.ContributionItemProvider">
<Priority
name="Lowest">
</Priority>
<popupContribution

id="org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu ">
<popupMenuGroup
id="PopupMenuGroup"
path="/"
separator="true">
</popupMenuGroup>
<popupMenu
id="AssignToGlossaryMenu"
path="/PopupMenuGroup">
</popupMenu>
<popupAction
id="AssignToGlossaryAction"
path="/AssignToGlossaryMenu">
</popupAction>
</popupContribution>
</contributionItemProvider>
</extension>
Re: How to add a menu item on the context menu [message #234913 is a reply to message #234727] Tue, 30 June 2009 18:18 Go to previous message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 530
Registered: July 2009
Senior Member
Hello Bill,

Does it help when you add 'popupStructuredContributionCriteria' element (
like this - <popupStructuredContributionCriteria objectClass="com.mine.edit.parts.ElementEditPart"/>)
?
If not, does the program ever enter com.mine.actions.ContributionItemProvider#createAction()
method?

Best wishes,
Tanya.

> org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProv
> iders
>
Previous Topic:can't open GMF Editor after adding Audit Rules to mapping model since using Galileo
Next Topic:Issue with Decorator, Hanger, and Icons
Goto Forum:
  


Current Time: Thu Apr 02 17:04:05 GMT 2020

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

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

Back to the top