mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-09 10:05:24 +02:00
[fix] [preferences] Default system type combo does show ids instead of UI labels
This commit is contained in:
parent
41591dc0dc
commit
d3ba9e3301
2 changed files with 7 additions and 5 deletions
|
@ -113,8 +113,10 @@ public class RSESystemType extends PlatformObject implements IRSESystemType {
|
|||
* @see org.eclipse.rse.core.IRSESystemType#getLabel()
|
||||
*/
|
||||
public String getLabel() {
|
||||
// fallback to the id if the label should be null.
|
||||
if (label == null) return getId();
|
||||
// For default RSE system types, the UI label is equal to the
|
||||
// name. Therefor, fallback to the name if the label is not
|
||||
// explicitly set.
|
||||
if (label == null) return getName();
|
||||
return label;
|
||||
}
|
||||
|
||||
|
|
|
@ -95,15 +95,15 @@ public class RemoteSystemsPreferencePage
|
|||
{
|
||||
IPreferenceStore coreStore = new PreferencesMapper(RSECorePlugin.getDefault().getPluginPreferences());
|
||||
|
||||
List systemTypeNames = new ArrayList();
|
||||
List systemTypeLabels = new ArrayList();
|
||||
IRSESystemType[] systemTypes = RSECorePlugin.getDefault().getRegistry().getSystemTypes();
|
||||
for (int i = 0; i < systemTypes.length; i++) systemTypeNames.add(systemTypes[i].getName());
|
||||
for (int i = 0; i < systemTypes.length; i++) systemTypeLabels.add(systemTypes[i].getLabel());
|
||||
|
||||
// DEFAULT SYSTEM TYPE
|
||||
SystemComboBoxFieldEditor systemTypeEditor = new SystemComboBoxFieldEditor(
|
||||
IRSEPreferenceNames.SYSTEMTYPE,
|
||||
SystemResources.RESID_PREF_SYSTEMTYPE_PREFIX_LABEL,
|
||||
(String[])systemTypeNames.toArray(new String[systemTypeNames.size()]),
|
||||
(String[])systemTypeLabels.toArray(new String[systemTypeLabels.size()]),
|
||||
true, // readonly
|
||||
getFieldEditorParent()
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue