AW: [udig-devel] objectProperty

Starke, Dirk Dirk.Starke at prodv.de
Mon May 5 03:03:18 PDT 2008


Hello Ingmar,

you have to reference your property including the full path of your plugin.

Example: Let's say your plugin's name is "my.udig.plugin", then (even when referencing a property declared in the same plugin) you have to write the following:

          ...
          <enablement>
             <property
                   expectedValue="StationFeatureType"
                   propertyId="my.udig.plugin.isStationProperty">
             </property>
          </enablement>
          ...

Regards,
   Dirk


-----Ursprüngliche Nachricht-----
Von: udig-devel-bounces at lists.refractions.net
[mailto:udig-devel-bounces at lists.refractions.net]Im Auftrag von Ingmar
Eveslage
Gesendet: Sonntag, 4. Mai 2008 01:18
An: User-friendly Desktop Internet GIS
Betreff: [udig-devel] objectProperty


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


More information about the udig-devel mailing list