List<Segment> () { KeptLineFeedsCollector collector = THREAD_LOCAL.get(); if (collector == null) return Collections.emptyList(); THREAD_LOCAL.remove(); List<Segment> segments = ContainerUtil.mapNotNull(collector.myBreaks, range -> range.getRange()); for (SmartPsiFileRange psiFileRange : collector.myBreaks) { SmartPointerManager.getInstance(collector.myPsiFile.getProject()).removePointer(psiFileRange); } return segments; }