void () { final Value value = descriptor.getValue(); ApplicationManager.getApplication().invokeLater(() -> { final Object key = value == null ? NULL_MARKER : value; List<TraceElement> elements = key2TraceElements.get(key); final int nextIndex = key2Index.getOrDefault(key, -1) + 1; if (elements != null && nextIndex < elements.size()) { final TraceElement element = elements.get(nextIndex); myValue2Path.put(element, node.getPath()); myPath2Value.put(node.getPath(), element); key2Index.put(key, nextIndex); } if (myPath2Value.size() == traceElements.size()) { CollectionTree.this.removeTreeListener(listener); ApplicationManager.getApplication().invokeLater(CollectionTree.this::repaint); } }); }