TreePath (@NotNull TreePath path) { TreePath current = path; while (current != null && !myPath2Value.containsKey(current)) { current = current.getParentPath(); } return current != null ? current : path; }