How to distinguish New Module from New Project using Generator-NewProjectWizard-BuilderAdapter

Hi!

I have my own new project wizard extending GeneratorNewProjectWizard. To have it available in New Project dialog without additional steps I have wrapped it in GeneratorNewProjectWizardBuilderAdapter.

As it is not working well for New Module wizard, I’m distinguishing New Project from New Module using:

override fun isAvailable(): Boolean {
        val lastPerformedActionId = (ActionManager.getInstance() as ActionManagerImpl).lastPreformedActionId
        lastPerformedActionId ?: return false
        return lastPerformedActionId.contains("NewProject", true)
    }

ActionManagerImpl has been marked in 252 as @ApiStatus.Internal.

What is valid way to display my wizard in New Project and not in New Module?

BTW: I cannot create topic with GeneratorNewProjectWizardBuilderAdapter as it is too long single word :-C