[udig-devel] objectProperty
Jesse Eichar
jeichar.w at gmail.com
Mon May 5 04:15:39 PDT 2008
I suspect you have to include the plugin id of the property:
> <enablement>
> <property
> expectedValue="StationFeatureType"
> propertyId="plugin.id.isStationProperty">
> </property>
> </enablement>
replace plugin.id. with the id of your plugin... Hopefully that will
work
I know it is confusing but the plugin id is required essentially for
insulating the property against similarily named properties defined in
other plugins.
Jesse
On 4-May-08, at 1:17 AM, Ingmar Eveslage wrote:
> Hello,
>
> first: i use the sdk rc14
>
> i try to implement a extension for
> net.refractions.udig.project.ui.tool. this should only be enabled if
> some conditions a true. so i tried to implement this.
>
> the plugin.xml:
>
> <extension
> point="net.refractions.udig.project.ui.tool">
> <actionTool
> class=".managementclient.tool.LeaderNodeAction"
> icon="icons/16x16/leader.png"
> id="managementclient.tool.LeaderNodeAction"
> name="LeaderSelection"
> onToolbar="true"
> tooltip="switch leader entity on/off">
> <enablement>
> <property
> expectedValue="StationFeatureType"
> propertyId="isStationProperty">
> </property>
> </enablement>
> </actionTool>
> </extension>
>
> <extension
> point="net.refractions.udig.ui.objectProperty">
> <object
> targetClass="java.lang.Object">
> <property
> class="managementclient.tool.StationProperty"
> id="isStationProperty">
> </property>
> </object>
> </extension>
>
> a very early implementation of the objectProperty interface:
>
> package managementclient.tool;
>
> import net.refractions.udig.project.ui.ApplicationGIS;
> import net.refractions.udig.ui.operations.AbstractPropertyValue;
> import net.refractions.udig.ui.operations.PropertyValue;
>
> @SuppressWarnings("unchecked")
> public class StationProperty extends AbstractPropertyValue implements
> PropertyValue {
>
> public StationProperty() {
> // TODO Auto-generated constructor stub
> }
>
> public boolean canCacheResult() {
> // TODO Auto-generated method stub
> return false;
> }
>
> public boolean isBlocking() {
> // TODO Auto-generated method stub
> return false;
> }
>
> public boolean isTrue(Object object, String value) {
> if (ApplicationGIS.getActiveMap()==ApplicationGIS.NO_MAP)
> return false;
> return true;
> }
> }
>
> The problem is: when i start i get this error message and the tool
> is always on:
>
> !ENTRY net.refractions.udig.ui 1 0 2008-05-04 01:09:31.152
> !MESSAGE PropertyParser: Parsing PropertyValue, desired Propert:
> isStationProperty not found. Referenced in plugin: managementclient
>
> what is going wrong? i hope somebody has an idea.
>
> Thanks forward
>
> Ingmar
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.refractions.net/pipermail/udig-devel/attachments/20080505/bf8d693d/attachment.html
More information about the udig-devel
mailing list