Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Extending the ContextMenu of Property Sheet View in EMF Editor
Extending the ContextMenu of Property Sheet View in EMF Editor [message #156771] Fri, 14 November 2003 08:23
Eclipse UserFriend
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="&amp;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="&amp;PropertiesPopup Java Tools">
<separator name="group1"/>
</menu>
<action

id=" prototype.elements.presentation.PropertiesPopup.runPropertie sPopup "
label="&amp;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
Previous Topic:Grouping of Getters and Setters
Next Topic:Weird error while copying CompilationUnitEditor
Goto Forum:
  


Current Time: Thu May 08 01:42:42 EDT 2025

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

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

Back to the top