Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Question about extension-point org.eclipse.ui ViewActions
Question about extension-point org.eclipse.ui ViewActions [message #331902] Sat, 27 September 2008 16:25 Go to next message
Eclipse UserFriend
Originally posted by: martin.ohlsson.netplus.se

Hi,

The ViewActions exention has serveral different options to control when the
action is enabled or not.
I have a need for a more advanced option for enablement that I cannot find.

I'm thinking in terms of registering a callback method like
public boolean enable (Object anyObject) and
public boolean enable (Object[] anyObject)

In both the cases it would be up to the implementer of the callback method
to all typecasting etc. and
to return just true or false.

The reason that I can not used the standard object instance is that all the
selected items is the same EMF model.
Just by invoking the getType method it is possible to actually find out if
the object is of correct type.

Perhaps this is possible somehow?

BR

M
Re: Question about extension-point org.eclipse.ui ViewActions [message #332007 is a reply to message #331902] Wed, 01 October 2008 13:38 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

org.eclipse.ui.commands/handlers/menus has the more expressive core
expression syntax for determining active/enabled/visible.

viewActions has the older platform expression language, although if you
can provide an IActionFilter for your selection you can call out to code.

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:unable to uninstall plugin with p2
Next Topic:Default configuration for dev environment
Goto Forum:
  


Current Time: Fri Sep 27 07:17:15 GMT 2024

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

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

Back to the top