use of org.eclipse.che.ide.api.workspace.event.WorkspaceStoppedEvent in project che by eclipse.
the class MavenMessagesHandler method handleOperations.
private void handleOperations(final DtoFactory factory, final WsAgentStateController wsAgentStateController) {
eventBus.addHandler(WsAgentStateEvent.TYPE, new WsAgentStateHandler() {
@Override
public void onWsAgentStarted(WsAgentStateEvent event) {
wsAgentStateController.getMessageBus().then(new Operation<MessageBus>() {
@Override
public void apply(MessageBus messageBus) throws OperationException {
try {
handleMavenServerEvents(messageBus);
handleMavenArchetype(messageBus);
} catch (WebSocketException e) {
dependencyResolver.hide();
Log.error(getClass(), e);
}
}
});
}
@Override
public void onWsAgentStopped(WsAgentStateEvent event) {
dependencyResolver.hide();
}
});
eventBus.addHandler(WorkspaceStoppedEvent.TYPE, new WorkspaceStoppedEvent.Handler() {
@Override
public void onWorkspaceStopped(WorkspaceStoppedEvent event) {
dependencyResolver.hide();
}
});
}
Aggregations