Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » HiddenToolBarItem
HiddenToolBarItem [message #1077142] Thu, 01 August 2013 09:41 Go to next message
Dennis Melzer is currently offline Dennis MelzerFriend
Messages: 244
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 192 times)
Re: HiddenToolBarItem [message #1080164 is a reply to message #1077142] Mon, 05 August 2013 14:54 Go to previous messageGo to next message
Joseph Carroll is currently offline Joseph CarrollFriend
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 15:29 Go to previous message
Dennis Melzer is currently offline Dennis MelzerFriend
Messages: 244
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 Apr 26 11:46:31 GMT 2024

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

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

Back to the top