Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 282388

Summary: [EditorMgmt] No options to diable "New Editor" popup menu item on editor tab
Product: [Eclipse Project] Platform Reporter: Raghuveer <traghuveer>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED DUPLICATE QA Contact: Remy Suen <remy.suen>
Severity: enhancement    
Priority: P3 CC: darin.eclipse, plingplong, pwebster
Version: 3.4.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Raghuveer CLA 2009-07-03 11:15:46 EDT
In our application we have multiple editor opened. We would like to have only single instance of each editor. But "New Editor" popup menu item options is bringing up another instance of the same editor.

  Is there any way to disable either the menu item or to have single instance of the editor at any point in time.
Comment 1 Paul Webster CLA 2009-07-06 15:02:07 EDT
See bug 112293

PW
Comment 2 Boris Bokowski CLA 2009-07-09 11:04:05 EDT
Sorry, this is currently not possible. You can try to support more than one instance of an editor, or if that is not an option, perhaps you are willing to contribute a patch to add this feature?

See http://wiki.eclipse.org/Platform_UI/How_to_Contribute
Comment 3 Raghuveer CLA 2009-07-14 07:09:15 EDT
(In reply to comment #2)
> Sorry, this is currently not possible. You can try to support more than one
> instance of an editor, or if that is not an option, perhaps you are willing to
> contribute a patch to add this feature?
> 
> See http://wiki.eclipse.org/Platform_UI/How_to_Contribute
> 

We shall add this when we find some time to contribute in this area.
Comment 4 Boris Bokowski CLA 2009-07-14 10:18:12 EDT
(In reply to comment #3)
> We shall add this when we find some time to contribute in this area.

Great! Feel free to discuss how best to approach this, on this bug.
Comment 5 Boris Bokowski CLA 2009-11-17 13:06:14 EST
Remy is now responsible for watching the [EditorMgmt] component area.
Comment 6 niv0 - CLA 2009-11-19 03:01:43 EST
Hi,

I just managed to disable the "new editor" action within Galileo by creating a handler for command "org.eclipse.ui.window.newEditor".
The handler is active for my editors but never enabled 
=> expression: activeWhen/activePart/instanceof(my editors)
=> expression: enabledWhen/count/value -1

This allows disabling the command for your editors, but not for standard text editors.

Maybe Paul can tell if this might be the correct way to go currently.
Comment 7 Remy Suen CLA 2009-11-24 10:51:08 EST

*** This bug has been marked as a duplicate of bug 103045 ***