[ES] add the support for RESOURCE_GENERATED TEST_RESOURCE_GENERATED source root types
authorVladislav.Soroka <Vladislav.Soroka@jetbrains.com>
Fri, 31 Jan 2020 09:39:28 +0000 (12:39 +0300)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Fri, 31 Jan 2020 10:08:33 +0000 (10:08 +0000)
GitOrigin-RevId: 3271b4ac4144170f88e0bf223f74d20493f1eaf9

platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/manage/ContentRootDataService.java
platform/external-system-rt/src/com/intellij/openapi/externalSystem/model/project/ExternalSystemSourceType.java

index 17ac3569bf85449418ddec80366f728689e29dcf..5558de2edb3c4f24c25a39123a641f72ec6c8848 100644 (file)
@@ -186,18 +186,18 @@ public class ContentRootDataService extends AbstractProjectDataService<ContentRo
   private static JpsModuleSourceRootType<?> getJavaSourceRootType(ExternalSystemSourceType type) {
     switch (type) {
       case SOURCE:
+      case SOURCE_GENERATED:
         return JavaSourceRootType.SOURCE;
       case TEST:
+      case TEST_GENERATED:
         return JavaSourceRootType.TEST_SOURCE;
       case EXCLUDED:
         return null;
-      case SOURCE_GENERATED:
-        return JavaSourceRootType.SOURCE;
-      case TEST_GENERATED:
-        return JavaSourceRootType.TEST_SOURCE;
       case RESOURCE:
+      case RESOURCE_GENERATED:
         return JavaResourceRootType.RESOURCE;
       case TEST_RESOURCE:
+      case TEST_RESOURCE_GENERATED:
         return JavaResourceRootType.TEST_RESOURCE;
     }
     return null;
index c9c3ae4cd893daa69dda7d28dc70d67855e989e1..7cf5f7429ea1c24d2aafea2ebfbef203c7a89ec6 100644 (file)
@@ -15,7 +15,9 @@ public enum ExternalSystemSourceType implements IExternalSystemSourceType {
   SOURCE_GENERATED(false, true, false, false),
   TEST_GENERATED(true, true, false, false),
   RESOURCE(false, false, true, false),
-  TEST_RESOURCE(true, false, true, false);
+  TEST_RESOURCE(true, false, true, false),
+  RESOURCE_GENERATED(false, true, true, false),
+  TEST_RESOURCE_GENERATED(true, true, true, false);
 
   private final boolean isTest;
   private final boolean isGenerated;