Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Data Persistence(Saving Workspace status issue)
Data Persistence [message #1515804] Thu, 18 December 2014 11:42
Giovanni J is currently offline Giovanni JFriend
Messages: 15
Registered: November 2014
Junior Member
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 11:45]

Report message to a moderator

Previous Topic:Display popup menu in MPart
Next Topic:Launch an E4 app without simpleconfigurator
Goto Forum:
  


Current Time: Thu Sep 21 07:00:41 GMT 2017

Powered by FUDForum. Page generated in 0.44372 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software