Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » Data Persistence(Saving Workspace status issue)
Data Persistence [message #1515804] Thu, 18 December 2014 06:42
Eclipse UserFriend
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

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


Current Time: Sun Jul 06 06:53:05 EDT 2025

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

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

Back to the top