@Nullable
  private static JpsModuleSourceRootType<?> getJavaSourceRootType(ExternalSystemSourceType type) {
    return switch (type) {
      case SOURCE, SOURCE_GENERATED -> JavaSourceRootType.SOURCE;
      case TEST, TEST_GENERATED -> JavaSourceRootType.TEST_SOURCE;
      case EXCLUDED -> null;
      case RESOURCE, RESOURCE_GENERATED -> JavaResourceRootType.RESOURCE;
      case TEST_RESOURCE, TEST_RESOURCE_GENERATED -> JavaResourceRootType.TEST_RESOURCE;
    };
  }
@Nullable
  private static JpsModuleSourceRootType<?> getJavaSourceRootType(ExternalSystemSourceType type)