Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Customize StandardEditorSystemMenu

It's not currently possible to do this.  Please file an enhancement 
request against Platform UI, giving more details about your use case.
https://bugs.eclipse.org/bugs/




michael.reilich@xxxxxxxxxxxxxxxxxxxxxxxx 
Sent by: platform-ui-dev-bounces@xxxxxxxxxxx
10/10/2005 04:24 AM
Please respond to
"Eclipse Platform UI component developers list."


To
platform-ui-dev@xxxxxxxxxxx
cc

Subject
[platform-ui-dev] Customize StandardEditorSystemMenu










Hi!

How can the StandardEditorSystemMenu
(org.eclipse.ui.internal.presentations.util) be customized without
replacing code from eclipse packages?

i.e. Disable or hide SystemMenuNewEditor, SystemMenuClose, etc.

1) Get a reference on the Menu.

(this = individual editor derived from EditorPart)

EditorSite site = (EditorSite) this.getEditorSite();
WorkbenchPage page = (WorkbenchPage) site.getPage();
EditorAreaHelper helper = (EditorAreaHelper) page.getEditorPresentation();
EditorStack st = helper.getActiveWorkbook();

The reference to the menu is (from EditorStack) -> presentationSite ->
presentation -> systemMenu, but EditorStack.getPresentationSite() has
protected access.

2) Change construction of the menu.

Derive from EditorSite, WorkbenchPage, etc. , but the instance of
EditorAreaHelper is created in WorkbenchPage.init (private), so I cannot
exchange the object.

3) Get the reference on the MenuItems from Display.getMenuItem(int id), 
but
its package-wide.

Does anyone has an idea?

Thanks for your help!

Regards
--
Michael

_______________________________________________
platform-ui-dev mailing list
platform-ui-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-ui-dev




Back to the top