Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Persisting the Eclipse Application?
Persisting the Eclipse Application? [message #1008453] Tue, 12 February 2013 14:57 Go to next message
Alex Kipling is currently offline Alex KiplingFriend
Messages: 260
Registered: July 2012
Senior Member
We would like to persist our Eclipse Application and are looking for the best appraoach for it.

Questions:

- e4 does persist the Windows size / positions. Where are those informations stored?
Can we extend the mechanism, hwich is used by Eclipse to store our own information?

- is it posible to persist / serialize an IEclipseContext object with it#s subContext objects?
Re: Persisting the Eclipse Application? [message #1008491 is a reply to message #1008453] Tue, 12 February 2013 17:36 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Am 12.02.13 15:57, schrieb Alex Kipling:
> We would like to persist our Eclipse Application and are looking for the
> best appraoach for it.
>
> Questions:
>
> - e4 does persist the Windows size / positions. Where are those
> informations stored?
> Can we extend the mechanism, hwich is used by Eclipse to store our own
> information?

You can customize loading/saveing the workbench state, what do you want
to save? You can store states in model-objects persistedState-Property.

>
> - is it posible to persist / serialize an IEclipseContext object with
> it#s subContext objects?
>

No you can not persist a context, what you can persists are string
informations into MContext#properties that's all.

Tom
Re: Persisting the Eclipse Application? [message #1008526 is a reply to message #1008491] Tue, 12 February 2013 20:39 Go to previous messageGo to next message
Alex Kipling is currently offline Alex KiplingFriend
Messages: 260
Registered: July 2012
Senior Member
Thnx Thomas, setting persisten state on model elements, as described here: http://www.vogella.com/articles/EclipseRCP/article.html#supplementary_persistence
was a really useful buzzword, thnx Tom.

What I would like to do is saving a bunch of attributes, for every part. (Integer, maybe Serializables)

These attributes I would like to save in a DB,
so I thought about using Eclipse's persistency mechanism, and implementing it's interfaces.

Do you know which mechanism is responsible for persisting a model on application stop?
Where do I have too hook in, in order to change the save location from Eclipse's native location to my DB?
Re: Persisting the Eclipse Application? [message #1008535 is a reply to message #1008526] Tue, 12 February 2013 21:53 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

When it comes to loading/saveing I'd suggest to you serialize your stuff
e.g. as XML and use JAXB to bind it to a bean.

The model loading/saveing is done through the IModelResourceHandler you
can force the framework to use your custom one by passing something like
-modelResourceHandler bundleclass://my.bundle/my.ResourceHandler.

Tom

Am 12.02.13 21:39, schrieb Alex Kipling:
> Thnx Thomas, setting persisten state on model elements, as described
> here:
> http://www.vogella.com/articles/EclipseRCP/article.html#supplementary_persistence
>
> was a really useful buzzword, thnx Tom.
>
> What I would like to do is saving a bunch of attributes, for every part.
> (Integer, maybe Serializables)
>
> These attributes I would like to save in a DB,
> so I thought about using Eclipse's persistency mechanism, and
> implementing it's interfaces.
>
> Do you know which mechanism is responsible for persisting a model on
> application stop?
> Where do I have too hook in, in order to change the save location from
> Eclipse's native location to my DB?
Re: Persisting the Eclipse Application? [message #1008583 is a reply to message #1008535] Wed, 13 February 2013 08:09 Go to previous message
Alex Kipling is currently offline Alex KiplingFriend
Messages: 260
Registered: July 2012
Senior Member
Thank you Thomas!
Using IModelResourceHandler looks as exactly that thing I was looking for!
Previous Topic:e4 opening parts
Next Topic:Beautiful Menu in e4?
Goto Forum:
  


Current Time: Thu Mar 28 09:54:50 GMT 2024

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

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

Back to the top