mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[Workspace Model] Fix JPS compilation
GitOrigin-RevId: 9a5705bcc746fc854557546ed2bc841ef55fcffe
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e4d31e9c41
commit
d304f3d5d2
@@ -45,6 +45,7 @@ import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.jetbrains.jps.model.serialization.java.compiler.JpsJavaCompilerConfigurationSerializer.BYTECODE_TARGET_LEVEL;
|
||||
|
||||
@@ -398,6 +399,16 @@ public final class JpsProjectLoader extends JpsLoaderBase {
|
||||
if (data == null) {
|
||||
LOG.info("Module '" + getModuleName(file) + "' is skipped: " + file.toAbsolutePath() + " doesn't exist");
|
||||
}
|
||||
else {
|
||||
// Copy the content roots that are defined in a separate tag, to a general content root component
|
||||
List<Element> components = data.getChildren("component");
|
||||
Map<String, Element> componentsByName = components.stream().collect(Collectors.toMap(o -> o.getAttributeValue("name"), v -> v));
|
||||
Element rootManager = componentsByName.get("NewModuleRootManager");
|
||||
Element additionalElements = componentsByName.get("AdditionalModuleElements");
|
||||
if (rootManager != null && additionalElements != null) {
|
||||
JDOMUtil.deepMerge(rootManager, additionalElements);
|
||||
}
|
||||
}
|
||||
|
||||
return new Pair<>(file, data);
|
||||
}, executor));
|
||||
|
||||
Reference in New Issue
Block a user