use of org.jetbrains.idea.eclipse.config.EclipseModuleManagerImpl in project intellij-community by JetBrains.
the class EclipseClasspathReader method readClasspath.
public void readClasspath(@NotNull ModifiableRootModel model, @NotNull Collection<String> unknownLibraries, @NotNull Collection<String> unknownJdks, Set<String> refsToModules, final String testPattern, Element classpathElement) throws IOException, ConversionException {
for (OrderEntry orderEntry : model.getOrderEntries()) {
if (!(orderEntry instanceof ModuleSourceOrderEntry)) {
model.removeOrderEntry(orderEntry);
}
}
int idx = 0;
EclipseModuleManagerImpl eclipseModuleManager = EclipseModuleManagerImpl.getInstance(model.getModule());
Set<String> libs = new THashSet<>();
for (Element o : classpathElement.getChildren(EclipseXml.CLASSPATHENTRY_TAG)) {
try {
readClasspathEntry(model, unknownLibraries, unknownJdks, refsToModules, testPattern, o, idx++, eclipseModuleManager, ((BasePathMacroManager) PathMacroManager.getInstance(model.getModule())).getExpandMacroMap(), libs);
} catch (ConversionException e) {
ErrorLog.rethrow(ErrorLog.Level.Warning, null, EclipseXml.CLASSPATH_FILE, e);
}
}
if (!model.isSdkInherited() && model.getSdkName() == null) {
eclipseModuleManager.setForceConfigureJDK();
model.inheritSdk();
}
}
Aggregations