mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-89456 - IAE: CleanupInspectionIntention.applyFixes
This commit is contained in:
+6
-1
@@ -31,6 +31,7 @@ import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.progress.EmptyProgressIndicator;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.util.PsiUtilCore;
|
||||
@@ -97,7 +98,11 @@ public class CleanupInspectionIntention implements IntentionAction, HighPriority
|
||||
Collections.sort(descriptions, (o1, o2) -> {
|
||||
final ProblemDescriptorBase d1 = (ProblemDescriptorBase)o1;
|
||||
final ProblemDescriptorBase d2 = (ProblemDescriptorBase)o2;
|
||||
return -PsiUtilCore.compareElementsByPosition(d1.getPsiElement(), d2.getPsiElement());
|
||||
final int elementsDiff = PsiUtilCore.compareElementsByPosition(d1.getPsiElement(), d2.getPsiElement());
|
||||
if (elementsDiff == 0) {
|
||||
return Comparing.compare(d1.getDescriptionTemplate(), d2.getDescriptionTemplate());
|
||||
}
|
||||
return -elementsDiff;
|
||||
});
|
||||
|
||||
final SequentialModalProgressTask progressTask =
|
||||
|
||||
Reference in New Issue
Block a user