Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Settings folder
Settings folder [message #46859] Fri, 13 February 2009 16:20 Go to next message
David Newcomb is currently offline David NewcombFriend
Messages: 4
Registered: July 2009
Junior Member
I am playing with the JiBX plugin which currently places its properties in
the project properties. The project properties are held in the .metadata
folder of your workspace which is utterly useless if you are trying to run
from a source controller.

I would like to place these properties in the project settings folder so
that they can be checked-in with the rest of the project.

Unfortunately after almost 2 weeks of searching I can't find a scrap of
information on how to do this.

I thought that I could have a Windows->Preference->JiBX which held the
defaults and then a "Configure Project Specific Settings..." for each
project, but can't find out if this actually produces files in the
settings folder.

Is there anyone out there who can point me in the right direction and/or
explain how other people have done this?

Many Thanks,
David.
Re: Settings folder [message #46920 is a reply to message #46859] Fri, 13 February 2009 19:33 Go to previous messageGo to next message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
David Newcomb wrote:
> I thought that I could have a Windows->Preference->JiBX which held the
> defaults and then a "Configure Project Specific Settings..." for each
> project, but can't find out if this actually produces files in the
> settings folder.
>
> Is there anyone out there who can point me in the right direction and/or
> explain how other people have done this?

I blogged about this while ago... it should be as simple as right
clicking your project and finding project-level settings for various
things. Not everything will have a project-level setting, it depends if
they allow it or not.

http://eclipsesource.com/blogs/2008/09/09/tip-project-level- settings/

I hope this helps.

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/caniszczyk | http://twitter.com/eclipsesource
Re: Settings folder [message #47299 is a reply to message #46920] Tue, 17 February 2009 10:27 Go to previous messageGo to next message
David Newcomb is currently offline David NewcombFriend
Messages: 4
Registered: July 2009
Junior Member
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?

Please refer to original post for full question.
Re: Settings folder [message #47344 is a reply to message #47299] Tue, 17 February 2009 16:12 Go to previous message
Eclipse UserFriend
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 #591977 is a reply to message #46859] Fri, 13 February 2009 19:33 Go to previous message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
David Newcomb wrote:
> I thought that I could have a Windows->Preference->JiBX which held the
> defaults and then a "Configure Project Specific Settings..." for each
> project, but can't find out if this actually produces files in the
> settings folder.
>
> Is there anyone out there who can point me in the right direction and/or
> explain how other people have done this?

I blogged about this while ago... it should be as simple as right
clicking your project and finding project-level settings for various
things. Not everything will have a project-level setting, it depends if
they allow it or not.

http://eclipsesource.com/blogs/2008/09/09/tip-project-level- settings/

I hope this helps.

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/caniszczyk | http://twitter.com/eclipsesource
Re: Settings folder [message #592081 is a reply to message #46920] Tue, 17 February 2009 10:27 Go to previous message
David Newcomb is currently offline David NewcombFriend
Messages: 4
Registered: July 2009
Junior Member
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?

Please refer to original post for full question.
Re: Settings folder [message #592102 is a reply to message #47299] Tue, 17 February 2009 16:12 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
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
Previous Topic:cyclic dependecy error while exporting as features
Next Topic:IAE in Completion Proposal ("Signature.appendTypeSignature()"
Goto Forum:
  


Current Time: Thu Mar 28 13:41:37 GMT 2024

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

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

Back to the top