@NotNull final PsiElement root,
@NotNull final Document document,
final boolean quick) {
if (!(root instanceof DartFile)) return;
final TextRange fileHeaderRange = foldFileHeader(descriptors, (DartFile)root, document); // 1. File header
foldImportExportStatements(descriptors, (DartFile)root); // 2. Import and export statements
Collection<PsiElement> psiElements = PsiTreeUtil.collectElementsOfType(root, new Class[]{DartTypeArguments.class, PsiComment.class});
foldComments(descriptors, psiElements, fileHeaderRange); // 3. Comments and comment sequences
foldClassBodies(descriptors, (DartFile)root); // 4. Class body
foldFunctionBodies(descriptors, root); // 5. Function body