nextAfterComments instanceof DartPartStatement ||
nextAfterComments instanceof DartPartOfStatement ||
nextAfterComments instanceof DartImportOrExportStatement) {
if (nextAfterComments.getPrevSibling() instanceof PsiWhiteSpace) nextAfterComments = nextAfterComments.getPrevSibling();
if (nextAfterComments.equals(firstComment)) return null;
final TextRange fileHeaderCommentsRange = new UnfairTextRange(firstComment.getTextOffset(), nextAfterComments.getTextOffset());
if (fileHeaderCommentsRange.getLength() > 1 &&
document.getLineNumber(fileHeaderCommentsRange.getEndOffset()) >
document.getLineNumber(fileHeaderCommentsRange.getStartOffset())) {
if (!containsCustomRegionMarker) {
descriptors.add(new FoldingDescriptor(dartFile, fileHeaderCommentsRange));
}
return fileHeaderCommentsRange;
}