Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Any way to conditionally show an IOp menu entry?

Hi there are properties taht can be defined and the IOp is enabled only if the property is true. The extension point is net.refractions.udig.ui.objectProperty. There are examples of the extension definition in net.refractions.udig.project.ui and the split line operation is an example of an operation using the properties in net.refractions.udig.tool.edit.

jesse

On 11-Dec-08, at 8:56 PM, Stephen Kilburn wrote:

In my application I have some IOps for Layers I want to be available only to
administrative users.

Login is handled in my override of UDIGApplication.checkLogin(), so I don't
know if the user is an administrator until after this happens.

The IOps are defined in plugin.xml as extensions to
net.refractions.udig.ui.operation. Right now, I'm just checking for user level in op() and displaying a message if the user doesn't pass muster. However, it would be better if I could make the operation disappear from the
menu altogether (or at least gray out) based on a condition.

Is there a way to do this programmatically?
_____________________________________________________________
Stephen Kilburn, GeoPraxis Inc.


_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel



Back to the top