use of org.uberfire.workbench.events.NotificationEvent.NotificationType.WARNING in project kie-wb-common by kiegroup.
the class SettingsPresenter method setupSection.
Promise<Object> setupSection(final ProjectScreenModel model, final Section section) {
return promises.resolve().then(ignore -> section.setup(model)).catch_(e -> {
sections.remove(section);
notificationEvent.fire(new NotificationEvent(getSectionSetupErrorMessage(section), WARNING));
return promises.reject(e);
}).then(i -> {
section.getMenuItem().setup(section, this);
resetDirtyIndicator(section);
return promises.resolve();
}).catch_(e -> {
DomGlobal.console.info(e);
return promises.resolve();
});
}
use of org.uberfire.workbench.events.NotificationEvent.NotificationType.WARNING in project kie-wb-common by kiegroup.
the class SettingsPresenter method setupSection.
Promise<Object> setupSection(final ProjectScreenModel model, final Section<ProjectScreenModel> section) {
return section.setup(model).then(i -> {
sectionManager.resetDirtyIndicator(section);
return promises.resolve();
}).catch_(e -> {
sectionManager.remove(section);
notificationEvent.fire(new NotificationEvent(getSectionSetupErrorMessage(section), WARNING));
return promises.resolve();
});
}
use of org.uberfire.workbench.events.NotificationEvent.NotificationType.WARNING in project kie-wb-common by kiegroup.
the class SettingsScreenPresenter method setupSection.
Promise<Object> setupSection(final SpaceScreenModel model, final Section<SpaceScreenModel> section) {
return section.setup(model).then(i -> {
sectionManager.resetDirtyIndicator(section);
return promises.resolve();
}).catch_(e -> {
sectionManager.remove(section);
notificationEvent.fire(new NotificationEvent(getSectionSetupErrorMessage(section), WARNING));
return promises.resolve();
});
}
Aggregations