Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » getting a ComboFieldEditor's value from PreferencesStore
getting a ComboFieldEditor's value from PreferencesStore [message #37754] Tue, 16 December 2008 12:06
Robert Wloch is currently offline Robert WlochFriend
Messages: 109
Registered: July 2009
Senior Member
Hello everyone,

I'm not sure if this is the right place to ask, however the other news
groups seem to be even less likely the right places. ;-)

Does anyone know, how I can access the value of a ComboFieldEditor's
selected entry name?

In my MyPreferencePage class I add the ComboFieldEditor in the
createFieldEditors() method:
...
String[][] comboValues = {{"Name A", "org.example.ConnectorA"}};
// P_CONNECTOR = "connector"
addField(new ComboFieldEditor(MyPreferenceConstants.P_CONNECTOR,
"Connector",
comboValues, getFieldEditorParent()));
...

Setting the connector in the combo box to "Name A" this String gets stored
in the PreferenceStore, but not "org.example.ConnectorA" as I'd expect.

In another class of my plug-in I need to get the value of the name-value
pair I handed into the constructor of the ComboFieldEditor:
...
String value = Activator.getDefault().getPreferenceStore().getString(
MyPreferenceConstants.P_CONNECTOR);
...
However, this call returns the name "Name A" of the name-value pair.

Any ideas how it can be achieved that the value of the name-value pair is
stored in the PreferenceStore?

Thanks for reading and helping!
Previous Topic:How to run executable jar via eclipse update manager
Next Topic:getting a ComboFieldEditor's value from PreferencesStore
Goto Forum:
  


Current Time: Sat Apr 27 00:10:44 GMT 2024

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

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

Back to the top