id saveDocument(@NotNull LightEditorInfo editorInfo) {
    if (editorInfo.isNew()) {
      VirtualFile targetFile = LightEditUtil.getPreferredSaveTarget(editorInfo);
      if (targetFile == null) {
        targetFile = LightEditUtil.chooseTargetFile(this.getParent(), editorInfo);
      }
      if (targetFile != null) {
        myEditorManager.saveAs(editorInfo, targetFile);
      }
    }
    else {
      Document document = FileDocumentManager.getInstance().getDocument(editorInfo.getFile());
      if (document != null) {
        FileDocumentManager.getInstance().saveDocument(document);
      }
    }
  }


id saveDocument(@NotNull LightEditorInfo editorInfo) {