Package com.google.collide.client.status

Examples of com.google.collide.client.status.StatusMessage.addAction()


          public void onFail(FailureReason reason) {
            Log.error(getClass(), "Failed to retrieve file metadata for workspace.");
            StatusMessage fatal = new StatusMessage(
                appContext.getStatusManager(), MessageType.FATAL,
                "There was a problem refreshing changes within the file tree :(.");
            fatal.addAction(StatusMessage.RELOAD_ACTION);
            fatal.setDismissable(true);
            fatal.fire();
          }
        });
  }
View Full Code Here


  private StatusMessage createErrorMessage() {
    StatusMessage msg =
        new StatusMessage(statusManager, MessageType.ERROR,
            "Your latest changes timed out while saving.");
    msg.addAction(StatusMessage.RELOAD_ACTION);
    msg.setDismissable(false);

    XhrWarden.dumpRequestsToConsole();
    return msg;
  }
View Full Code Here

            // Display a message to the user that he needs to reload the client.
            StatusMessage skewMsg = new StatusMessage(statusManager, MessageType.LOADING,
                "A new version of Collide is available. Please Reload.");
            skewMsg.setDismissable(false);
            skewMsg.addAction(StatusMessage.RELOAD_ACTION);
            skewMsg.fireDelayed(500);
            return false;
          case NOT_LOGGED_IN:

            // Display a message to the user that he needs to reload the client.
View Full Code Here

            // Display a message to the user that he needs to reload the client.
            StatusMessage loginMsg = new StatusMessage(statusManager, MessageType.LOADING,
                "You have been signed out. Please reload to sign in.");
            loginMsg.setDismissable(true);
            loginMsg.addAction(StatusMessage.RELOAD_ACTION);
            loginMsg.fireDelayed(500);
            return false;
          default:
            // Allow the RPC retry logic to proceed.
            return true;
View Full Code Here

  public static PushChannel create(MessageFilter messageFilter, StatusManager statusManager) {
    // If we do not have a valid client ID... bail.
    if (BootstrapSession.getBootstrapSession().getActiveClientId() == null) {
      StatusMessage fatal =
          new StatusMessage(statusManager, MessageType.FATAL, "You are not logged in!");
      fatal.addAction(StatusMessage.RELOAD_ACTION);
      fatal.setDismissable(false);
      fatal.fire();
      return null;
    }
View Full Code Here

    fileConcurrencyController.recover(new ErrorCallback() {
      @Override
      public void onError() {
        StatusMessage fatal = new StatusMessage(appContext.getStatusManager(), MessageType.FATAL,
            "There was a problem synchronizing with the server.");
        fatal.addAction(StatusMessage.RELOAD_ACTION);
        fatal.setDismissable(false);
        fatal.fire();
      }
    });
  }
View Full Code Here

    @Override
    public void run() {
      // reconnection effort failed.
      StatusMessage fatal = new StatusMessage(
          statusManager, MessageType.FATAL, "Lost communication with the server.");
      fatal.addAction(StatusMessage.RELOAD_ACTION);
      fatal.setDismissable(false);
      fatal.fire();
    }

    void schedule() {
View Full Code Here

      @Override
      public void onMessageReceived(final LogFatalRecordResponse message) {
        StatusMessage msg = new StatusMessage(statusManager, MessageType.FATAL, FATAL_MESSAGE);

        msg.addAction(StatusMessage.FEEDBACK_ACTION);
        msg.addAction(StatusMessage.RELOAD_ACTION);

        String stackTrace;
        if (!StringUtils.isNullOrEmpty(message.getStackTrace())) {
          stackTrace = message.getStackTrace();
View Full Code Here

      @Override
      public void onMessageReceived(final LogFatalRecordResponse message) {
        StatusMessage msg = new StatusMessage(statusManager, MessageType.FATAL, FATAL_MESSAGE);

        msg.addAction(StatusMessage.FEEDBACK_ACTION);
        msg.addAction(StatusMessage.RELOAD_ACTION);

        String stackTrace;
        if (!StringUtils.isNullOrEmpty(message.getStackTrace())) {
          stackTrace = message.getStackTrace();
        } else {
View Full Code Here

      }

      @Override
      public void onFail(FailureReason reason) {
        StatusMessage msg = new StatusMessage(statusManager, MessageType.FATAL, FATAL_MESSAGE);
        msg.addAction(StatusMessage.FEEDBACK_ACTION);
        msg.addAction(StatusMessage.RELOAD_ACTION);
        msg.setLongText(calculateLongText(ExceptionUtils.getStackTraceAsString(exception)));
        msg.fire();
      }
    });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.