[udig-devel] objectProperty
Ingmar Eveslage
eveslage at gmail.com
Sat May 3 16:17:44 PDT 2008
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
More information about the udig-devel
mailing list