本文整理汇总了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);
}
示例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);
}
}
示例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());
}
示例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();
}
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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();
}
};
}
示例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();
}
};
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}