Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Enable/Disable a Menu Element in a Processor(Is it possible to enable/disable a menu command label in a Processor)
Enable/Disable a Menu Element in a Processor [message #756495] Mon, 14 November 2011 02:42 Go to next message
St Clair Clarke is currently offline St Clair ClarkeFriend
Messages: 118
Registered: March 2010
Senior Member
Hello,

I am learning how to use an E4AP Processor with the two tutorials:
1. http://www.vogella.de/articles/EclipseE4/article.html#contribute_processors
2. http://www.toedter.com/blog/?p=154

I have an Admin menu command that I would like to enable/disable if someone logs onto the database, but IS NOT authenticated as an admin role.

I know how to make the Admin command label visible/invisible, BUT I would rather disable/enable it instead.

There is no such mechanism in any of the *Element classes I have seen in E4AP.

How can I do this?

If such a enable/disable and element does not exist, would it be possible for the team to implement one?

Thanks
Re: Enable/Disable a Menu Element in a Processor [message #756640 is a reply to message #756495] Mon, 14 November 2011 14:49 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Your handler should implement a @CanExecute method that could check if the user is logged in and has the admin role. You would probably want to have that information cached in a manager, so the @CanExecute check is quick and the manager deals with the database.

PW


Previous Topic:Starting birt from e4 application
Next Topic:e4 closes with EXCEPTION_ACCESS_VIOLATION
Goto Forum:
  


Current Time: Thu Apr 25 01:52:51 GMT 2024

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

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

Back to the top