[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform] Re: Property pages for my own classes.

Hi Ed,

I've just found org.eclipse.ui.dialogs.PropertyDialogAction - that seems to be what I need. Thanks

Matt

Ed Merks wrote:
Matt,

Yep, I did misunderstand.  Sorry.


Matt Dickie wrote:

Hi Ed,

Thanks, but I think you misunderstood, I want to display the property pages dialog, not the properties view. I think I'll just write my own action to do it.

Matt

Ed Merks wrote:

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