Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Removing Some menu items programatically(How to remove unwanted menu items)
Removing Some menu items programatically [message #923951] Wed, 26 September 2012 06:39 Go to next message
Nagesh Bansal is currently offline Nagesh Bansal
Messages: 21
Registered: September 2012
Junior Member
Hi
I am working on eclipse RCP Product and in my product I want to remove some unnecessary menu items. Say I want to remove the New option from the file menu. How do I do it programatically. I want to write a code in the activator(or somewhere else) that removes those menu items which I don't want.
Re: Removing Some menu items programatically [message #924072 is a reply to message #923951] Wed, 26 September 2012 09:26 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 596
Registered: December 2010
Senior Member

3.x rcp app or e4?
Re: Removing Some menu items programatically [message #924077 is a reply to message #923951] Wed, 26 September 2012 09:30 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5210
Registered: July 2009
Senior Member
It's not clear if you talk about an e4 RCP or one that runs on compat
layer!.

In e4 RCP you contribute a Processor and walk through the
Application-Model and set MenuItems to toBeRenderer=false

Tom

Am 26.09.12 12:39, schrieb Nagesh Bansal:
> Hi
> I am working on eclipse RCP Product and in my product I want to remove
> some unnecessary menu items. Say I want to remove the New option from
> the file menu. How do I do it programatically. I want to write a code in
> the activator(or somewhere else) that removes those menu items which I
> don't want.
>
Re: Removing Some menu items programatically [message #924260 is a reply to message #924077] Wed, 26 September 2012 13:13 Go to previous message
Nagesh Bansal is currently offline Nagesh Bansal
Messages: 21
Registered: September 2012
Junior Member
I am talking for one that runs through compatibility layer. Currently what I am doing is I am specifying the actionsetid say "org.eclipse.cheatsheet.actionset".
I go through all the actionsets available and then when the id match is found I remove it. doing so I am able to remove it but is there any other way. Besides some exceptions are generated by doing so. And checking this way for each actionset is time consuming.
Is there any other way besides the actionset way?

Previous Topic:How to forestall the window closing
Next Topic:Handler executes on rcp launch
Goto Forum:
  


Current Time: Tue Jul 22 05:27:50 EDT 2014

Powered by FUDForum. Page generated in 0.07068 seconds