Skip to content

Highlight the active file in the project view - #120

Merged
bentsherman merged 5 commits into
mainfrom
file-highlight
Sep 15, 2026
Merged

bentsherman merged 5 commits into
mainfrom
file-highlight

Conversation

@MythicalFish

@MythicalFish MythicalFish commented May 1, 2025

Copy link
Copy Markdown
Contributor

Highlights the processes and workflows defined in the file currently open in the editor, in both the list and tree views of the project sidebar.

Reimplemented on current main — the original branch targeted webview-ui/, which no longer exists.

  • WebviewProvider.postActiveFile() posts the active editor's path (or null for a non-Nextflow file) to the project webview. It is called on onDidChangeActiveTextEditor and from initViewData, so the highlight is also correct after a webview reload.
  • isNextflowFile moved to src/webview/utils.ts so both the provider and activateWebview can use it.
  • The webview tracks activeFile in WorkspaceProvider; FileItem and FileNode compare it against node.path and apply --vscode-list-inactiveSelectionBackground.

Dropped from the original: the fileOpenedfileSelected telemetry rename, the unused reloadView(), the stray console.log, and workspaceState persistence (reading window.activeTextEditor on init is simpler and cannot go stale).

Processes and workflows defined in the file open in the editor are
highlighted in both the list and tree views. The extension posts the
active file on editor change and on view init, so the highlight also
survives the webview being reloaded.
@bentsherman bentsherman changed the title File selection/highlight Highlight the active file in the project view Sep 15, 2026
@bentsherman
bentsherman marked this pull request as ready for review September 15, 2026 21:24
@bentsherman
bentsherman merged commit cd96e26 into main Sep 15, 2026
3 checks passed
@bentsherman
bentsherman deleted the file-highlight branch September 15, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants