Can I ask why you want to do this? It will help me figure out how we should fix 
it … normally the tools are "driving" the application (you know registering 
listeners, changing the cursor, proving a context menu, taking over the 
selection the map advertises, etc…)

if we are forced to listen to the tools enable and disable then perhaps you 
have discovered a new responsibility for the tools?

So yes please tell me more :-)

If ToolLifecycleListener is expected to be called then we should be able to 
make a fix; perhaps you could check in ToolManager with a debugger and spot 
where we should fire the event from?  

--  
Jody Garnett


On Monday, 16 April 2012 at 11:41 PM, omur yavuz wrote:

> I've read my previous mail again and its slipshod, apoligies.
>  
> I want to catch whenever active modal tool changes , smth like
>  
> ApplicationGIS.getToolManager().addChangeListener(IToolChangeListener);
> IToolChangeListener {
> activeToolChanged(Event evt) ;
> }
>  
> Looks like there is no implementation like this. so i tried to listen 
> specific tools lifecycle ;
>  
> ApplicationGIS.getToolManager().findTool("......polygonEdit").addListener(new 
> ToolLifecycleListener(){
>  
> public void changed(ToolLifecycleEvent event) {
> // TODO Auto-generated method stub
> bla bla bla
> }
> })
>  
> but changed method is not being called when edit tool activated or 
> deactivated.
>  
> can you give me an advice plz :)
>  
> On Apr 16, 2012, at 4:22 PM, omur yavuz wrote:
>  
> > I ve got a problem with modal tools :). i want to listen modal tool 
> > selection change and activate my viewport based selection of the tool. For 
> > example  
> > i ll make myviewpart only polygon tool and line tool selected . i tried 
> > several methods to do ;
> >  
> > 1) Listening Balackboard : its working to listen edit state , i can catch 
> > starting editing but can't handle switching to another tool like zoom  
> > 2) listening tool lifecycle : added IToolLifecycleListener , workbench 
> > didn't call change event after i clicked tool.
> >  
> > can you give me an advice ?
>  
> _______________________________________________
> 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

Reply via email to