private static <E extends WorkspaceEntity, C extends WorkspaceEntity> void handleChildEntities(@NotNull Class<? super E> entityClass,
                                                                                                 @NotNull E oldEntity,
                                                                                                 @NotNull E newEntity,
                                                                                                 @NotNull WorkspaceIndexingRootsBuilder descriptionsBuilder,
                                                                                                 @NotNull WorkspaceFileIndexContributor<C> contributor,
                                                                                                 @NotNull DependencyDescription<C> dependency,
                                                                                                 @NotNull EntityStorage entityStorage) {
    if (!(dependency instanceof DependencyDescription.OnParent) ||
        entityClass != ((DependencyDescription.OnParent<?, ?>)dependency).getParentClass()) {
      return;
    }
    List<C> oldElements = SequencesKt.toList(((DependencyDescription.OnParent<C, E>)dependency).getChildrenGetter().invoke(oldEntity));
    List<C> newElements =
      SequencesKt.toMutableList(((DependencyDescription.OnParent<C, E>)dependency).getChildrenGetter().invoke(newEntity));

    newElements.removeAll(oldElements);
    for (C element : newElements) {
      descriptionsBuilder.registerAddedEntity(element, contributor, entityStorage);
    }
  }
private static <E extends WorkspaceEntity, C extends WorkspaceEntity> void handleChildEntities(@NotNull Class<? super E> entityClass,
                                                                                                 @NotNull E oldEntity,
                                                                                                 @NotNull E newEntity,
                                                                                                 @NotNull WorkspaceIndexingRootsBuilder descriptionsBuilder,
                                                                                                 @NotNull WorkspaceFileIndexContributor<C> contributor,
                                                                                                 @NotNull DependencyDescription<C> dependency,
                                                                                                 @NotNull EntityStorage entityStorage)