public async revealPaths()

in src/views/projectNode.ts [25:53]


    public async revealPaths(paths: INodeData[]): Promise<DataNode | undefined> {
        if (!this.uri) {
            return undefined;
        }

        if (workspace.getWorkspaceFolder(Uri.parse(this.uri))) {
            return super.revealPaths(paths);
        }

        // invisible project uri is not contained in workspace
        const childNodeData = paths[0];
        const children: ExplorerNode[] = await this.getChildren();
        if (!children) {
            return undefined;
        }

        const childNode = <DataNode>children.find((child: DataNode) => {
            if (child instanceof HierarchicalPackageNode) {
                return childNodeData.name.startsWith(child.nodeData.name + ".") || childNodeData.name === child.nodeData.name;
            }
            return child.nodeData.name === childNodeData.name && child.path === childNodeData.path;
        });

        // don't shift when child node is an hierarchical node, or it may lose data of package node
        if (!(childNode instanceof HierarchicalPackageNode)) {
            paths.shift();
        }
        return (childNode && paths.length > 0) ? childNode.revealPaths(paths) : childNode;
    }