plugin descriptor: add classes from production to PluginClassLoader iff corresponding option is on

DEA-CR-60974

GitOrigin-RevId: 9b1ad155e25d6fb2e12973211d54c2f585733ae2
This commit is contained in:
Anna Kozlova
2020-04-01 12:31:42 +00:00
committed by intellij-monorepo-bot
parent c933c60b50
commit dd3433cd18
@@ -855,14 +855,21 @@ public final class IdeaPluginDescriptorImpl implements IdeaPluginDescriptor, Plu
}
List<Path> result = new ArrayList<>();
Path productionDirectory = myPath.getParent();
if (productionDirectory.endsWith("production")) {
result.add(myPath);
String moduleName = myPath.toFile().getName();
String[] additionalPaths = ourAdditionalLayoutMap.get(moduleName);
if (additionalPaths != null) {
for (String path : additionalPaths) {
result.add(productionDirectory.resolve(path));
Path classesDir = myPath.resolve("classes");
if (Files.exists(classesDir)) {
result.add(classesDir);
}
if (PluginManagerCore.usePluginClassLoader) {
Path productionDirectory = myPath.getParent();
if (productionDirectory.endsWith("production")) {
result.add(myPath);
String moduleName = myPath.toFile().getName();
String[] additionalPaths = ourAdditionalLayoutMap.get(moduleName);
if (additionalPaths != null) {
for (String path : additionalPaths) {
result.add(productionDirectory.resolve(path));
}
}
}
}