本文整理匯總了Java中org.eclipse.che.ide.api.preferences.PreferencesManager.getValue方法的典型用法代碼示例。如果您正苦於以下問題:Java PreferencesManager.getValue方法的具體用法?Java PreferencesManager.getValue怎麽用?Java PreferencesManager.getValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.che.ide.api.preferences.PreferencesManager
的用法示例。
在下文中一共展示了PreferencesManager.getValue方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: YamlExtensionManagerPresenter
import org.eclipse.che.ide.api.preferences.PreferencesManager; //導入方法依賴的package包/類
@Inject
public YamlExtensionManagerPresenter(
YamlExtensionManagerView view,
DialogFactory dialogFactory,
PreferencesManager preferencesManager,
YamlLocalizationConstant local,
YamlServiceClient service) {
super("Yaml", "Language Server Settings");
this.view = view;
this.dialogFactory = dialogFactory;
this.local = local;
this.service = service;
this.preferencesManager = preferencesManager;
if (preferencesManager.getValue(preferenceName) == null
|| "".equals(preferencesManager.getValue(preferenceName))
|| "{}".equals(preferencesManager.getValue(preferenceName))) {
this.yamlPreferences = new ArrayList<YamlPreference>();
} else {
this.yamlPreferences =
jsonToYamlPreference(this.preferencesManager.getValue(this.preferenceName));
}
this.view.setDelegate(this);
refreshTable();
}
示例2: setupResultLimit
import org.eclipse.che.ide.api.preferences.PreferencesManager; //導入方法依賴的package包/類
private void setupResultLimit(final PreferencesManager preferencesManager) {
final String prefRequestLimit = preferencesManager.getValue(PREFERENCE_KEY_DEFAULT_REQUEST_LIMIT);
if (prefRequestLimit != null) {
try {
int prefValue = Integer.parseInt(prefRequestLimit);
if (prefValue > 0) {
this.resultLimit = prefValue;
} else {
Log.warn(SqlRequestLauncherPresenter.class, "negative value stored in preference "
+ PREFERENCE_KEY_DEFAULT_REQUEST_LIMIT);
}
} catch (final NumberFormatException e) {
StringBuilder sb = new StringBuilder("Preference stored in ")
.append(PREFERENCE_KEY_DEFAULT_REQUEST_LIMIT)
.append(" is not an integer (")
.append(resultLimit)
.append(").");
Log.warn(SqlRequestLauncherPresenter.class, sb.toString());
}
}
// push the request limit value to the view
this.view.setResultLimit(this.resultLimit);
}
示例3: ShowToolbarAction
import org.eclipse.che.ide.api.preferences.PreferencesManager; //導入方法依賴的package包/類
@Inject
public ShowToolbarAction(
CoreLocalizationConstant localizationConstant,
PreferencesManager preferencesManager,
WorkspaceView workspaceView) {
super(localizationConstant.actionShowToolbar());
this.preferencesManager = preferencesManager;
this.workspaceView = workspaceView;
String showToolbar = preferencesManager.getValue(SHOW_TOOLBAR);
workspaceView.showToolbar(Boolean.parseBoolean(showToolbar));
}
示例4: CommitterPreferencePresenter
import org.eclipse.che.ide.api.preferences.PreferencesManager; //導入方法依賴的package包/類
@Inject
public CommitterPreferencePresenter(
CommitterPreferenceView view,
GitLocalizationConstant constant,
PreferencesManager preferencesManager) {
super(constant.committerTitle(), constant.committerPreferenceCategory());
this.view = view;
this.preferencesManager = preferencesManager;
name = preferencesManager.getValue(COMMITTER_NAME);
email = preferencesManager.getValue(COMMITTER_EMAIL);
view.setDelegate(this);
}