@Override
  public void iterate(@NotNull RefVisitor visitor) {
    for (RefElement refElement : getSortedElements()) {
      refElement.accept(visitor);
    }
    List<RefModule> filteredModules =
      ContainerUtil.filter(myModules.values(), refModule -> ReadAction.compute(() -> myScope.containsModule(refModule.getModule())));
    for (RefModule refModule : filteredModules) {
      refModule.accept(visitor);
    }
    for (RefManagerExtension<?> extension : myExtensions.values()) {
      extension.iterate(visitor);
    }
  }
@Override
  public void iterate(@NotNull RefVisitor visitor)