| I 
am having a similar problem, I tried to instantiate an ILayerListener in my 
plugin and tried to trap the selection event with the following 
statement:
if(event.getType()==LayerEvent.EventType.FILTER) But, when 
selecting a feature, the listener code never seems to be executing.  Is 
there anything else I need to do to plug the listener into uDig so it picks up 
the selection event?  Or is there any sample code out there that listens 
for selection tool events? thanks! -Mike Hi,
 
 The selection listener API hasn't been fully integrated with the rest of 
the platform yet.  So you have to use ILayerListeners and listen for Filter 
events.  When something is selected the filter that represents that 
selection is set on the layer where the selection occurred.  That layer is 
typically the currently selected layer so you can either listen to all layers or 
have a IEditManagerListener that listens to layer selection events and retargets 
your listener each time the selected layer changes. 
 Jesse 
 
On Jul 25, 2007, at 3:17 AM, Robineau Peter wrote: 
  Hi,   is there a way to track selection of 
  features in a layer? I want to do 
  some operations in a plugin when a new feature is 
  selected...   Is there an 
  easy-to-handle listener comparable with the ShellListener? Just found 
  SelectionListener (okay, sounds good...),  but don't 
  know how to handle it properly....      thanks a 
  lot,   Peter     _______________________________________________ User-friendly Desktop Internet GIS (uDig) |