Package org.sylfra.idea.plugins.revu.ui.statusbar

Examples of org.sylfra.idea.plugins.revu.ui.statusbar.StatusBarMessage


    Review review = (Review) liReviews.getSelectedValue();
    if (!review.isExternalizable())
    {
      String errorTitle = RevuBundle.message("friendlyError.notExternalizableReview.title.text", review.getName());
      String errorDetails = RevuBundle.message("friendlyError.notExternalizableReview.details.details.text", review.getName());
      StatusBarComponent.showMessageInPopup(project, new StatusBarMessage(StatusBarMessage.Type.ERROR, errorTitle, errorDetails), true);
      return;
    }

    ExportDialog exportDialog = new ExportDialog(project);
    exportDialog.show(review);
    if (!exportDialog.isOK())
    {
      return;
    }

    File f = exportDialog.getFile();
    if (f != null)
    {
      try
      {
        project.getComponent(IReviewExternalizer.class).save(review, f);
      }
      catch (Exception ex)
      {
        LOGGER.warn("Failed to close exported review file", ex);
        String errorTitle = RevuBundle.message("friendlyError.exportFailed.title.text", review.getName());
        String errorDetails = RevuBundle.message("friendlyError.externalizing.save.error.details.text",
          f.getPath(), ex.getMessage());
        StatusBarComponent.showMessageInPopup(project, (new StatusBarMessage(StatusBarMessage.Type.ERROR, errorTitle,
          errorDetails)), false);
      }
    }
  }
View Full Code Here


    {
      LOGGER.warn(exception);

      final String details = ((exception.getLocalizedMessage() == null)
        ? exception.toString() : exception.getLocalizedMessage());
      project.getComponent(StatusBarComponent.class).addMessage(new StatusBarMessage(StatusBarMessage.Type.ERROR,
        RevuBundle.message("friendlyError.externalizing.save.error.title.text"),
        RevuBundle.message("friendlyError.externalizing.load.error.details.text", review.getFile(), details)), true);

      return;
    }
View Full Code Here

    {
      LOGGER.warn(exception);

      final String details = ((exception.getLocalizedMessage() == null)
        ? exception.toString() : exception.getLocalizedMessage());
      project.getComponent(StatusBarComponent.class).addMessage(new StatusBarMessage(StatusBarMessage.Type.ERROR,
        RevuBundle.message("friendlyError.externalizing.save.error.title.text"),
        RevuBundle.message("friendlyError.externalizing.load.error.details.text", review.getFile(), details)), true);

      return;
    }
View Full Code Here

      {
        LOGGER.warn("Failed to close exported review file", ex);
        String errorTitle = RevuBundle.message("friendlyError.exportFailed.title.text", review.getName());
        String errorDetails = RevuBundle.message("friendlyError.externalizing.save.error.details.text",
          f.getPath(), ex.getMessage());
        StatusBarComponent.showMessageInPopup(project, (new StatusBarMessage(StatusBarMessage.Type.ERROR, errorTitle,
          errorDetails)), false);
      }
    }
  }
View Full Code Here

        catch (RevuException exception)
        {
          String errorTitle = RevuBundle.message("friendlyError.externalizing.cyclicReview.title.text");
          setErrorText(errorTitle);

          StatusBarComponent.showMessageInPopup(project, (new StatusBarMessage(StatusBarMessage.Type.ERROR, errorTitle,
            exception.getMessage())), false);
          return;
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.sylfra.idea.plugins.revu.ui.statusbar.StatusBarMessage

Copyright © 2018 www.massapicom. 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.