use of org.eclipse.che.ide.api.notification.NotificationManager in project che by eclipse.
the class GitCheckoutStatusNotificationOperation method apply.
@Override
public void apply(String endpointId, GitCheckoutEventDto dto) {
final Type type = dto.getType();
final String name = dto.getName();
switch(type) {
case BRANCH:
{
Log.debug(getClass(), "Received git branch checkout event: " + name);
final NotificationManager notificationManager = notificationManagerProvider.get();
if (notificationManager != null) {
notificationManager.notify("Git operation", "Branch '" + name + "' is checked out", SUCCESS, EMERGE_MODE);
}
break;
}
case REVISION:
{
Log.debug(getClass(), "Received git revision checkout event: " + name);
final NotificationManager notificationManager = notificationManagerProvider.get();
if (notificationManager != null) {
notificationManager.notify("Git operation", "Revision '" + name + "' is checked out", SUCCESS, EMERGE_MODE);
}
break;
}
}
}
use of org.eclipse.che.ide.api.notification.NotificationManager in project che by eclipse.
the class JavaCompilerPreferencePresenterTest method propertiesShouldBeDisplayedFailed.
@Test
public void propertiesShouldBeDisplayedFailed() throws OperationException {
PromiseError promiseError = mock(PromiseError.class);
NotificationManager notificationManager = mock(NotificationManager.class);
when(notificationManagerProvider.get()).thenReturn(notificationManager);
presenter.onWsAgentStarted(wsAgentStateEvent);
presenter.go(container);
verify(mapPromise).catchError(errorOperationCaptor.capture());
errorOperationCaptor.getValue().apply(promiseError);
verify(preferencesManager).loadPreferences();
verify(notificationManager).notify(anyString(), eq(FAIL), eq(FLOAT_MODE));
}
Aggregations