Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to Add menu contribution when an specific editor is active - using org.eclipse.ui.menus
How to Add menu contribution when an specific editor is active - using org.eclipse.ui.menus [message #337029] Wed, 22 July 2009 09:46 Go to next message
Eclipse UserFriend
Originally posted by: lennart.x.akobson.analogix.com

Hi all,

I need to add a sub menu into the existing File menu in the Main menu when
when at least one instance of my editor is open. I have
found that should be possible to do programmaticly using the
contributorClass in the org.eclipse.ui.edtors extension point schema.
But I have also found that org.eclipse.ui.menus can do sort of this, but
I',m not sure how to set this up.

The scenario is as follows: When an instance of a specic editor is active
there should be an additional sub menu available in
the File Menu meny. This sub menu should have a couple of menu entries.

Can anyone share how to do this?

BR

L
Re: How to Add menu contribution when an specific editor is active - using org.eclipse.ui.menus [message #452948 is a reply to message #337029] Sat, 01 August 2009 14:35 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

You use a visibleWhen on your menu contribution commands from org.ecilpse.ui.menus.

<with variable="activeEditorId"><equals value="your.editor.id"/></with>

PW


Previous Topic:Select command handler based on where it's triggered from?
Next Topic:CVS history display branch names
Goto Forum:
  


Current Time: Thu Nov 07 16:29:36 GMT 2024

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

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

Back to the top