Skip to main content


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 10:39 Go to next message
Nagesh Bansal is currently offline Nagesh BansalFriend
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 13:26 Go to previous messageGo to next message
Eclipse UserFriend
3.x rcp app or e4?
Re: Removing Some menu items programatically [message #924077 is a reply to message #923951] Wed, 26 September 2012 13:30 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
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 17:13 Go to previous message
Nagesh Bansal is currently offline Nagesh BansalFriend
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: Thu Apr 18 05:24:00 GMT 2024

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

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

Back to the top