private static @Nullable Project handleNonExisting(@NotNull Path path) {
    if (path.getFileName() == null) {
      LOG.error("No file name is given");
    }
    if (isLightEditEnabled() && path.getNameCount() > 0) {
      String fileName = path.getFileName().toString();
      final Ref<String> creationMessage = Ref.create();
      if (path.getNameCount() > 1) {
        File newFile = path.toFile();
        if (!FileUtil.ensureCanCreateFile(newFile)) {
          creationMessage.set(ApplicationBundle.message("light.edit.file.creation.failed.message", path.toString(), fileName));
        }
      }
      final Project project = ((LightEditServiceImpl)LightEditService.getInstance()).getOrCreateProject();
      ApplicationManager.getApplication().invokeLater(() -> {
        LightEditorInfo editorInfo = LightEditService.getInstance().createNewDocument(path);
        if (creationMessage.get() != null) {
          editorInfo.getFile().putUserData(CREATION_MESSAGE, creationMessage.get());
          EditorNotifications.getInstance(project).updateNotifications(editorInfo.getFile());
        }
      });
      return project;
    }
    return null;
  }
private static @Nullable Project handleNonExisting(@NotNull Path path)