AW: [udig-devel] objectProperty

Ingmar Eveslage eveslage at gmail.com
Mon May 5 10:20:18 PDT 2008


Hello Dirk, hello Jesse,

thanks. This works. realy a bit confusing, but it worked.

Can you explain me, what the target class is? or exactly which objects  
gets evaluated against the property class?

i tried, java.lang.Object and net.refractions.udig.project.ILayer. The  
second i copied from the udig project. it works realy good, but who  
managed the objects which are put in the

public boolean isTrue(ILayer object, String value)

function?

  <object
             targetClass="java.lang.Object">
          <property
                 
class="de.hub.sam.es.managementclient.tool.StationProperty"
                id="isStationProperty">
          </property>
       </object>
       <object
             targetClass="net.refractions.udig.project.ILayer">
          <property
                 
class="de.hub.sam.es.managementclient.tool.LayerFeatureTypeProperty"
                id="LayerFeatureTypeProperty">
          </property>
       </object>

thanks for explaining.

greats ingmar

Am 05.05.2008 um 12:03 schrieb Starke, Dirk:

> 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
> _______________________________________________
> 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