Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How to save information between the sessions of Eclipse?
How to save information between the sessions of Eclipse? [message #17954] Wed, 27 August 2008 11:26 Go to next message
Drug Vignera is currently offline Drug VigneraFriend
Messages: 21
Registered: July 2009
Junior Member
Good day! I've developed plugin. Now I want to save some data between the
sessions of Eclipse (for example, a String or int variable). How to do
this in a proper way?
Thanks.
Re: How to save information between the sessions of Eclipse? [message #18023 is a reply to message #17954] Thu, 28 August 2008 06:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: prashanto.chatterjee.gmail.com

Have a look at the ISaveParticipant mechanism. There is a good deal of help
avaialable on that.
You may also want to read the article:
http://www.eclipse.org/articles/Article-Resource-deltas/reso urce-deltas.html

"Drug Vignera" <DrugVignera@mail.ru> wrote in message
news:81b157f17a2542fa29be51b72bd55c4b$1@www.eclipse.org...
> Good day! I've developed plugin. Now I want to save some data between the
> sessions of Eclipse (for example, a String or int variable). How to do
> this in a proper way?
> Thanks.
>
IMHO, this is not appropriate. [message #18034 is a reply to message #18023] Thu, 28 August 2008 14:12 Go to previous messageGo to next message
Drug Vignera is currently offline Drug VigneraFriend
Messages: 21
Registered: July 2009
Junior Member
I mean, where to save my data? Into eclipse/plugins/myfile.ini? Into
eclipse/plugins/myplugin/myfile.ini? Is there some common default place?
(For example, something like eclipse/configuration/config.ini or
workspace/.metadata/config.ini.)
When my plugin starts to work, it must read this data and then save new
one.
Re: How to save information between the sessions of Eclipse? [message #18047 is a reply to message #17954] Thu, 28 August 2008 16:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tom.seidel.spiritlink.de

See http://www.eclipse.org/articles/Article-Preferences/preferen ces.htm

Tom

Drug Vignera schrieb:
> Good day! I've developed plugin. Now I want to save some data between
> the sessions of Eclipse (for example, a String or int variable). How to
> do this in a proper way?
> Thanks.
>
>
Re: How to save information between the sessions of Eclipse? [message #18060 is a reply to message #17954] Thu, 28 August 2008 17:57 Go to previous messageGo to next message
Simon Archer is currently offline Simon ArcherFriend
Messages: 24
Registered: July 2009
Junior Member
OSGi allows a bundle to store data in its private data area, which is
accessed via the BundleContext API getDataFile(String). This approach is
nice since it keeps the data private to the bundle, and the data goes
away when you uninstall the bundle.

http://www.osgi.org/javadoc/r4/org/osgi/framework/BundleCont ext.html#getDataFile(java.lang.String)

Drug Vignera wrote:
> Good day! I've developed plugin. Now I want to save some data between
> the sessions of Eclipse (for example, a String or int variable). How to
> do this in a proper way?
> Thanks.
>
Re: How to save information between the sessions of Eclipse? [message #18767 is a reply to message #18047] Mon, 01 September 2008 12:09 Go to previous message
Drug Vignera is currently offline Drug VigneraFriend
Messages: 21
Registered: July 2009
Junior Member
Thanks.
The answer to my question is:
Activator.getDefault().getPreferenceStore().getString("my_key ");
...
Activator.getDefault().getPreferenceStore().setValue("my_key ", "my_value");
Re: How to save information between the sessions of Eclipse? [message #577608 is a reply to message #17954] Thu, 28 August 2008 06:28 Go to previous message
Eclipse UserFriend
Originally posted by: prashanto.chatterjee.gmail.com

Have a look at the ISaveParticipant mechanism. There is a good deal of help
avaialable on that.
You may also want to read the article:
http://www.eclipse.org/articles/Article-Resource-deltas/reso urce-deltas.html

"Drug Vignera" <DrugVignera@mail.ru> wrote in message
news:81b157f17a2542fa29be51b72bd55c4b$1@www.eclipse.org...
> Good day! I've developed plugin. Now I want to save some data between the
> sessions of Eclipse (for example, a String or int variable). How to do
> this in a proper way?
> Thanks.
>
IMHO, this is not appropriate. [message #577621 is a reply to message #18023] Thu, 28 August 2008 14:12 Go to previous message
Drug Vignera is currently offline Drug VigneraFriend
Messages: 21
Registered: July 2009
Junior Member
I mean, where to save my data? Into eclipse/plugins/myfile.ini? Into
eclipse/plugins/myplugin/myfile.ini? Is there some common default place?
(For example, something like eclipse/configuration/config.ini or
workspace/.metadata/config.ini.)
When my plugin starts to work, it must read this data and then save new
one.
Re: How to save information between the sessions of Eclipse? [message #577671 is a reply to message #17954] Thu, 28 August 2008 16:13 Go to previous message
Tom Seidel is currently offline Tom SeidelFriend
Messages: 91
Registered: July 2009
Member
See http://www.eclipse.org/articles/Article-Preferences/preferen ces.htm

Tom

Drug Vignera schrieb:
> Good day! I've developed plugin. Now I want to save some data between
> the sessions of Eclipse (for example, a String or int variable). How to
> do this in a proper way?
> Thanks.
>
>
Re: How to save information between the sessions of Eclipse? [message #577686 is a reply to message #17954] Thu, 28 August 2008 17:57 Go to previous message
Simon Archer is currently offline Simon ArcherFriend
Messages: 24
Registered: July 2009
Junior Member
OSGi allows a bundle to store data in its private data area, which is
accessed via the BundleContext API getDataFile(String). This approach is
nice since it keeps the data private to the bundle, and the data goes
away when you uninstall the bundle.

http://www.osgi.org/javadoc/r4/org/osgi/framework/BundleCont ext.html#getDataFile(java.lang.String)

Drug Vignera wrote:
> Good day! I've developed plugin. Now I want to save some data between
> the sessions of Eclipse (for example, a String or int variable). How to
> do this in a proper way?
> Thanks.
>
Re: How to save information between the sessions of Eclipse? [message #577959 is a reply to message #18047] Mon, 01 September 2008 12:09 Go to previous message
Drug Vignera is currently offline Drug VigneraFriend
Messages: 21
Registered: July 2009
Junior Member
Thanks.
The answer to my question is:
Activator.getDefault().getPreferenceStore().getString("my_key ");
...
Activator.getDefault().getPreferenceStore().setValue("my_key ", "my_value");
Previous Topic:Unwanted plugin/bundle getting deployed (jetty 1.1.0 ticked, jetty 2.0.0 NOT, both deployed)
Next Topic:Queries on Headless PDE Build
Goto Forum:
  


Current Time: Thu Apr 25 11:48:09 GMT 2024

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

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

Back to the top