use of org.jetbrains.idea.eclipse.config.EclipseClasspathConverter in project intellij-community by JetBrains.
the class EclipseEmlTest method doLoadModule.
private static Module doLoadModule(@NotNull String path, @NotNull Project project) throws IOException, JDOMException, InvalidDataException {
Module module = WriteAction.compute(() -> ModuleManager.getInstance(project).newModule(path + '/' + EclipseProjectFinder.findProjectName(path) + ModuleManagerImpl.IML_EXTENSION, StdModuleTypes.JAVA.getId()));
replaceRoot(path, EclipseXml.DOT_CLASSPATH_EXT, project);
ModifiableRootModel rootModel = ModuleRootManager.getInstance(module).getModifiableModel();
new EclipseClasspathConverter(module).readClasspath(rootModel);
WriteAction.run(() -> rootModel.commit());
return module;
}
Aggregations