mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-152867 Gradle window takes more than a minute to open
This commit is contained in:
+20
-1
@@ -243,7 +243,26 @@ public class ExternalSystemViewDefaultContributor extends ExternalSystemViewCont
|
||||
return order1 < order2 ? -1 : 1;
|
||||
}
|
||||
}
|
||||
return super.compareTo(node);
|
||||
|
||||
String dependencyName = getDependencySimpleName(this);
|
||||
String thatDependencyName = getDependencySimpleName(node);
|
||||
return StringUtil.compare(dependencyName, thatDependencyName, true);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static String getDependencySimpleName(@NotNull ExternalSystemNode node) {
|
||||
Object thatData = node.getData();
|
||||
if (thatData instanceof LibraryDependencyData) {
|
||||
LibraryDependencyData dependencyData = (LibraryDependencyData)thatData;
|
||||
String externalName = dependencyData.getExternalName();
|
||||
if (StringUtil.isEmpty(externalName)) {
|
||||
Set<String> paths = dependencyData.getTarget().getPaths(LibraryPathType.BINARY);
|
||||
if (paths.size() == 1) {
|
||||
return new File(paths.iterator().next()).getName();
|
||||
}
|
||||
}
|
||||
}
|
||||
return node.getName();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user