当前位置: 首页>>代码示例>>Java>>正文


Java PreferencePagePresenter类代码示例

本文整理汇总了Java中org.eclipse.che.ide.api.preferences.PreferencePagePresenter的典型用法代码示例。如果您正苦于以下问题:Java PreferencePagePresenter类的具体用法?Java PreferencePagePresenter怎么用?Java PreferencePagePresenter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PreferencePagePresenter类属于org.eclipse.che.ide.api.preferences包,在下文中一共展示了PreferencePagePresenter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configure

import org.eclipse.che.ide.api.preferences.PreferencePagePresenter; //导入依赖的package包/类
@Override
protected void configure() {
  bind(PreferencesManager.class).to(PreferencesManagerImpl.class).in(Singleton.class);
  GinMultibinder.newSetBinder(binder(), PreferencesManager.class)
      .addBinding()
      .to(PreferencesManagerImpl.class);

  bind(PreferencesView.class).to(PreferencesViewImpl.class).in(Singleton.class);

  GinMultibinder<PreferencePagePresenter> pagesBinder =
      GinMultibinder.newSetBinder(binder(), PreferencePagePresenter.class);
  pagesBinder.addBinding().to(IdeGeneralPreferencesPresenter.class);
  pagesBinder.addBinding().to(ExtensionManagerPresenter.class);

  bind(IdeGeneralPreferencesView.class)
      .to(IdeGeneralPreferencesViewImpl.class)
      .in(Singleton.class);
  bind(ExtensionManagerView.class).to(ExtensionManagerViewImpl.class).in(Singleton.class);
}
 
开发者ID:eclipse,项目名称:che,代码行数:20,代码来源:PreferencesApiModule.java

示例2: PreferencesPresenter

import org.eclipse.che.ide.api.preferences.PreferencePagePresenter; //导入依赖的package包/类
/**
 * Create presenter.
 *
 * <p>For tests.
 *
 * @param view
 * @param preferences
 * @param dialogFactory
 * @param locale
 * @param managers
 */
@Inject
protected PreferencesPresenter(
    PreferencesView view,
    Set<PreferencePagePresenter> preferences,
    DialogFactory dialogFactory,
    CoreLocalizationConstant locale,
    Set<PreferencesManager> managers,
    Provider<NotificationManager> notificationManagerProvider) {
  this.view = view;
  this.preferences = preferences;
  this.dialogFactory = dialogFactory;
  this.locale = locale;
  this.managers = managers;
  this.notificationManagerProvider = notificationManagerProvider;
  this.view.setDelegate(this);
  for (PreferencePagePresenter preference : preferences) {
    preference.setUpdateDelegate(this);
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:31,代码来源:PreferencesPresenter.java

示例3: showPreferences

import org.eclipse.che.ide.api.preferences.PreferencePagePresenter; //导入依赖的package包/类
/** Shows preferences. */
public void showPreferences() {
  if (preferencesMap != null) {
    view.show();
    return;
  }

  preferencesMap = new HashMap<>();
  for (PreferencePagePresenter preference : preferences) {
    Set<PreferencePagePresenter> prefsList = preferencesMap.get(preference.getCategory());
    if (prefsList == null) {
      prefsList = new HashSet<PreferencePagePresenter>();
      preferencesMap.put(preference.getCategory(), prefsList);
    }

    prefsList.add(preference);
  }
  view.setPreferences(preferencesMap);

  view.show();
  view.enableSaveButton(false);
  view.selectPreference(preferencesMap.entrySet().iterator().next().getValue().iterator().next());
}
 
开发者ID:eclipse,项目名称:che,代码行数:24,代码来源:PreferencesPresenter.java

示例4: onCloseClicked

import org.eclipse.che.ide.api.preferences.PreferencePagePresenter; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void onCloseClicked() {
  boolean haveUnsavedData = false;
  for (PreferencePagePresenter preference : preferences) {
    if (preference.isDirty()) {
      haveUnsavedData = true;
      break;
    }
  }
  if (haveUnsavedData) {
    dialogFactory
        .createConfirmDialog(
            "",
            locale.messagesPromptSaveChanges(),
            locale.yesButtonTitle(),
            locale.noButtonTitle(),
            getConfirmCallback(),
            getCancelCallback())
        .show();
  } else {
    view.close();
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:25,代码来源:PreferencesPresenter.java

示例5: configure

import org.eclipse.che.ide.api.preferences.PreferencePagePresenter; //导入依赖的package包/类
@Override
protected void configure() {
  bind(SshKeyManagerView.class).to(SshKeyManagerViewImpl.class).in(Singleton.class);
  bind(UploadSshKeyView.class).to(UploadSshKeyViewImpl.class).in(Singleton.class);
  bind(ShowSshKeyView.class).to(ShowSshKeyViewImpl.class).in(Singleton.class);
  GinMultibinder<PreferencePagePresenter> prefBinder =
      GinMultibinder.newSetBinder(binder(), PreferencePagePresenter.class);
  prefBinder.addBinding().to(SshKeyManagerPresenter.class);
}
 
开发者ID:eclipse,项目名称:che,代码行数:10,代码来源:SshKeyGinModule.java

示例6: configure

import org.eclipse.che.ide.api.preferences.PreferencePagePresenter; //导入依赖的package包/类
@Override
protected void configure() {
  bind(JsIntervalSetter.class).asEagerSingleton();

  bind(GreetingPartView.class).to(GreetingPartViewImpl.class).in(Singleton.class);
  bind(ImportFromConfigView.class).to(ImportFromConfigViewImpl.class).in(Singleton.class);
  bind(ShowWelcomePreferencePageView.class)
      .to(ShowWelcomePreferencePageViewImpl.class)
      .in(Singleton.class);
  bind(FactoryServiceClient.class).to(FactoryServiceClientImpl.class).in(Singleton.class);

  final GinMultibinder<PreferencePagePresenter> prefBinder =
      GinMultibinder.newSetBinder(binder(), PreferencePagePresenter.class);
  prefBinder.addBinding().to(ShowWelcomePreferencePagePresenter.class);
}
 
开发者ID:eclipse,项目名称:che,代码行数:16,代码来源:FactoryGinModule.java

示例7: renderCategory

import org.eclipse.che.ide.api.preferences.PreferencePagePresenter; //导入依赖的package包/类
@Override
public com.google.gwt.dom.client.SpanElement renderCategory(
    Category<PreferencePagePresenter> category) {
  SpanElement spanElement = Document.get().createSpanElement();
  spanElement.setClassName(resources.defaultCategoriesListCss().headerText());
  spanElement.setInnerText(category.getTitle());
  return spanElement;
}
 
开发者ID:eclipse,项目名称:che,代码行数:9,代码来源:PreferencesViewImpl.java

示例8: setPreferences

import org.eclipse.che.ide.api.preferences.PreferencePagePresenter; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void setPreferences(Map<String, Set<PreferencePagePresenter>> preferences) {
  List<Category<?>> categoriesList = new ArrayList<>();
  for (Entry<String, Set<PreferencePagePresenter>> entry : preferences.entrySet()) {
    categoriesList.add(
        new Category<>(
            entry.getKey(), preferencesPageRenderer, entry.getValue(), preferencesPageDelegate));
  }

  list.render(categoriesList, true);
}
 
开发者ID:eclipse,项目名称:che,代码行数:13,代码来源:PreferencesViewImpl.java

示例9: onDirtyChanged

import org.eclipse.che.ide.api.preferences.PreferencePagePresenter; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void onDirtyChanged() {
  for (PreferencePagePresenter p : preferences) {
    if (p.isDirty()) {
      view.enableSaveButton(true);
      return;
    }
  }
  view.enableSaveButton(false);
}
 
开发者ID:eclipse,项目名称:che,代码行数:12,代码来源:PreferencesPresenter.java

示例10: getConfirmCallback

import org.eclipse.che.ide.api.preferences.PreferencePagePresenter; //导入依赖的package包/类
private ConfirmCallback getConfirmCallback() {
  return new ConfirmCallback() {
    @Override
    public void accepted() {
      for (PreferencePagePresenter preference : preferences) {
        if (preference.isDirty()) {
          preference.storeChanges();
        }
      }
      view.enableSaveButton(false);
      view.close();
    }
  };
}
 
开发者ID:eclipse,项目名称:che,代码行数:15,代码来源:PreferencesPresenter.java

示例11: getCancelCallback

import org.eclipse.che.ide.api.preferences.PreferencePagePresenter; //导入依赖的package包/类
private CancelCallback getCancelCallback() {
  return new CancelCallback() {
    @Override
    public void cancelled() {
      for (PreferencePagePresenter preference : preferences) {
        if (preference.isDirty()) {
          preference.revertChanges();
        }
      }
      view.close();
    }
  };
}
 
开发者ID:eclipse,项目名称:che,代码行数:14,代码来源:PreferencesPresenter.java

示例12: configure

import org.eclipse.che.ide.api.preferences.PreferencePagePresenter; //导入依赖的package包/类
@Override
protected void configure() {
  GinMultibinder.newSetBinder(binder(), PreferencePagePresenter.class)
      .addBinding()
      .to(EditorPreferencePresenter.class);

  bind(EditorPreferenceView.class).to(EditorPreferenceViewImpl.class);
  bind(KeymapsPreferenceView.class).to(KeymapsPreferenceViewImpl.class);
  bind(KeyMapsPreferencePresenter.class);

  install(
      new GinFactoryModuleBuilder()
          .implement(EditorPreferenceSection.class, EditorPropertiesSectionPresenter.class)
          .build(EditorPreferenceSectionFactory.class));

  GinMultibinder<EditorPreferenceSection> editorPreferenceSectionsBinder =
      GinMultibinder.newSetBinder(binder(), EditorPreferenceSection.class);
  editorPreferenceSectionsBinder.addBinding().to(KeyMapsPreferencePresenter.class);
  editorPreferenceSectionsBinder.addBinding().to(EditorPropertiesPresenter.class);

  GinMultibinder<EditorPropertiesSection> editorPropertiesSectionBinder =
      GinMultibinder.newSetBinder(binder(), EditorPropertiesSection.class);

  editorPropertiesSectionBinder.addBinding().to(TabsPropertiesSection.class);
  editorPropertiesSectionBinder.addBinding().to(EditPropertiesSection.class);
  editorPropertiesSectionBinder.addBinding().to(LanguageToolsPropertiesSection.class);
  editorPropertiesSectionBinder.addBinding().to(TypingPropertiesSection.class);
  editorPropertiesSectionBinder.addBinding().to(WhiteSpacesPropertiesSection.class);
  editorPropertiesSectionBinder.addBinding().to(RulersPropertiesSection.class);
}
 
开发者ID:eclipse,项目名称:che,代码行数:31,代码来源:EditorPreferencesModule.java

示例13: configure

import org.eclipse.che.ide.api.preferences.PreferencePagePresenter; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
protected void configure() {
  bind(SshKeyManagerView.class).to(SshKeyManagerViewImpl.class).in(Singleton.class);
  bind(UploadSshKeyView.class).to(UploadSshKeyViewImpl.class).in(Singleton.class);
  bind(ShowSshKeyView.class).to(ShowSshKeyViewImpl.class).in(Singleton.class);

  GinMultibinder<PreferencePagePresenter> prefBinder =
      GinMultibinder.newSetBinder(binder(), PreferencePagePresenter.class);
  prefBinder.addBinding().to(SshKeyManagerPresenter.class);
}
 
开发者ID:eclipse,项目名称:che,代码行数:12,代码来源:SshGinModule.java

示例14: configure

import org.eclipse.che.ide.api.preferences.PreferencePagePresenter; //导入依赖的package包/类
@Override
protected void configure() {
  bind(FormatterPreferencePageView.class)
      .to(FormatterPreferencePageViewImpl.class)
      .in(Singleton.class);
  final GinMultibinder<PreferencePagePresenter> prefBinder =
      GinMultibinder.newSetBinder(binder(), PreferencePagePresenter.class);
  prefBinder.addBinding().to(FormatterPreferencePagePresenter.class);
}
 
开发者ID:eclipse,项目名称:che,代码行数:10,代码来源:FormatterGinModule.java

示例15: configure

import org.eclipse.che.ide.api.preferences.PreferencePagePresenter; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
protected void configure() {
  bind(YamlServiceClient.class).to(YamlServiceClientImpl.class).in(Singleton.class);

  bind(YamlExtensionManagerView.class).to(YamlExtensionManagerViewImpl.class).in(Singleton.class);
  GinMultibinder<PreferencePagePresenter> prefBinder =
      GinMultibinder.newSetBinder(binder(), PreferencePagePresenter.class);
  prefBinder.addBinding().to(YamlExtensionManagerPresenter.class);
}
 
开发者ID:eclipse,项目名称:che,代码行数:11,代码来源:YamlGinModule.java


注:本文中的org.eclipse.che.ide.api.preferences.PreferencePagePresenter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。