This is somewhat of a continuation of a previous question that I posted. Basically when users of my plugin create a new project or module from existing sources, in particular from VCS, the resulting module is not of the correct type. This causes other behavioral issues, and the current workaround is to have the user delete the existing module and replace it with a new module of the correct type on the same source root. This is clunky at best, and it's leading to quite a few questions from users.
In my previous question I asked whether there might be some way to have the new module be created of the correct type initially, but it doesn't sound like that's supported. I'm now planning to take a different approach where I can detect modules of the incorrect type and migrate them to be of the correct type. I've looked at a few different EPs including checkoutCompletedListener, projectOpenProcessor, and of course localInspection. The first two don't seem like good fits because in reality I'd like to detect this quickly in just about any situation, not just when a module in introduced via VCS checkout or when a project is opened (that doesn't detect new modules). A global inspection with an associated intention seems like the best way I've found so far, but before I go make something harder than it should be, I figured I'd ask for guidance here.
For what it's worth, I already have a framework.detector that can detect and prompt for the module facet type, though even that isn't working as well as I'd prefer since the implementation of FacetBasedFrameworkDetector.getFileType() can only return a single file type, but my plugin supports multiple custom file types that might identify the need for a facet. I guess that's a second question...can I have more than one file type be used for detection?
Okay, I'll start with that. Thanks in advance!
UPDATE: Now I'm looking at the editorNotificationProvider EP. Looks promising.