llvm-project/lldb/tools/lldb-dap/src-ts/ui/symbols-webview-html.ts
Ely Ronnen 8b64cd8be2
[lldb-dap] Add module symbol table viewer to VS Code extension #140626 (#153836)
- VS Code extension:
- Add module symbol table viewer using
[Tabulator](https://tabulator.info/) for sorting and formatting rows.
  - Add context menu action to the modules tree.
 - lldb-dap
   -  Add `DAPGetModuleSymbolsRequest` to get symbols from a module.
 
Fixes #140626

[Screencast From 2025-08-15
19-12-33.webm](https://github.com/user-attachments/assets/75e2f229-ac82-487c-812e-3ea33a575b70)
2025-08-21 00:31:48 +02:00

51 lines
1.4 KiB
TypeScript

import * as vscode from "vscode";
export function getSymbolsTableHTMLContent(tabulatorJsPath: vscode.Uri, tabulatorCssPath: vscode.Uri, symbolsTableScriptPath: vscode.Uri): string {
return `<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link href="${tabulatorCssPath}" rel="stylesheet">
<style>
.tabulator {
background-color: var(--vscode-editor-background);
color: var(--vscode-editor-foreground);
}
.tabulator .tabulator-header .tabulator-col {
background-color: var(--vscode-editor-background);
color: var(--vscode-editor-foreground);
}
.tabulator-row {
background-color: var(--vscode-editor-background);
color: var(--vscode-editor-foreground);
}
.tabulator-row.tabulator-row-even {
background-color: var(--vscode-editor-background);
color: var(--vscode-editor-foreground);
}
.tabulator-row.tabulator-selected {
background-color: var(--vscode-editor-background);
color: var(--vscode-editor-foreground);
}
.tabulator-cell {
text-overflow: clip !important;
}
#symbols-table {
width: 100%;
height: 100vh;
}
</style>
</head>
<body>
<div id="symbols-table"></div>
<script src="${tabulatorJsPath}"></script>
<script src="${symbolsTableScriptPath}"></script>
</body>
</html>`;
}