Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » react on editor action "new Editor"
react on editor action "new Editor" [message #334854] Tue, 03 March 2009 15:37 Go to next message
christian is currently offline christianFriend
Messages: 5
Registered: July 2009
Junior Member
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 18:03 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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: Fri Apr 26 11:23:08 GMT 2024

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

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

Back to the top