Dock the results table in the bottom panel

createWebviewPanel only ever lives in the editor area, so the table could
not be dragged next to Terminal / Problems. A WebviewView can, and it can
also be dragged to either side bar.

- Extract ResultsView: the table's html, messaging, row building and
  navigation, independent of what hosts the webview. ReferencePanel keeps
  hosting it in an editor group; ReferenceViewProvider hosts it in a
  contributed panel view container. Results that arrive before the docked
  view has been resolved are queued and applied on resolve.
- coloredReferences.panelLocation selects the placement: bottom (default),
  beside, or below. "below" makes the editor row first so the table is wide
  and short, which suits the column layout better than a tall narrow group.
- sourceColumn() now ignores editors with no view column, so opening a
  reference from the docked view lands in a real editor group.
- toggleView and the refresh button work from either host.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
max
2026-09-07 16:23:02 +02:00
co-authored by Claude Opus 5
parent 2398b6b2ce
commit 92ff02f7ff
5 changed files with 312 additions and 81 deletions
+39 -3
View File
@@ -18,7 +18,9 @@
"dotnet",
"visual studio"
],
"activationEvents": [],
"activationEvents": [
"onView:coloredReferences.resultsView"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
@@ -75,7 +77,7 @@
"command": "coloredReferences.toggleView",
"key": "ctrl+alt+shift+f12",
"mac": "cmd+alt+shift+f12",
"when": "resourceScheme == colored-refs || activeWebviewPanelId == coloredReferences.results"
"when": "resourceScheme == colored-refs || activeWebviewPanelId == coloredReferences.results || view == coloredReferences.resultsView"
}
],
"menus": {
@@ -109,7 +111,7 @@
},
{
"command": "coloredReferences.toggleView",
"when": "resourceScheme == colored-refs || activeWebviewPanelId == coloredReferences.results"
"when": "resourceScheme == colored-refs || activeWebviewPanelId == coloredReferences.results || view == coloredReferences.resultsView"
}
]
},
@@ -143,8 +145,42 @@
],
"default": "document",
"description": "Which view Find All References (Colored) opens."
},
"coloredReferences.panelLocation": {
"type": "string",
"enum": [
"bottom",
"beside",
"below"
],
"enumDescriptions": [
"Dock the results table in the bottom panel, beside Terminal and Problems. Drag it to a side bar if you prefer.",
"Open the results table in an editor group beside the current one.",
"Open the results table in an editor group below the current one, so it is wide and short."
],
"default": "bottom",
"description": "Where the results panel opens."
}
}
},
"viewsContainers": {
"panel": [
{
"id": "coloredReferences",
"title": "References",
"icon": "media/references-dark.svg"
}
]
},
"views": {
"coloredReferences": [
{
"id": "coloredReferences.resultsView",
"name": "References",
"type": "webview",
"contextualTitle": "References"
}
]
}
},
"scripts": {