public @NotNull Dialog.ModalityType toAwtModality() {
      return switch (this) {
        case IDE -> Dialog.ModalityType.APPLICATION_MODAL;
        case PROJECT -> {
          LOG.error("IdeModalityType.PROJECT is not fully supported and may lead to unexpected problems. Use IdeModalityType.IDE for modal dialogs and IdeModalityType.MODELESS for non-modal ones");
          if (Registry.is("ide.treat.project.modality.as.application")) yield Dialog.ModalityType.APPLICATION_MODAL;
          else yield Dialog.ModalityType.DOCUMENT_MODAL;
        }
        case MODELESS -> Dialog.ModalityType.MODELESS;
      };
    }
public @NotNull Dialog.ModalityType toAwtModality()