DefaultTreeModel (boolean forcePrepareCaches) { TreeUtil.sort(myModel, BROWSER_NODE_COMPARATOR); collapseDirectories(myModel, myRoot); if (myProject != null && !ApplicationManager.getApplication().isDispatchThread()) { // Pre-fill background colors for small trees to reduce blinking if (!TreeUtil.hasManyNodes(myRoot, 1000) || forcePrepareCaches) { //noinspection deprecation ReadAction.nonBlocking(() -> { precalculateFileColors(myProject, myRoot); }).executeSynchronously(); } } myModel.nodeStructureChanged((TreeNode)myModel.getRoot()); return myModel; }