use of org.jetbrains.idea.eclipse.conversion.IdeaSpecificSettings in project intellij-community by JetBrains.
the class EclipseClasspathConverter method readClasspath.
@Override
public void readClasspath(@NotNull ModifiableRootModel model) throws IOException {
try {
CachedXmlDocumentSet fileSet = getFileSet();
String path = fileSet.getParent(EclipseXml.PROJECT_FILE);
Element classpath = null;
if (!fileSet.exists(EclipseXml.PROJECT_FILE)) {
classpath = fileSet.load(EclipseXml.CLASSPATH_FILE, false);
if (classpath == null) {
return;
}
path = fileSet.getParent(EclipseXml.CLASSPATH_FILE);
}
EclipseClasspathReader classpathReader = new EclipseClasspathReader(path, module.getProject(), null);
classpathReader.init(model);
if (classpath == null) {
classpath = fileSet.load(EclipseXml.CLASSPATH_FILE, false);
}
if (classpath == null) {
EclipseClasspathReader.setOutputUrl(model, path + "/bin");
} else {
classpathReader.readClasspath(model, classpath);
}
Element eml = fileSet.load(model.getModule().getName() + EclipseXml.IDEA_SETTINGS_POSTFIX, false);
if (eml == null) {
model.getModuleExtension(CompilerModuleExtension.class).setExcludeOutput(false);
} else {
new IdeaSpecificSettings().readIdeaSpecific(eml, model, null, null);
}
} catch (JDOMException e) {
throw new IOException(e);
}
}
Aggregations