mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-36519 - IAE: RefactoringUtil.sortDepthFirstRightLeftOrder
This commit is contained in:
@@ -175,7 +175,11 @@ public class RefactoringUtil {
|
||||
public int compare(final UsageInfo usage1, final UsageInfo usage2) {
|
||||
final PsiElement element1 = usage1.getElement();
|
||||
final PsiElement element2 = usage2.getElement();
|
||||
if (element1 == null || element2 == null) return 0;
|
||||
if (element1 == null) {
|
||||
if (element2 == null) return 0;
|
||||
return 1;
|
||||
}
|
||||
if (element2 == null) return -1;
|
||||
return element2.getTextRange().getStartOffset() - element1.getTextRange().getStartOffset();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user