Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Remove Editor Tab context menu entries
Remove Editor Tab context menu entries [message #442031] Tue, 10 January 2006 11:31 Go to next message
Guido Kuepper is currently offline Guido KuepperFriend
Messages: 17
Registered: July 2009
Junior Member
Hi NG,

I'd like to customize the Editor Tab context menu in 3.1. Especially I'm
searching for a method to remove the "New Editor" entry. I already
seached eclipse.org and javadoc without results.

Any Idea?

Thanks in advance

Guido

--
Dipl.-Ing. Guido Küpper


DSA Daten- und Systemtechnik GmbH
Pascalstraße 28
D-52076 Aachen
Germany

E-mail: Guido.Kuepper@dsa-ac.de
Internet: www.dsa.de
Re: Remove Editor Tab context menu entries [message #442050 is a reply to message #442031] Tue, 10 January 2006 13:05 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

That's all done in the presentation ... there's no hook to just remove
it. You can open an enhancement request against Eclipse - Platform/UI.

You can always write your own presentation (it controls how each view
stack and how the editor area stack are presented). Check out
org.eclipse.ui.examples.presentation for the EclipseCon 2005 talk + a
couple of examples.

Later,
PW


Re: Remove Editor Tab context menu entries [message #442113 is a reply to message #442050] Wed, 11 January 2006 11:48 Go to previous messageGo to next message
Guido Kuepper is currently offline Guido KuepperFriend
Messages: 17
Registered: July 2009
Junior Member
Paul Webster schrieb:

> You can always write your own presentation (it controls how each view
> stack and how the editor area stack are presented). Check out
> org.eclipse.ui.examples.presentation for the EclipseCon 2005 talk + a
> couple of examples.

That's exactly the thing I don't want to do.
But is there a possibility to disable (setGrey or something like this)
the "New Editor" entry?

Thanks in advance

Guido
Re: Remove Editor Tab context menu entries [message #443876 is a reply to message #442031] Mon, 06 February 2006 10:23 Go to previous messageGo to next message
Aravind is currently offline AravindFriend
Messages: 4
Registered: July 2009
Junior Member
Hi all,
i too need this. Please some body give input .
thanks in advance
Re: Remove Editor Tab context menu entries [message #443879 is a reply to message #442113] Mon, 06 February 2006 13:02 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Guido Küpper wrote:
> That's exactly the thing I don't want to do.
> But is there a possibility to disable (setGrey or something like this)
> the "New Editor" entry?

As per the first line in my response:

That's all done in the presentation ... there's no hook to just remove
it. You can open an enhancement request against Eclipse - Platform/UI.

Later,
PW


Re: Remove Editor Tab context menu entries [message #443903 is a reply to message #443879] Tue, 07 February 2006 03:14 Go to previous messageGo to next message
Aravind is currently offline AravindFriend
Messages: 4
Registered: July 2009
Junior Member
Is there any way we can avoid the pop up from coming i jus dont want any pop up menu for the editor?
Re: Remove Editor Tab context menu entries [message #443927 is a reply to message #443903] Tue, 07 February 2006 12:57 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Aravind wrote:
> Is there any way we can avoid the pop up from coming i jus dont want any pop up menu for the editor?

No

PW


Re: Remove Editor Tab context menu entries [message #830721 is a reply to message #442031] Wed, 28 March 2012 01:51 Go to previous message
Phaedrus The Greek is currently offline Phaedrus The GreekFriend
Messages: 17
Registered: August 2011
Junior Member
Yes, you can grey it out like this:

Although it is not 100% dependable as other handlers can be registered in it's place after the fact.

Put this in ApplicationWorkbenchAdvisor PostStartup() method

@Override
	public void postStartup() {

		super.postStartup();

		ICommandService commandService = (ICommandService)
		PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(ICommandService.class);   
		commandService.getCommand("org.eclipse.ui.window.newEditor").setHandler(null);
		
	}	


A better solution is to register a more specific custom handler as outlined in the feature request:

h-t-t-p://bugs.eclipse.org/bugs/show_bug.cgi?id=103045
Previous Topic:java.lang.VerifyError:
Next Topic:My product includes org.eclipse.platform feature, but not org.eclipse.ui.ide.workbench application?
Goto Forum:
  


Current Time: Fri Apr 19 02:25:14 GMT 2024

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

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

Back to the top