Fix non-working compiler executable path in preferences

This commit is contained in:
Peter Dell 2022-12-27 00:40:39 +01:00
parent 1e11d6326c
commit 5f7891b5c4
2 changed files with 16 additions and 4 deletions

View File

@ -108,6 +108,16 @@ public final class LanguagePreferences {
}
/**
* Gets the preferences for the language of these preferences and a suffix.
*
* @param preferencesKeySuffix The key suffix, not empty and not <code>null</code>.
* @return The language preferences key, not empty and not <code>null</code>.
*/
public String getPreferencesKey(String preferencesKeySuffix) {
return LanguagePreferencesConstants.getPreferencesKey(language, preferencesKeySuffix);
}
/**
* Gets the current value of the boolean preference with the given name. Returns
* the default value <code>false</code> if there is no preference with the given
@ -122,9 +132,10 @@ public final class LanguagePreferences {
throw new IllegalArgumentException("Parameter 'preferencesKeySuffix' must not be null.");
}
return languagesPreferences
.getBoolean(LanguagePreferencesConstants.getPreferencesKey(language, preferencesKeySuffix));
.getBoolean(getPreferencesKey(preferencesKeySuffix));
}
/**
* Gets the current value of the string-valued preference with the given name.
* Returns the default-default value (the empty string <code>""</code> ) if
@ -140,7 +151,7 @@ public final class LanguagePreferences {
throw new IllegalArgumentException("Parameter 'preferencesKeySuffix' must not be null.");
}
return languagesPreferences
.getString(LanguagePreferencesConstants.getPreferencesKey(language, preferencesKeySuffix));
.getString(getPreferencesKey(preferencesKeySuffix));
}
/**
@ -156,7 +167,7 @@ public final class LanguagePreferences {
throw new IllegalArgumentException("Parameter 'textAttributeName' must not be null.");
}
return languagesPreferences
.getEditorTextAttribute(LanguagePreferencesConstants.getPreferencesKey(language, textAttributeName));
.getEditorTextAttribute(getPreferencesKey(textAttributeName));
}

View File

@ -436,7 +436,8 @@ public abstract class LanguagePreferencesPage extends FieldEditorPreferencePage
Composite composite;
String name;
name = LanguagePreferencesConstants.getCompilerExecutablePathName(compilerId);
name = LanguagePreferencesConstants.getPreferencesKey(language,
LanguagePreferencesConstants.getCompilerExecutablePathName(compilerId));
// Field: executablePath
composite = SWTFactory.createComposite(tabContent, 4, 2, GridData.FILL_HORIZONTAL);