int (@NotNull VirtualFile file1, @NotNull VirtualFile file2) { int res1 = myScope1.compare(file1, file2); int res2 = myScope2.compare(file1, file2); if (res1 == 0) return res2; if (res2 == 0) return res1; if (res1 > 0 == res2 > 0) return res1; return 0; }