Matt,
In EMF's org.eclipse.emf.ecore.presentation.EcoreActionBarContributor we
do it like this:
protected IAction showPropertiesViewAction =
new
Action(EcoreEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item"))
{
public void run()
{
try
{
getPage().showView("org.eclipse.ui.views.PropertySheet");
}
catch (PartInitException exception)
{
EcoreEditorPlugin.INSTANCE.log(exception);
}
}
};
protected void addGlobalActions(IMenuManager menuManager)
{
menuManager.insertAfter("additions-end", new
Separator("ui-actions"));
menuManager.insertAfter("ui-actions", showPropertiesViewAction);
refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());
menuManager.insertAfter("ui-actions", refreshViewerAction);
super.addGlobalActions(menuManager);
}
Matt Dickie wrote:
Hi all,
I have a view which shows objects of my own classes from my model
layer. I would like to add a 'properties' action on the context menu
that shows the property pages I have declared using the
org.eclipse.ui.propertyPages extension point. Do I have to implement
this action myself? If not how do I get it to appear - my context menu
is registered with the IViewSite and has the MB_EXTENSIONS groups.
Thanks in advance
Matt