void (@NotNull final SliceNode element) { element.calculateDupNode(); node(element, map).clear(); SliceNode duplicate = element.getDuplicate(); if (duplicate != null) { node(element, map).addAll(node(duplicate, map)); } else { ApplicationManager.getApplication().runReadAction(() -> { final SliceUsage sliceUsage = element.getValue(); Collection<SliceNode> children = element.getChildren(); if (printToLog) { LOG.trace(StringUtil.repeat(" ", Math.max(depth.get(), 0)) + "analyzing usages of " + sliceUsage + " (in " + (sliceUsage == null ? "null" : sliceUsage.getFile().getName() + ":" + sliceUsage.getLine()) + ")"); } if (children.isEmpty() && sliceUsage != null && sliceUsage.canBeLeaf()) { PsiElement value = sliceUsage.getElement(); if (value != null) { node(element, map).add(value); } } }); super.visit(element); } }