private static void addJigsawModule(@NotNull Module from,
                                      @Nullable PsiJavaModule to,
                                      @NotNull DependencyScope scope) {
    if (to == null) return;
    PsiJavaModule fromModule = ReadAction.compute(() -> JavaModuleGraphUtil.findDescriptorByModule(from, scope == DependencyScope.TEST));
    if (fromModule == null) return;
    WriteAction.run(() -> JavaModuleGraphUtil.addDependency(fromModule, to, scope));
  }
private static void addJigsawModule(@NotNull Module from,
                                      @Nullable PsiJavaModule to,
                                      @NotNull DependencyScope scope)