Ok, but how do I know when the application is being shutdown (so I know when to save)? Is there a listener I can implement?

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jesse Eichar
Sent: Thursday, July 20, 2006 6:00 PM
To: User-friendly Desktop Internet GIS
Subject: Re: [udig-devel] plugin persistence

 

Most UI plugins have a PropertyStore that you can use.  For example:

ProjectUIPlugin.getDefault().getPropertyStore().  

 

I use those quite often since we don't include the Resources plugin with uDig.

 

Jesse

 

On 20-Jul-06, at 3:01 PM, Lewis H. Fishgold wrote:



Hi, I am trying to make my plugin implement persistence across application shutdowns. Typically, you do this by having your plugin implement ISaveParticipant and register itself as a save participant using

ISavedState lastState = ResourcesPlugin.getWorkspace().addSaveParticipant(plugin,this);

 

In order for the save method of the ISaveParticipant to be called at exit (to save the plugin’s state), the application’s WorkbenchAdvisor (UDIGWorkbenchAdvisor in this case) must override

preShutdown() and call ResourcesPlugin.getWorkspace().save(true,new NullProgressMonitor());

 

UDIGWorkbenchAdvisor currently does not do this. Can someone do this for me, or is there some other way to implement persistence?

 

Thank you.

Lewis

 

_______________________________________________

User-friendly Desktop Internet GIS (uDig)

 

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to