@Override
  public @NotNull Collection<ModuleBasedTarget<?>> getModuleBasedTargets(@NotNull JpsModule module, @NotNull BuildTargetRegistry.ModuleTargetSelector selector) {
    final List<ModuleBasedTarget> targets = myModuleBasedTargets.get(module);
    if (targets == null || targets.isEmpty()) {
      return Collections.emptyList();
    }
    final List<ModuleBasedTarget<?>> result = new SmartList<>();
    for (ModuleBasedTarget target : targets) {
      switch (selector) {
        case ALL:
          result.add(target);
          break;
        case PRODUCTION:
          if (!target.isTests()) {
            result.add(target);
          }
          break;
        case TEST:
          if (target.isTests()) {
            result.add(target);
          }
      }
    }
    return result;
  }
@Override
  public @NotNull Collection<ModuleBasedTarget<?>> getModuleBasedTargets(@NotNull JpsModule module, @NotNull BuildTargetRegistry.ModuleTargetSelector selector)