| 1 | #nullable enable |
| 2 | |
| 3 | namespace CascadeIDE.Features.WorkspaceNavigation.Presentation; |
| 4 | |
| 5 | public sealed class WorkspaceReverseAnchorItemVm |
| 6 | { |
| 7 | public required string DocPath { get; init; } |
| 8 | |
| 9 | public required string DisplayTitle { get; init; } |
| 10 | |
| 11 | public required string Excerpt { get; init; } |
| 12 | |
| 13 | public required string Provenance { get; init; } |
| 14 | |
| 15 | public int? DocLineHint { get; init; } |
| 16 | |
| 17 | public string DisplayLine |
| 18 | { |
| 19 | get |
| 20 | { |
| 21 | var line = DocLineHint is > 0 ? $" (line ~{DocLineHint})" : ""; |
| 22 | var prov = string.IsNullOrWhiteSpace(Provenance) ? "" : $" [{Provenance}]"; |
| 23 | var excerpt = string.IsNullOrWhiteSpace(Excerpt) ? "" : $" — «{Excerpt}»"; |
| 24 | return $"{DisplayTitle}{line}{excerpt}{prov}"; |
| 25 | } |
| 26 | } |
| 27 | } |
| 28 | |
View only · write via MCP/CIDE