Description
The new Nextflow webview includes sections for Workflows and Processes. They are currently populated by scanning the workspace for Nextflow scripts.
To ensure a consistent user experience with the rest of the editor UI, these views should use the language server as much as possible rather than going through the filesystem.
The required information is similar to "call hierarchy" in the LSP, but we'll likely need a custom language server command e.g. nextflow.server.workflowTree
:
- Get the list of all Nextflow scripts in the workspace
- Get the list of process and workflow definitions for each script
- Get the list of process/workflow calls for each workflow definition
- Build workflow tree (can be done by server or client)
The top-level nodes of the tree should be the entry workflows, then go from there.
Step (3) might be expensive for a large pipeline, so we might need to lazy load these. In this case it can be enough to simply retrieve the entry workflows and use the callHierarchy LSP request to lazy load callees.
The "Workflows" and "Processes" views can probably be combined into a single view with the tree view / list view variants. Then we can also show nf-tests for workflows.