Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » HiddenToolBarItem
HiddenToolBarItem [message #1077142] Thu, 01 August 2013 05:41 Go to next message
Sir Wayne is currently offline Sir Wayne
Messages: 206
Registered: July 2009
Senior Member
Hello,

how can i hide a menue or a toolbaritem?
The plugin.xml way doens't work for all items.

e.g. Menue Design (WST)

		
		<hiddenToolBarItem id="org.eclipse.wst.xml.ui.disable.grammar.constraints"/>
		<hiddenToolBarItem id="org.eclipse.wst.xml.ui.perspective.NewFileToolBar"/>
  <hiddenMenuItem
        id="org.eclipse.wst.xml.ui.designMenuId">
  </hiddenMenuItem>
      </perspectiveExtension>
  • Attachment: menueWst.png
    (Size: 1.89KB, Downloaded 47 times)
Re: HiddenToolBarItem [message #1080164 is a reply to message #1077142] Mon, 05 August 2013 10:54 Go to previous messageGo to next message
Joseph Carroll is currently offline Joseph Carroll
Messages: 174
Registered: May 2012
Location: Milwaukee, WI
Senior Member

I am assuming you are trying to do this in E4. The best way to accomplish this is throguh an addon.

It would look something like:

public class MenuItemManager {

    @Inject
    IEclipseContext eclipseContext;

    @Inject
    MMenuItem myMenuItem

    @PostConstruct
    private void init() {
    
        // Here you would register some kind of event listener that programmatically 
        // activates/deactivates the menu/toolbar items
    }
}


While many of the extension points do not work with E4, that is one of the core objectives for Luna (4.4). [1]

HTH

JD

[1] http://wiki.eclipse.org/Platform_UI/Plan/4.4#Exposing_Eclipse4_in_the_Workbench
Re: HiddenToolBarItem [message #1080184 is a reply to message #1080164] Mon, 05 August 2013 11:29 Go to previous message
Sir Wayne is currently offline Sir Wayne
Messages: 206
Registered: July 2009
Senior Member
But some items hidden with extension points and some not. That's confusing
Previous Topic:IMenueService and CoolbarManager
Next Topic:Creation help in eclipse 4
Goto Forum:
  


Current Time: Fri Aug 01 18:44:45 EDT 2014

Powered by FUDForum. Page generated in 0.02895 seconds