|
|
|
Re: Settings folder [message #47344 is a reply to message #47299] |
Tue, 17 February 2009 16:12 |
Eclipse User |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
On 2/17/2009 5:27 AM, David Newcomb wrote:
> Thanks for your reply. Although your blog is very pretty it doesn't
> answer my question. Maybe I should rephrase my question.
>
> I am a plugin developer, which is why I'm posting questions in the
> plugin developer newsgroup.
>
> I would like to alter an existing plugin's code so that it places it's
> properties in the settings folder. How?
Basically, you can just read/write Properties to an IFile (named of your
choosing) in an IFolder named ".settings" in an IProject. There is
nothing special about it, AFAIK.
For an example, you can see how we do it in a utility class:
https://www.skywayperspectives.org/fisheye/browse/~raw,r=MAI N/CVS_OpenSource/skyway/common/plugins/org.skyway.core/src/o rg/skyway/core/SkywaySettings.java
In particular, look at the methods getSettings(), getSettingsFile(), and
saveSettings().
I'm not happy about the use of the internal class
org.eclipse.core.internal.preferences.EclipsePreferences so if you do
find an API way of doing this please let me know.
Hope this helps,
Eric
|
|
|
|
|
Re: Settings folder [message #592102 is a reply to message #47299] |
Tue, 17 February 2009 16:12 |
Eric Rizzo Messages: 3070 Registered: July 2009 |
Senior Member |
|
|
On 2/17/2009 5:27 AM, David Newcomb wrote:
> Thanks for your reply. Although your blog is very pretty it doesn't
> answer my question. Maybe I should rephrase my question.
>
> I am a plugin developer, which is why I'm posting questions in the
> plugin developer newsgroup.
>
> I would like to alter an existing plugin's code so that it places it's
> properties in the settings folder. How?
Basically, you can just read/write Properties to an IFile (named of your
choosing) in an IFolder named ".settings" in an IProject. There is
nothing special about it, AFAIK.
For an example, you can see how we do it in a utility class:
https://www.skywayperspectives.org/fisheye/browse/~raw,r=MAI N/CVS_OpenSource/skyway/common/plugins/org.skyway.core/src/o rg/skyway/core/SkywaySettings.java
In particular, look at the methods getSettings(), getSettingsFile(), and
saveSettings().
I'm not happy about the use of the internal class
org.eclipse.core.internal.preferences.EclipsePreferences so if you do
find an API way of doing this please let me know.
Hope this helps,
Eric
|
|
|
Powered by
FUDForum. Page generated in 0.04647 seconds