@Override
  public void reportErrorAndNavigate(@NotNull String groupId,
                                     @NotNull String title,
                                     @NotNull String message,
                                     @NotNull FormattingContext context,
                                     int offset) {
    VirtualFile virtualFile = context.getVirtualFile();
    if (virtualFile != null) {
      ApplicationManager.getApplication().invokeLater(
        () -> {
          FileEditor[] editors = FileEditorManager.getInstance(myProject).getEditors(virtualFile);
          if (editors.length > 0) {
            reportError(groupId, title, message);
            FileEditor textEditor = ContainerUtil.find(editors, editor -> editor instanceof TextEditor);
            if (textEditor != null) {
              navigateToFile(virtualFile, offset);
            }
          }
          else {
            Notification notification = new Notification(groupId, title, message, NotificationType.ERROR);
            notification.addAction(new DumbAwareAction(CodeStyleBundle.message("formatting.service.open.file", virtualFile.getName())) {
              @Override
              public void actionPerformed(@NotNull AnActionEvent e) {
                navigateToFile(virtualFile, offset);
              }
            });
            Notifications.Bus.notify(notification, myProject);
          }
        }
      );
    }
  }
@Override
  public void reportErrorAndNavigate(@NotNull String groupId,
                                     @NotNull String title,
                                     @NotNull String message,
                                     @NotNull FormattingContext context,
                                     int offset)