if facet has associated framework show 'add facet' instead of 'add framework support' dialog in Project Structure (IDEA-120643, IDEA-113833)

This commit is contained in:
nik
2014-03-07 11:31:37 +04:00
parent b814f5464f
commit da2374a0b6
@@ -100,14 +100,14 @@ public class AddFacetToModuleAction extends AnAction implements DumbAware {
public static Collection<AnAction> createAddFrameworkActions(FacetEditorFacade editor, Project project) {
SortedMap<String, AnAction> actions = new TreeMap<String, AnAction>();
for (FacetType type : FacetTypeRegistry.getInstance().getFacetTypes()) {
actions.put(type.getPresentableName(), new AddFacetToModuleAction(editor, project, type));
}
for (FrameworkTypeEx frameworkType : FrameworkTypeEx.EP_NAME.getExtensions()) {
final AnAction action = new AddFrameworkSupportInProjectStructureAction(frameworkType, frameworkType.createProvider(),
final AnAction action = new AddFrameworkSupportInProjectStructureAction(frameworkType, frameworkType.createProvider(),
ModuleStructureConfigurable.getInstance(project));
actions.put(frameworkType.getPresentableName(), action);
}
for (FacetType type : FacetTypeRegistry.getInstance().getFacetTypes()) {
actions.put(type.getPresentableName(), new AddFacetToModuleAction(editor, project, type));
}
return actions.values();
}
}