mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[test fw] allow to specify source root type
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,6 +37,8 @@ import com.intellij.util.indexing.FileBasedIndex;
|
||||
import com.intellij.util.indexing.IndexableFileSet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jps.model.java.JavaSourceRootType;
|
||||
import org.jetbrains.jps.model.module.JpsModuleSourceRootType;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -129,12 +131,17 @@ public class LightProjectDescriptor {
|
||||
}
|
||||
|
||||
ContentEntry contentEntry = model.addContentEntry(srcRoot);
|
||||
contentEntry.addSourceFolder(srcRoot, false);
|
||||
contentEntry.addSourceFolder(srcRoot, getSourceRootType());
|
||||
|
||||
configureModule(module, model, contentEntry);
|
||||
});
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected JpsModuleSourceRootType<?> getSourceRootType() {
|
||||
return JavaSourceRootType.SOURCE;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Sdk getSdk() {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user