Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Enablement of contributed actions
Enablement of contributed actions [message #333602] Thu, 18 December 2008 10:17 Go to next message
Alexander Weickmann is currently offline Alexander WeickmannFriend
Messages: 33
Registered: July 2009
Member
Hi

My plugin will contribute actions to toolbars and popup menus. These
actions should only be enabled if there is a file called domain-model.uml
in the project that is selected or indirectly selected trough the selected
resource.

Is it possible to achieve this somehow trough the extension point
mechanism?

Thanks for any answers.
Re: Enablement of contributed actions [message #333622 is a reply to message #333602] Thu, 18 December 2008 15:34 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

If it has to be in a known location, you can check for it relatively
easily. If it can be anywhere in the project, that's too costly to
search for during a visible or enabled check in a menu.

You can do this kinds of checking with actions or action extensions
(like actionSets) and IActionFilter, or with commands/handlers and
enabledWhen (core expressions).

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Previous Topic:Mark stack frame in Debugger
Next Topic:Inconsistent behaviour in TextEditor
Goto Forum:
  


Current Time: Thu Mar 28 10:11:44 GMT 2024

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

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

Back to the top