Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » persist state of navigation history on re opening of tool(persist state of navigation history )
persist state of navigation history on re opening of tool [message #1269242] Tue, 11 March 2014 15:25 Go to next message
manu m is currently offline manu mFriend
Messages: 19
Registered: February 2014
Junior Member
We make use of navigation history in our application. On close and re opening of Our rcp tool I want navigation history to be persisted. How can I do it in eclipse way.we are using Kepler.

Is there any save and restore method. If yes,what has to has be saved in memento. I don't want to use custom memento I want to use workbench.xmi
Re: persist state of navigation history on re opening of tool [message #1270245 is a reply to message #1269242] Wed, 12 March 2014 18:42 Go to previous messageGo to next message
Erika Redmark is currently offline Erika RedmarkFriend
Messages: 22
Registered: January 2013
Junior Member
At first, persistence of data in Eclipse jumps me to Preferences, but it sounds like you want a more complex object to be saved, and Preferences are for small information.

I don't know if this is specifically what you want, but you use Platform.getStateLocation(Bundle) to get a good place in the file-system to store your navigation history for your plugin, and then use your own save file format for storing the history. By the way, there are plenty of libraries out there that work better than serialisation for persistence; I personally found ease of use with Protocol Buffers.

Let me know if this helps.
Re: persist state of navigation history on re opening of tool [message #1270401 is a reply to message #1270245] Thu, 13 March 2014 00:21 Go to previous messageGo to next message
manu m is currently offline manu mFriend
Messages: 19
Registered: February 2014
Junior Member
Hi,

Thanks for the reply. I would not Like to use custom files but make use of memento here.
Which works for view and editors. How could I make use of memento something like save and restore
I am using Kepler eclipse 4.3 version
Re: persist state of navigation history on re opening of tool [message #1270842 is a reply to message #1270401] Thu, 13 March 2014 16:15 Go to previous message
Erika Redmark is currently offline Erika RedmarkFriend
Messages: 22
Registered: January 2013
Junior Member
I know of no 'Memento' class/object/concept specific to Eclipse. When you said Memento I figured you implemented the general design pattern where you save the state of some system so it can be recovered later (which is up to you how to implement), and you wanted to persist a memento, you could use a custom file for. The closest Eclipse support I can give you is the previous answer where you can access a proper location on the file-system to store any information you want, which to me seems better and more flexible anyway.

Basically, I'm not sure I understand really what you're asking, and since I work on a plugin for Eclipse Helios and above I don't know anything specific about Eclipse 4.x API, nor do I really know much about Eclipse 3.x API beyond what I have worked with. Sorry I can't help you further.

[Updated on: Thu, 13 March 2014 16:17]

Report message to a moderator

Previous Topic:Icon not appearing for 'new file' wizard despite being proper
Next Topic:Valid manifest file to create ant build file
Goto Forum:
  


Current Time: Fri Apr 19 11:23:55 GMT 2024

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

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

Back to the top