use of com.intellij.openapi.projectRoots.impl.SimpleProjectRoot in project intellij-community by JetBrains.
the class PythonSdkAdditionalData method savePaths.
private static void savePaths(Element rootElement, Set<SimpleProjectRoot> paths, String root, String element) {
for (SimpleProjectRoot addedPath : paths) {
final Element child = new Element(root);
child.setAttribute(element, addedPath.getUrl());
rootElement.addContent(child);
}
}
use of com.intellij.openapi.projectRoots.impl.SimpleProjectRoot in project intellij-community by JetBrains.
the class PythonSdkAdditionalData method collectPaths.
protected static Set<SimpleProjectRoot> collectPaths(@NotNull List<String> paths) {
final Set<SimpleProjectRoot> files = Sets.newHashSet();
for (String path : paths) {
if (StringUtil.isEmpty(path))
continue;
VirtualFile file = LocalFileSystem.getInstance().findFileByPath(path);
SimpleProjectRoot root;
if (file != null) {
root = new SimpleProjectRoot(file);
} else {
root = new SimpleProjectRoot(path);
}
files.add(root);
}
return files;
}
Aggregations