/** * Obtains the {@link IPreferenceStore}'s default or current value for this preference * * @param defaultFlag indicates if the default or current value is being requested * @return the requested value */ private String getPreferenceStoreValue(boolean defaultFlag) { IPreferenceStore prefStore = getPreferenceStore(); String value = null; if (defaultFlag) { value = prefStore.getDefaultString(PREF_ID); } else { value = prefStore.getString(PREF_ID); } if (StringUtilities.isEmpty(value)) { value = TeiidServerVersion.deriveUltimateDefaultServerVersion().toString(); } return value; }
/** * Updates the radio buttons selection states corresponding to the new value. * * @param value the new value */ private void update(String value) { List<String> items = new ArrayList<String>(); try { Collection<ITeiidServerVersion> registeredServerVersions = TeiidRuntimeRegistry.getInstance().getSupportedVersions(); items = TeiidServerVersion.orderVersions(registeredServerVersions, true); } catch (Exception ex) { Util.log(ex); for (VersionID versionId : VersionID.values()) { items.add(versionId.toString()); } } versionCombo.setItems(items.toArray(new String[0])); versionCombo.setText(value); }