Hey guys I'd like to deal with persisted data in order to save my Application Status before quitting. Well in order to give it a try I created a dirtyable object in an MPART then added a saving handler linked to a menu entry.
Here it's the MPART:
private Map<String, String> persistedState;
@PostConstruct
public void createComposite(Composite parent) {
persistedState = part.getPersistedState();
----
@Persist
public void save() {
dirty.setDirty(false);
persistedState.put("1", "myvalue");
part.getPersistedState().putAll(persistedState);
}
Then I removed the -clearPersistedState tag from the VM args.
Well the data persistence works like a charm if I close the MPart and reopen it again but it fails when I quit the application and relaunch it. In the latter case it's like the persistenceState is erased anyway.
Thanks
[Updated on: Thu, 18 December 2014 06:45] by Moderator