mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
eclipse-jps: correct group roots (IDEA-94010)
This commit is contained in:
+15
-2
@@ -197,16 +197,29 @@ public class JpsProjectLoader extends JpsLoaderBase {
|
||||
if (componentRoot == null) return;
|
||||
final Element modules = componentRoot.getChild("modules");
|
||||
List<Future<JpsModule>> futures = new ArrayList<Future<JpsModule>>();
|
||||
final List<String> paths = new ArrayList<String>();
|
||||
final List<String> paths = new ArrayList<String>();
|
||||
final List<String> classpathDirs = new ArrayList<String>();
|
||||
for (Element moduleElement : JDOMUtil.getChildren(modules, "module")) {
|
||||
final String path = moduleElement.getAttributeValue("filepath");
|
||||
final File file = new File(path);
|
||||
if (!file.exists()) {
|
||||
LOG.info("Module '" + FileUtil.getNameWithoutExtension(file) + "' is skipped: " + file.getAbsolutePath() + " doesn't exist");
|
||||
continue;
|
||||
}
|
||||
|
||||
final JpsMacroExpander expander = createModuleMacroExpander(myPathVariables, file);
|
||||
final Element moduleRoot = loadRootElement(file, expander);
|
||||
final String classpathDir = moduleRoot.getAttributeValue(CLASSPATH_DIR_ATTRIBUTE);
|
||||
if (classpathDir != null) {
|
||||
classpathDirs.add(classpathDir);
|
||||
}
|
||||
paths.add(path);
|
||||
}
|
||||
for (final String path : paths) {
|
||||
futures.add(ourThreadPool.submit(new Callable<JpsModule>() {
|
||||
@Override
|
||||
public JpsModule call() throws Exception {
|
||||
return loadModule(path, paths, projectSdkType);
|
||||
return loadModule(path, classpathDirs, projectSdkType);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public class JpsEclipseClasspathSerializer extends JpsModuleClasspathSerializer
|
||||
JpsMacroExpander expander, List<String> paths) {
|
||||
try {
|
||||
final Document document = JDOMUtil.loadDocument(new File(classpathDir, EclipseXml.DOT_CLASSPATH_EXT));
|
||||
final JpsEclipseClasspathReader reader = new JpsEclipseClasspathReader(baseModulePath, paths, new HashSet<String>());
|
||||
final JpsEclipseClasspathReader reader = new JpsEclipseClasspathReader(classpathDir, paths, new HashSet<String>());
|
||||
reader.readClasspath(module, null, document.getRootElement(), expander);//todo
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user