mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 13:02:30 +07:00
[fleet] [python] FL-28940 Inherit source folder entity sources
This is important because Fleet backend entity sources should all be external GitOrigin-RevId: 52fe22a004d998f16a2f03be9486cdeb098a4f27
This commit is contained in:
committed by
intellij-monorepo-bot
parent
adbb319537
commit
174d8e6979
@@ -53,6 +53,7 @@ import com.jetbrains.python.psi.types.*;
|
||||
import com.jetbrains.python.pyi.PyiStubSuppressor;
|
||||
import one.util.streamex.StreamEx;
|
||||
import org.jetbrains.annotations.*;
|
||||
import org.jetbrains.jps.model.java.JavaSourceRootType;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.io.File;
|
||||
@@ -1059,13 +1060,13 @@ public final class PyUtil {
|
||||
for (ContentEntry entry : model.getContentEntries()) {
|
||||
final VirtualFile file = entry.getFile();
|
||||
if (file != null && VfsUtilCore.isAncestor(file, root, true)) {
|
||||
entry.addSourceFolder(root, false);
|
||||
entry.addSourceFolder(root.getUrl(), JavaSourceRootType.SOURCE, true);
|
||||
added = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!added) {
|
||||
model.addContentEntry(root).addSourceFolder(root, false);
|
||||
model.addContentEntry(root).addSourceFolder(root.getUrl(), JavaSourceRootType.SOURCE, true);
|
||||
}
|
||||
}
|
||||
model.commit();
|
||||
|
||||
Reference in New Issue
Block a user