void (@NotNull Object nodePath, @NotNull ChangesBrowserNode<?> subtreeRoot, @NotNull ChangesBrowserNode<?> node) { @NotNull StaticFilePath result; if (nodePath instanceof Change) { result = staticFrom((Change)nodePath); } else if (nodePath instanceof VirtualFile) { result = staticFrom((VirtualFile)nodePath); } else if (nodePath instanceof FilePath) { result = staticFrom((FilePath)nodePath); } else { throw new IllegalArgumentException("Unknown type - " + nodePath.getClass()); } insertChangeNode(result, subtreeRoot, node); }