Show different editors for New Project and Add Framework Support dialogs

I'm implementing a new facet which I would like to contain configuration file locations related to our product/plugin. At New Project time, I don't want to ask the user for those locations since the files can be added to the template by us. At Add Framework Support time, we want to ask the user for the locations.

The issue is that both paths go through the same place, i.e., FrameworkSupportInModuleConfigurable.addSupport(FrameworkSupportModel model). The only way to distinguish if New Project or Add Framework Support are calling here is to check for model's class (and, in the New Project case, the class is anonymous ProjectTypeStep$7 which is uncastable and instanceof made unusable).

Overall, it seems like the IntelliJ model isn't really geared for this kind of thing, which makes me wonder if our approach is the correct one. Is there an easy way to show different UIs for New Project and Add Framework Support or is should we change our approach?




Please sign in to leave a comment.