| 
| Extending the ContextMenu of Property Sheet View in EMF Editor [message #156771] | Fri, 14 November 2003 08:23 |  | 
| Eclipse User  |  |  |  |  | Originally posted by: R.o.H.gmx.de 
 Hello,
 
 I would like to add a MenuItem to the ContextMenu which appears
 within the Eclipse Property Sheet View of the my generated EMF
 Editor Plugin. How can I achieve this ? I've already tried to
 make the following changes to the  Editor's 'plugin.xml' file:
 
 <extension point="org.eclipse.ui.popupMenus">
 <viewerContribution
 targetID="org.eclipse.ui.views.PropertySheet"
 id="prototype.elements.presentation.PropertiesPopup.ID">
 <action
 label="&Show PropertiesPopup"
 <!-- ... -->
 
 class=" prototype.elements.presentation.PropertiesPopupShowActionDel egate "
 
 id=" prototype.elements.presentation.PropertiesPopup.showProperti esPopup ">
 </action>
 </viewerContribution>
 </extension>
 
 This hasn't worked ... Does anybody knows why ? When I use e.g.
 'org.eclipse.ui.views.TaskList' as the targetID instead, all
 works fine and the new MenuItem appears correctly within the
 ContextMenu of the Eclipse's TaskList! Another idea was to try
 an ObjectContribution for all Instances of a special EMF eCore
 class which are displayed within the Property Sheet View
 ('org.eclipse.emf.ecore.EStructuralFeature's):
 
 <extension point="org.eclipse.ui.popupMenus">
 <objectContribution
 id="prototype.elements.presentation.PropertiesPopup.ID"
 objectClass="org.eclipse.emf.ecore.EStructuralFeature">
 <menu
 
 id=" prototype.elements.presentation.PropertiesPopup.PropertiesPo pupMenu "
 label="&PropertiesPopup Java Tools">
 <separator name="group1"/>
 </menu>
 <action
 
 id=" prototype.elements.presentation.PropertiesPopup.runPropertie sPopup "
 label="&Run PropertiesPopup Tool"
 <!-- ... -->
 
 menubarPath=" prototype.elements.presentation.PropertiesPopup.PropertiesPo pupMenu/group1 "
 
 helpContextId=" prototype.elements.presentation.PropertiesPopup.run_action_c ontext "
 
 class=" prototype.elements.presentation.PropertiesPopupShowActionDel egate ">
 </action>
 </objectContribution>
 </extension>
 
 This also hasn't worked ... Maybe because the Items, which are
 selectable within a PropertySheetPage aren't EStructuralFeature's
 but IPropertySheetEntries ? Is that correct ?
 (Note: the class PropertiesPopupShowActionDelegate implements
 both IViewActionDelegate and IObjectActionDelegate !) What's the
 problem ?
 
 Thanks a lot
 
 Johannes Neuber
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.04564 seconds