Workspace storage, IMemento and UI dependencies [message #532238] |
Fri, 07 May 2010 16:08 |
Christophe Fondacci Messages: 95 Registered: July 2009 Location: Paris |
Member |
|
|
Hello,
I need to persist some custom data in the workspace.
I looked at the org.eclipse.debug.core plugin because I need pretty much the same thing as "debug configurations" for the same kind of needs and I like the way launch configurations are stored.
At the same time, I find that IMemento are a very convenient way for storing / retrieving object data and would like to take advantage of the XMLMemento implementation. At this place the debug plugin define a XML document itself.
My problem is that I would like to store this data from a non-UI plugin and the IMemento is in the org.eclipse.ui plugin...
So now I am wondering :
* Am i in the wrong direction and is there more convenient ways of doing this ?
* Why mementos are a UI-specific feature ?
* Is it UI specific to store information in the workspace ? Actually I say "workspace" but I'm locating the files inside the base directory obtained through :
Plugin.getDefault().getStateLocation()
I don't know if that always fall into the workspace (specially when running headless).
For now I split the UI logic from the non-UI logic into distinct plugins mostly for future needs when I will need to run my product headless and I would like to limit the incompatiblities... I do not have a working headless distribution so I don't know the limitations.
If anyone has information regarding this that would help me a lot,
Thank you,
Christophe
http://www.nextep-softwares.com
|
|
|
Powered by
FUDForum. Page generated in 0.02573 seconds