need help with external settings provider [message #229038] |
Tue, 20 January 2009 08:28  |
Eclipse User |
|
|
|
hi,
as stated in a thread somewhere below, I want to extend the information
stored in a run configuration. while googling I stumbled upon the
externalsettingsprovider.
unfortunately this function seems to be undocumented, and there don't seem
to be any examples in google.
so I chose to test it myself, but I'm afraid I'm stuck and I hope somebody
can help me...
I want to store three extra Strings in the configuration.
that's what I did so far:
1.) added the extension org.eclipse.cdt.core.externalSettingsProvider in
my plugin file.
2.) created a class that extends the existing class
CExternalSettingProvider
I have to overwrite the function
public CExternalSetting[] getSettings(IProject arg0,
ICConfigurationDescription arg1).
I can get the external settings via arg1.getExternalSettings();
but how can I access the three strings I want to store, and - more
important even - how do I get them into the external settings?
There is no setExternalSettings, there's only a createExternalSettings().
Or do I have to write an extra class that implements ICExternalSetting?
I'm really stuck here and I have to get this plugin to work, so any help
would be appreciated, because it seems impossible to me to find out how to
do it without any documentation or examples! Please, if you know anything
useful about how to use the external settings provider, take a little time
to write back some lines...
thx
sth_Weird
|
|
|
|
Re: need help with external settings provider [message #229381 is a reply to message #229092] |
Mon, 26 January 2009 11:24  |
Eclipse User |
|
|
|
hi & thanx for the reply (both here and in the bugs list).
I've already seen the post you're refering to (that's why I filed a
bug...you suggested it at the end of the post (I'm not the original poster
but it seemed like he/she didn't do it so I did because I was facing the
same problem)!). The problem is, I got as far as the thread explained
myself (adding the extension and extending from the
CExternalSettingsProvider class)
What I miss is the part that explains how to go on, like what do I put in
the getSettings() function and, more important, can I save the external
settings after changing and if yes how?
right now all I have is this empty function
@Override
public CExternalSetting[] getSettings(IProject pro,
ICConfigurationDescription cfg)
{
// ???
// what do I do here?
}
and I added a function
public void setSettings(IProject pro, ICConfigurationDescription cfg,
CExternalSetting[] setting)
{
// ???
// how do I modify the external settings?
}
what I want to do is store a boolean value and a path with the
configuration, and read it back. I don't want to overwrite any includes or
other things, I want to add a new "category" in the configuration (-> with
category I mean something like "ICSettingEntry.Macros").
I thought the best way to do this is to define an external settings
provider.
But I have no clue how to go on now that I have extended the
CExternalSettingsProvider class.
Any advice? Maybe you know of an example plugin that already uses this
feature. I couldn't find one I'm afraid
thx
sth_Weird
|
|
|
Powered by
FUDForum. Page generated in 0.02272 seconds