當前位置: 首頁>>代碼示例>>Java>>正文


Java PreferencesManager.getValue方法代碼示例

本文整理匯總了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();
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:25,代碼來源:YamlExtensionManagerPresenter.java

示例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);
}
 
開發者ID:codenvy-legacy,項目名稱:plugin-datasource,代碼行數:26,代碼來源:SqlRequestLauncherPresenter.java

示例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));
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:13,代碼來源:ShowToolbarAction.java

示例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);
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:15,代碼來源:CommitterPreferencePresenter.java


注:本文中的org.eclipse.che.ide.api.preferences.PreferencesManager.getValue方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。