TreeModelBuilder (@Nullable Collection<? extends LocallyDeletedChange> locallyDeletedChanges) { if (ContainerUtil.isEmpty(locallyDeletedChanges)) return this; ChangesBrowserNode<?> subtreeRoot = createTagNode(ChangesBrowserNode.LOCALLY_DELETED_NODE_TAG); for (LocallyDeletedChange change : sorted(locallyDeletedChanges, comparing(LocallyDeletedChange::getPath, PATH_COMPARATOR))) { insertChangeNode(change.getPath(), subtreeRoot, ChangesBrowserNode.createLocallyDeleted(change)); } return this; }