mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inspection tool window: dead code removed
This commit is contained in:
-15
@@ -173,26 +173,11 @@ public class InspectionResultsViewComparator implements Comparator {
|
||||
return entity2 != null ? 1 : 0;
|
||||
}
|
||||
|
||||
private static int compareLineNumbers(final Object userObject, final OfflineProblemDescriptor descriptor) {
|
||||
if (userObject instanceof RefElement) {
|
||||
final RefElement refElement = (RefElement)userObject;
|
||||
final PsiElement psiElement = refElement.getElement();
|
||||
if (psiElement != null) {
|
||||
Document document = PsiDocumentManager.getInstance(psiElement.getProject()).getDocument(psiElement.getContainingFile());
|
||||
if (document != null) {
|
||||
return descriptor.getLine() - document.getLineNumber(psiElement.getTextOffset()) -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
private static class InspectionResultsViewComparatorHolder {
|
||||
private static final InspectionResultsViewComparator ourInstance = new InspectionResultsViewComparator();
|
||||
}
|
||||
|
||||
public static InspectionResultsViewComparator getInstance() {
|
||||
|
||||
return InspectionResultsViewComparatorHolder.ourInstance;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user