public void checkServerError( String errorMessage, CloudNotifier notifier, Project project, CloudConnectionTask connectionTask) { if (isSshKeyErrorMessage(errorMessage)) { new ServerHandler(notifier, project, connectionTask).handle(errorMessage); } else { notifier.showMessage(errorMessage, MessageType.ERROR); } }
public void handle(String errorMessage) { myNotifier.showMessage( errorMessage + "<br/>You may need to <a href=\"#\">upload SSH public key</a>", MessageType.ERROR, new NotificationListener() { @Override public void hyperlinkUpdate( @NotNull Notification notification, @NotNull HyperlinkEvent event) { myErrorNotification = notification; chooseKey(); } }); }