mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
eclipse: sort by project name to ease import (IDEA-67184)
This commit is contained in:
@@ -102,6 +102,14 @@ public class EclipseImportBuilder extends ProjectImportBuilder<String> implement
|
||||
public void run(@NotNull ProgressIndicator indicator) {
|
||||
final ArrayList<String> roots = new ArrayList<String>();
|
||||
EclipseProjectFinder.findModuleRoots(roots, path);
|
||||
Collections.sort(roots, new Comparator<String>() {
|
||||
@Override
|
||||
public int compare(String path1, String path2) {
|
||||
final String projectName1 = EclipseProjectFinder.findProjectName(path1);
|
||||
final String projectName2 = EclipseProjectFinder.findProjectName(path2);
|
||||
return projectName1 != null && projectName2 != null ? projectName1.compareToIgnoreCase(projectName2) : 0;
|
||||
}
|
||||
});
|
||||
getParameters().workspace = roots;
|
||||
getParameters().root = path;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user