private void addFacetNode(Facet facet) {
   MasterDetailsComponent.MyNode moduleNode =
       myStructureConfigurable.findModuleNode(facet.getModule());
   if (moduleNode == null) return;
   addFacetNode(facet, moduleNode);
   final FacetStructureConfigurable facetStructureConfigurable =
       FacetStructureConfigurable.getInstance(myStructureConfigurable.getProject());
   final MasterDetailsComponent.MyNode facetTypeNode =
       facetStructureConfigurable.getOrCreateFacetTypeNode(facet.getType());
   LOG.assertTrue(facetTypeNode != null, "Cannot found node for " + facet.getType());
   facetStructureConfigurable.addFacetNodes(facetTypeNode, Collections.singletonList(facet), this);
 }
  @Override
  public Collection<FacetInfo> getFacetsByType(final FacetType<?, ?> type) {
    final Module selectedModule = getSelectedModule();
    if (selectedModule == null) return Collections.emptyList();
    final FacetModel facetModel = getFacetConfigurator().getFacetModel(selectedModule);
    final Collection<? extends Facet> facets = facetModel.getFacetsByType(type.getId());

    final ArrayList<FacetInfo> infos = new ArrayList<>();
    for (Facet facet : facets) {
      final FacetInfo facetInfo = getFacetConfigurator().getFacetInfo(facet);
      if (facetInfo != null) {
        infos.add(facetInfo);
      }
    }
    return infos;
  }