ivate void closeTab(@NotNull TabInfo tabInfo) {
    final LightEditorInfo editorInfo = getEditorInfo(tabInfo);
    if (editorInfo != null) {
      if (!editorInfo.isSaveRequired() ||
          autosaveDocument(editorInfo) ||
          LightEditUtil.confirmClose(
            ApplicationBundle.message("light.edit.close.message"),
            ApplicationBundle.message("light.edit.close.title"),
            new LightEditSaveConfirmationHandler() {
              @Override
              public void onSave() {
                saveDocument(editorInfo);
              }

              @Override
              public void onDiscard() {
                FileEditor fileEditor = editorInfo.getFileEditor();
                if (fileEditor instanceof TextEditor) {
                  Editor editor = ((TextEditor)fileEditor).getEditor();
                  FileDocumentManager.getInstance().reloadFromDisk(editor.getDocument());
                }
              }
            })
      ) {
        removeTab(tabInfo).doWhenDone(() -> myEditorManager.closeEditor(editorInfo));
      }
    }
  }


ivate void closeTab(@NotNull TabInfo tabInfo) {