Collection<SliceNode> () { if (isUpToDate()) return myCachedChildren == null ? Collections.emptyList() : myCachedChildren; try { List<SliceNode> nodes; ProgressIndicator current = ProgressManager.getInstance().getProgressIndicator(); if (current == null) { ProgressIndicator indicator = new ProgressIndicatorBase(); Ref<List<SliceNode>> nodesRef = Ref.create(); ProgressManager.getInstance().runProcess(() -> nodesRef.set(doGetChildren()), indicator); nodes = nodesRef.get(); } else { nodes = doGetChildren(); } synchronized (nodes) { if (myCachedChildren != null) { nodes = myCachedChildren; } else { myCachedChildren = nodes; } } return nodes; } catch (ProcessCanceledException pce) { changed = true; throw pce; } }