Compare commits

...
3 Commits
Author SHA1 Message Date
maxandClaude Fable 5.1 d61e018348 Panel view is the default
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169iPWwKHZoBTNN9qwXiwqk
2026-09-08 19:01:50 +02:00
maxandClaude Fable 5.1 23d9ba1fc9 Read and write badges as a matched coloured pair
Info hue for read, warning hue for write, both as tints. Read no longer
looks disabled next to write's alert box.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169iPWwKHZoBTNN9qwXiwqk
2026-09-08 18:59:33 +02:00
maxandClaude Fable 5.1 742788efa3 Opaque panel header and toolbar; explain empty results
The theme's table header colour is a translucent tint, so rows scrolling
underneath made the column bar unreadable. Paint it over the solid
editor background. An empty search now asks the .NET Solution Launcher
which projects the language server loaded and says so, with a reload
button, instead of a bare "No references found".

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169iPWwKHZoBTNN9qwXiwqk
2026-09-08 18:53:22 +02:00
4 changed files with 72 additions and 11 deletions
+10 -3
View File
@@ -2,7 +2,7 @@
Find All References results shown the way Visual Studio does it — in two views.
**Editor view** (default) writes the results into a read-only virtual document in the *same language as your
**Editor view** writes the results into a read-only virtual document in the *same language as your
source file*, so your theme colors every line for free — including identifiers, because the semantic tokens
are fetched from the real source files and relocated into the results (see *Semantic tokens* below). File
headers show the containing project
@@ -10,7 +10,7 @@ headers show the containing project
highlighted like search matches; **writes are bold** on the theme's stronger write-occurrence background, the
same colour the editor itself uses for a write.
**Panel view** shows the same results as a table with resizable, sortable columns — Code, File, Line, Kind,
**Panel view** (default) shows the same results as a table with resizable, sortable columns — Code, File, Line, Kind,
Project and Containing member — grouped by file, with a text filter plus filters for reads/writes, project and
test code. By default it docks in the **bottom panel**
alongside Terminal and Problems, where a wide, short table reads best; you can drag it to either side bar,
@@ -65,9 +65,16 @@ nothing waits on it. The panel gets the same token *types* but paints them from
webview is not given the themes token colours. Set `coloredReferences.semanticTokens` to `false` for
grammar-only colouring; results spanning more than 40 files skip it.
## When nothing is found
"No references" can mean the language server never indexed the project. If the
*.NET Solution Launcher* extension is installed, an empty result asks it which projects
DotRush has loaded and says so — "the language server has not loaded MyGame.Runtime" —
with a *Reload Workspace* button, instead of a plain "No references found".
## Settings
- `coloredReferences.view` — which view `Find All References (Colored)` opens: `document` (default) or `panel`
- `coloredReferences.view` — which view `Find All References (Colored)` opens: `panel` (default) or `document`
- `coloredReferences.panelLocation` — where the panel opens: `bottom` (default, docked next to Terminal /
Problems and draggable to a side bar), `beside` (editor group to the side), or `below` (editor group
underneath, so the table is wide and short)
+21 -6
View File
@@ -40,6 +40,8 @@ body {
padding: 4px 8px;
border-bottom: 1px solid var(--vscode-panel-border, transparent);
flex: 0 0 auto;
/* Solid: rows scroll underneath, and a see-through bar over code is unreadable. */
background: var(--vscode-editor-background);
}
#summary {
@@ -112,7 +114,12 @@ body {
display: grid;
grid-template-columns: var(--grid);
height: var(--header-height);
background: var(--vscode-keybindingTable-headerBackground, var(--vscode-editor-background));
/* The theme's header colour is usually a translucent tint, so it is painted over the
solid editor background; otherwise rows scrolling underneath show through it. */
background-color: var(--vscode-editor-background);
background-image: linear-gradient(
var(--vscode-keybindingTable-headerBackground, transparent),
var(--vscode-keybindingTable-headerBackground, transparent));
border-bottom: 1px solid var(--vscode-panel-border, var(--vscode-editorWidget-border));
user-select: none;
}
@@ -335,15 +342,23 @@ body.resizing {
text-overflow: ellipsis;
}
/* Read and write are a pair, so they get the same treatment: the theme's info and
warning hues, tinted for the background and border so both stay readable on any
theme. Before, write was an alert box and read a greyed-out label, which made read
look disabled rather than merely "not a write". */
.kind-read {
color: var(--vscode-descriptionForeground);
background: var(--vscode-badge-background);
--kind-hue: var(--vscode-editorInfo-foreground, var(--vscode-textLink-foreground));
}
.kind-write {
color: var(--vscode-inputValidation-warningForeground, var(--vscode-foreground));
background: var(--vscode-inputValidation-warningBackground);
border-color: var(--vscode-inputValidation-warningBorder, transparent);
--kind-hue: var(--vscode-editorWarning-foreground, var(--vscode-charts-orange));
}
.kind-read,
.kind-write {
color: var(--kind-hue);
background: color-mix(in srgb, var(--kind-hue) 16%, transparent);
border-color: color-mix(in srgb, var(--kind-hue) 45%, transparent);
}
/* --- filters popover ---------------------------------------------------- */
+1 -1
View File
@@ -143,7 +143,7 @@
"A read-only editor pane in the same language as the source, coloured by your theme.",
"A webview panel with resizable, sortable columns and a containing-member column."
],
"default": "document",
"default": "panel",
"description": "Which view Find All References (Colored) opens."
},
"coloredReferences.panelLocation": {
+40 -1
View File
@@ -276,12 +276,51 @@ interface SearchTarget {
view?: View;
}
/** Shape of the launcher's `dotnetSolution.languageServerStatus` answer. */
interface LanguageServerStatus {
loaded: string[];
missing: string[];
foreign: string[];
unavailable: boolean;
}
/**
* "No references" means one of two things: there are none, or the language server never
* indexed the project. The .NET Solution Launcher, when installed, knows which projects
* DotRush reported loaded; ask it so the second case is not mistaken for the first.
*/
async function explainEmptyResult(symbol: string): Promise<void> {
let status: LanguageServerStatus | undefined;
try {
const commands = await vscode.commands.getCommands(true);
if (commands.includes('dotnetSolution.languageServerStatus')) {
status = await vscode.commands.executeCommand<LanguageServerStatus>('dotnetSolution.languageServerStatus');
}
} catch {
status = undefined;
}
if (!status || status.unavailable || (status.missing.length === 0 && status.foreign.length === 0)) {
vscode.window.setStatusBarMessage(`No references found for '${symbol}'`, 4000);
return;
}
const why = status.missing.length
? `the language server has not loaded ${status.missing.join(', ')}`
: `the language server loaded projects outside this solution (${status.foreign.join(', ')})`;
const choice = await vscode.window.showWarningMessage(
`No references found for '${symbol}' — ${why}.`, 'Reload Workspace', 'Show Status');
if (choice === 'Reload Workspace') {
await vscode.commands.executeCommand('dotnetSolution.languageServerReload');
} else if (choice === 'Show Status') {
await vscode.commands.executeCommand('dotnetSolution.languageServerMenu');
}
}
async function runSearch(
origin: Origin, languageId: string, symbol: string, target: SearchTarget = {},
): Promise<void> {
const locations = await findReferences(origin, symbol);
if (locations.length === 0) {
vscode.window.setStatusBarMessage(`No references found for '${symbol}'`, 4000);
await explainEmptyResult(symbol);
return;
}