eclipse-jps: correct group roots (IDEA-94010)

This commit is contained in:
anna
2012-10-31 21:10:45 +01:00
parent da83104b4f
commit d7fbdec07a
2 changed files with 16 additions and 3 deletions
@@ -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);
}
}));
}
@@ -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) {