Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » react on editor action "new Editor"
react on editor action "new Editor" [message #334854] Tue, 03 March 2009 10:37 Go to next message
Eclipse UserFriend
Hello,

in eclipse, there exists a popup menu with the entries 'New Editor',
'close', 'close all' and so on (you must right click on the opened editor
tab to get this menu). i've searched this newsgroup to figure out how to
disable this menu. but there is no way to do this.

in my application, i have an editor with an context menu and some logic.
if i choose "New Editor" it will open a new editor. the problem is that
the new one is not initialized properly. it doesn't have an context menu
and other necessary stuff.

is there a way to react on the event wich is triggerd if someone clicks on
the menu entry "New Editor"?

if yes, i could write something like this:

public void onNewEditor() {
// initialize contextmenu and other stuff
}

i hope you can help me out.
Re: react on editor action "new Editor" [message #334858 is a reply to message #334854] Tue, 03 March 2009 13:03 Go to previous message
Eclipse UserFriend
That menu item calls the "org.eclipse.ui.window.newEditor" command ...
if you add one of the IExecutionListeners to the ICommandService you
would be notified if it succeeds.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm
Previous Topic:[JFace Virtual Tree] Dynamically add children
Next Topic:Lock problem on Mac
Goto Forum:
  


Current Time: Wed Mar 26 08:05:41 EDT 2025

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

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

Back to the top