[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform] Re: Workspace save participation
|
I also use Workspace save participation and referred to the same article.
Why your saveParticipant is not getting called inspite of registering it
with the workspace initially probably might depend on your implementation of
the "saving" method of the class ISavedParticipant. Maybe you could post
that part here and someone could help you better.
Rahul
"Lars Vogel" <Lars.Vogel@xxxxxxxxx> wrote in message
news:g1c1uc$9bv$1@xxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I tried to follow the Eclipse Help for participating with a RCP
> application in the workbench saving.
>
> http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/resAdv_saving.htmIn
> my RCP application I adjusted the start method in the class Activator
> (please see below for the coding). Here I register the
> classMyWorkspaceSaveParticipant. I checked the class SaveManager and can
> see thatit is registered.But during shutdown the saving method in
> MyWorkspaceSaveParticipant is notcalled.Do I have to do do something else,
> e.g. set the changed status of my pluginsomewhere?Best regards, Larspublic
> void start(BundleContext context) throws Exception
> {super.start(context);plugin = this;saveParticipant = new
> MyWorkspaceSaveParticipant(plugin);ISavedState lastState =
> ResourcesPlugin.getWorkspace().addSaveParticipant(plugin,
> saveParticipant);if (lastState == null)return;IPath location =
> lastState.lookup(new Path("save"));if (location == null)return;// the
> plugin instance should read any important state from the file.File f =
> getStateLocation().append(location).toFile();readStateFrom(f);}
>