@Override
  public @NotNull <R extends BuildRootDescriptor> List<R> getTargetRoots(@NotNull BuildTarget<R> target, CompileContext context) {
    //noinspection unchecked
    List<R> roots = (List<R>)myRootsByTarget.get(target);
    if (context != null) {
      final List<R> tempDescriptors = getTempTargetRoots(target, context);
      if (!tempDescriptors.isEmpty()) {
        if (roots != null) {
          roots = new ArrayList<>(roots);
          roots.addAll(tempDescriptors);
        }
        else {
          roots = tempDescriptors;
        }
      }
    }
    return roots != null? Collections.unmodifiableList(roots) : Collections.emptyList();
  }
@Override
  public @NotNull <R extends BuildRootDescriptor> List<R> getTargetRoots(@NotNull BuildTarget<R> target, CompileContext context)