private static @NotNull ArrayList<Attachment> createAttachments(@Nullable ObjectStubTree<?> stubTree,
                                                                  @NotNull PsiFileWithStubSupport psiFile,
                                                                  @NotNull VirtualFile file) {
    ArrayList<Attachment> attachments = new ArrayList<>();
    attachments.add(new Attachment(file.getPath() + "_file.txt", psiFile instanceof PsiCompiledElement ? "compiled" : psiFile.getText()));
    if (stubTree != null) {
      attachments.add(new Attachment("stubTree.txt", ((PsiFileStubImpl<?>)stubTree.getRoot()).printTree()));
    }
    return attachments;
  }
private static @NotNull ArrayList<Attachment> createAttachments(@Nullable ObjectStubTree<?> stubTree,
                                                                  @NotNull PsiFileWithStubSupport psiFile,
                                                                  @NotNull VirtualFile file)