{"id":47908518,"url":"https://github.com/aiekick/CMakeGraph","last_synced_at":"2026-04-04T05:01:53.641Z","repository":{"id":341228929,"uuid":"1164268195","full_name":"aiekick/CMakeGraph","owner":"aiekick","description":"vsCode CMake extension who is using CMake only and add many cool features","archived":false,"fork":false,"pushed_at":"2026-03-16T18:23:27.000Z","size":756,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-17T05:14:12.798Z","etag":null,"topics":["2d","3d","cmake","dependencies","graph","impacted","outline","sourcegroups","targets","vscode"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=aiekick.cmakegraph","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aiekick.png","metadata":{"files":{"readme":"readme-dev.md","changelog":"changelog.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"aiekick"}},"created_at":"2026-02-22T21:56:22.000Z","updated_at":"2026-03-16T18:23:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/aiekick/CMakeGraph","commit_stats":null,"previous_names":["aiekick/cmakegraph"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aiekick/CMakeGraph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiekick%2FCMakeGraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiekick%2FCMakeGraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiekick%2FCMakeGraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiekick%2FCMakeGraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aiekick","download_url":"https://codeload.github.com/aiekick/CMakeGraph/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiekick%2FCMakeGraph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31388169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2d","3d","cmake","dependencies","graph","impacted","outline","sourcegroups","targets","vscode"],"created_at":"2026-04-04T05:01:51.217Z","updated_at":"2026-04-04T05:01:53.634Z","avatar_url":"https://github.com/aiekick.png","language":"TypeScript","funding_links":["https://github.com/sponsors/aiekick"],"categories":[],"sub_categories":[],"readme":"# CMakeGraph -- Developer Guide\n\nThis document describes the internal architecture of CMakeGraph and the procedures for developing, debugging and packaging the extension.\n\n## Prerequisites\n\n- [Node.js](https://nodejs.org/) \u003e= 18\n- [Visual Studio Code](https://code.visualstudio.com/) \u003e= 1.80.0\n- (optional) [`vsce`](https://github.com/microsoft/vscode-vsce) for packaging via the standard method\n\n```bash\nnpm install -g @vscode/vsce\n```\n\n## Getting Started\n\n```bash\ngit clone https://github.com/aiekick/vscmake.git\ncd vscmake\nnpm install --save-dev typescript @types/vscode --ignore-scripts\n```\n\n## Available Scripts\n\n| Script | Command | Purpose |\n|--------|---------|---------|\n| `npm run compile` | `tsc -p ./` | Compile TypeScript to `out/` (development) |\n| `npm run watch` | `tsc -watch -p ./` | Continuous compilation on save |\n| `npm run check` | `tsc --noEmit` | Type-check without emitting files |\n| `npm run package` | `rm -rf out \u0026\u0026 node ./scripts/esbuild.js \u0026\u0026 node ./scripts/package.js` | Bundle with esbuild and produce VSIX |\n\n## Running \u0026 Debugging in VS Code\n\nThe project ships with `.vscode/launch.json` and `.vscode/tasks.json` pre-configured.\n\n1. Open the project folder in VS Code.\n2. Press **F5** (or **Run \u003e Start Debugging**).\n3. This launches the `Extension` configuration which:\n   - Runs the `npm: watch` background task (auto-compilation)\n   - Opens a new VS Code window (**Extension Development Host**) with the extension loaded\n4. Open a CMake project in the Extension Development Host to test.\n5. Breakpoints in `src/` files work normally.\n6. After modifying code, the watch task recompiles automatically. Reload the Extension Development Host with `Ctrl+Shift+F5` to pick up changes.\n\n## Build \u0026 Packaging\n\n### Development build (tsc)\n\nDuring development, `npm run compile` (or `npm run watch`) uses the TypeScript compiler to produce individual `.js` files under `out/`. This preserves source maps and enables debugging.\n\n### Production build (esbuild + custom packager)\n\n`npm run package` performs a full production build:\n\n1. **`scripts/esbuild.js`** bundles two entry points:\n   - **Extension** (Node context): `src/extension.ts` → `out/extension.js` (CommonJS, externals: `vscode`)\n   - **Webview** (Browser context): `src/webview/graph_webview.ts` → `out/webview/graph_webview.js` (IIFE, no externals)\n   - In production mode: minified, no source maps\n2. **`scripts/package.js`** creates the `.vsix` archive (ZIP format) containing:\n   - `package.json`, `readme.md`, `changelog.md`, `LICENSE`\n   - `out/` (bundled JavaScript)\n   - `medias/` (CSS, icons)\n   - `syntaxes/` (TextMate grammars)\n\nThis replaces `vsce package` with a custom packager that generates the `[Content_Types].xml` and `extension.vsixmanifest` files.\n\nInstall the produced VSIX via:\n- VS Code: **Extensions \u003e ... \u003e Install from VSIX...**\n- Command line: `code --install-extension vscmake-\u003cversion\u003e.vsix`\n\n## Icons\n\nVS Code built-in icons (ThemeIcons) are used throughout the extension.\n\nReference: https://github.com/microsoft/vscode-icons\n\n## Project Structure\n\n```\nCMakeGraph/\n  src/\n    extension.ts                          Main entry point (activate / deactivate)\n    cmake/\n      api_client.ts                       CMake File-Based API reader\n      runner.ts                           cmake / ctest / cpack process execution\n      types.ts                            TypeScript interfaces for CMake API JSON\n      kit_scanner.ts                      Compiler detection (MSVC, GCC, Clang)\n      msvc_env.ts                         Windows MSVC environment injection\n      preset_reader.ts                    CMakePresets.json reader \u0026 evaluator\n      preset_evaluator.ts                 Macro and condition evaluation\n      cmake_diagnostics_manager.ts        Parse cmake output for errors/warnings\n    providers/\n      outline_provider.ts                 Project Outline tree view\n      impacted_provider.ts                Impacted Targets tree view\n      graph_provider.ts                   Dependency Graph custom editor provider\n      decoration_provider.ts              File decoration badges (E/W/D)\n    webview/\n      graph_webview.ts                    Dependency Graph client-side code (Canvas2D)\n      vscode.d.ts                         Type declarations for VS Code webview API\n    cmake/\n      direct_links_converter.ts           Computes direct link relationships between targets\n    watchers/\n      reply_watcher.ts                    File watcher for CMake API replies\n    syntaxes/\n      output_coloration.tmLanguage.json   TextMate grammar for output panel\n  medias/\n    icon.svg                              Extension icon\n    css/\n      graph.css                           Dependency Graph webview styles\n  scripts/\n    esbuild.js                            esbuild bundler configuration\n    package.js                            Custom VSIX packager\n  out/                                    Compiled/bundled JavaScript (git-ignored)\n  package.json                            Extension manifest\n  tsconfig.json                           TypeScript configuration\n  .vscodeignore                           Files excluded from VSIX (used by vsce)\n  LICENSE                                 MIT license\n```\n\n## Architecture Overview\n\n### Data Flow\n\n```\nCMake File-Based API\n        |\n        v\n  api_client.ts ---- loadAll() ----\u003e CmakeReply { codemodel, targets[], cmakeFiles }\n        |\n        v\n  extension.ts ---- loadReply()\n        |\n        +---\u003e outlineProvider.refresh()\n        +---\u003e impactedProvider.refresh(targets, sourceDir)\n        +---\u003e graphProvider.refresh(targets)\n        +---\u003e refreshAvailableTests() ---\u003e impactedProvider.setTestMap()\n```\n\n### CMake Tools Integration (`misc/cmake_tools_api.ts`)\n\n`CMakeToolsIntegrationManager` listens for configure events from the official CMake Tools extension (if installed). When CMake Tools finishes a configure, CMakeGraph receives the build directory and build type, then calls `initBuildDir()` and `updateAllPanesWithConfig()` to refresh all panels automatically.\n\nThe manager handles reconnection when workspace folders change or when CMake Tools is activated after CMakeGraph.\n\n### CMake File-Based API Integration (`api_client.ts`)\n\nThe extension communicates with CMake through its File-Based API (v1):\n\n1. **Query phase**: `writeQueries()` creates empty request files in `\u003cbuildDir\u003e/.cmake/api/v1/query/`:\n   - `codemodel-v2` -- project structure, targets, configurations\n   - `cache-v2` -- CMake cache variables\n   - `cmakeFiles-v1` -- list of CMake input files\n   - `toolchains-v1` -- compiler toolchain information\n\n2. **Reply phase**: After `cmake --configure`, CMake writes JSON replies to `\u003cbuildDir\u003e/.cmake/api/v1/reply/`. The `index-*.json` file references all reply objects.\n\n3. **Loading**: `loadAll()` reads the latest index, then loads all referenced JSON files. Targets are loaded in parallel and deduplicated across configurations.\n\n### Reply Watcher (`reply_watcher.ts`)\n\nA `vscode.FileSystemWatcher` monitors `.cmake/api/v1/reply/index-*.json`. When a new index appears (after a configure), it fires `onDidReply` which triggers `loadReply()` in `extension.ts`, refreshing all providers.\n\n### Runner (`runner.ts`)\n\nExecutes cmake, ctest and cpack as child processes:\n\n- **Output**: streams stdout/stderr to a dedicated output channel (with optional TextMate colorization)\n- **MSVC environment**: on Windows, resolves `vcvarsall.bat` automatically (from selected kit or auto-detected) and injects the environment variables into spawned processes\n- **Diagnostics**: during configure, feeds output lines to `CMakeDiagnosticsManager` for error/warning parsing\n- **Task tracking**: each running process is tracked as a `RunningTask` with cancel support (via `taskkill` on Windows, `SIGTERM` on Unix)\n- **Silent mode**: discovery operations (test listing, etc.) run silently without showing output\n\nKey methods:\n\n| Method | Description |\n|--------|-------------|\n| `configure()` | `cmake --preset \u003cp\u003e` or `cmake -S \u003csrc\u003e -B \u003cbuild\u003e -D...` |\n| `build()` | `cmake --build --preset \u003cp\u003e` or `cmake --build \u003cdir\u003e --target \u003ct\u003e` |\n| `buildTargets()` | Multi-target build (`--target A --target B`) |\n| `cleanAndBuildTarget()` | `cmake --build \u003cdir\u003e --target \u003ct\u003e --clean-first` |\n| `test()` | `ctest --preset \u003cp\u003e` or `ctest --test-dir \u003cdir\u003e` |\n| `testFiltered()` | `ctest --test-dir \u003cdir\u003e -R ^\u003cname\u003e$` |\n| `testByRegex()` | `ctest --test-dir \u003cdir\u003e -R \u003cregex\u003e --no-tests=ignore` |\n| `listTests()` | `ctest --test-dir \u003cdir\u003e --show-only=json-v1` (silent) |\n\n### Diagnostics Manager (`cmake_diagnostics_manager.ts`)\n\nParses CMake configure output line-by-line to extract diagnostics:\n\n- Detects patterns: `CMake Error at \u003cfile\u003e:\u003cline\u003e (\u003ccommand\u003e):`, `CMake Warning at ...`, `CMake Deprecation Warning at ...`, `CMake Warning (dev) at ...`\n- Accumulates multi-line messages\n- Creates `vscode.Diagnostic` entries for the Problems panel\n- Notifies `CMakeFileDecorationProvider` to update file badges\n- Clears previous diagnostics before each new configure\n\n### Tree View Providers\n\nTwo tree views implement `vscode.TreeDataProvider\u003cTreeNode\u003e` with discriminated union node types.\n\n#### ProjectOutlineProvider (`outline_provider.ts`)\n\n- Builds a tree from the CMake codemodel: directories -\u003e targets -\u003e sources\n- Each target has a \"CMake Extras\" sub-tree: includes, flags, defines, link flags, libraries, direct links, dependencies, cmake files\n- Direct links show readable type labels (Shared, Static, System, etc.) via `TARGET_TYPE_LABELS` map. Double-click navigates to the target in the outline\n- Inline graph icons on project item and targets (except UTILITY) to open the dependency graph\n- Filter support: substring match on target name or type\n- `findTargetNode()`: enables \"Show in outline\" navigation from dependencies and direct links\n\n#### ImpactedTargetsProvider (`impacted_targets_provider.ts`)\n\n- **Dependency graph**: builds a reverse dependency map from `target.dependencies`\n- **Transitive resolution**: BFS from each target to collect all dependents\n- **File mapping**: for each target source file, stores all transitively impacted targets\n- **Active file tracking**: listens to `onDidChangeActiveTextEditor`\n- **Test separation**: uses `testsByTarget` map to split EXECUTABLE targets into Executables vs Tests sections\n- **Test regex building**: `getTestRegex()` and `getTestSectionRegex()` group test names by first token (before `_`) to produce compact `ctest -R` patterns\n\n### Dependency Graph (`graph_provider.ts` + `graph_webview.ts`)\n\nThe Dependency Graph is a custom editor that renders an interactive force-directed graph of CMake target dependencies using Canvas2D (no external visualization library at runtime). It opens as an editor tab (not a sidebar panel) so it can be moved to another editor group or screen.\n\n#### Provider side (`graph_provider.ts`)\n\n- Implements `vscode.CustomReadonlyEditorProvider\u003cGraphDocument\u003e`\n- Uses a custom URI scheme (`cmake-graph:`) with `TextDocumentContentProvider` to open graph editors via `vscode.openWith`\n- Tracks multiple open panels (`m_panels: Set\u003cvscode.WebviewPanel\u003e`) and the active panel\n- `openCustomDocument()` parses the URI query for an optional `focusTargetId`\n- `resolveCustomEditor()` sets up the webview, sends graph data on `ready` message, and optionally sends `focusNode` for sub-graphs\n- `refresh()` sends updated graph data to all open panels simultaneously\n- Converts the target list into graph nodes (with color/shape per target type) and edges (from `target.directLinks`)\n- Filters out UTILITY targets and CMake-generated targets (`ALL_BUILD`, `ZERO_CHECK`, etc.)\n- Handles messages from the webview: node clicks (select in outline), screenshot export, CSV export, settings updates\n- Serves the webview HTML with CSP headers, referencing the bundled JS and CSS from `out/` and `medias/`\n- Editor toolbar buttons (Refresh, Settings, Screenshot, CSV Export) use `activeCustomEditorId` when clause\n\n#### Webview side (`graph_webview.ts`)\n\nPure TypeScript compiled to a single IIFE bundle (via esbuild). Runs in the webview's browser context.\n\n**Rendering:**\n- Canvas2D-based with device pixel ratio support\n- **Theme-aware**: `isLightTheme()` detects the active theme via `--vscode-editor-background` luminance. All colors (edges, grid, minimap, selection, indicators) use `themeEdgeColor()`, `themeFg()`, and CSS variables to adapt to light and dark themes\n- Grid background with origin cross\n- Rectangular nodes with rounded corners, auto-contrast text color\n- Three edge styles: tapered (triangle), chevrons (\u003e\u003e\u003e), line\n- Off-screen culling for both nodes and edges\n- Edge gradient on selected node: `CanvasGradient` from the base node's color to `themeFg()` (type signature `string | CanvasGradient` across all draw functions)\n- Focused root node halo: thick border using `#B87800` (light) / `#FFD700` with shadow glow (dark)\n- Pinned node indicator: cyan border (`#00868B` light / `#00CED1` dark)\n- Selection border uses `--vscode-focusBorder`\n- Minimap: scaled overview using `--vscode-sideBar-background`, with interactive pan/zoom\n\n**Interaction:**\n- Pan: click \u0026 drag on background\n- Zoom: mouse wheel (centered on cursor)\n- Node drag: click \u0026 drag on a node\n- Selection: click a node to highlight it and its edges. Selection only deselects on canvas click (not footer/header)\n- Space bar: toggles simulation on/off (canvas has `tabIndex=0` for keyboard focus)\n- Pin checkbox: in the footer, toggles `pinned` property on the selected node\n- Double-click node: opens focused subgraph view (directed BFS via `buildConnectedSubgraph()`)\n- Double-click focused root node: re-centers world origin on the node (gravity re-center)\n- Double-click background: fit graph to view (`centerOnNodes()`)\n- Breadcrumb bar: help button + search controls + edge direction dropdown + depth controls (in focus mode) + navigation breadcrumbs\n\n**Node pinning:**\n- Each `LayoutNode` has a `pinned: boolean` property\n- Pinned nodes are excluded from force application in `m_applyForces()` but can still be dragged with the mouse\n- In focus mode, the root node is automatically pinned at origin `(0, 0)` with sub-nodes arranged in a circle around it\n- `exitFocusView()` unpins the focused root node\n- Footer shows a Pin checkbox for the selected node (fast-path update avoids race conditions with `requestAnimationFrame`)\n\n**Focused subgraph view:**\n- `focusOnNode()` builds a directed BFS from the selected node using `buildConnectedSubgraph()`\n- BFS direction respects `edgeDirection` setting: `USED_BY` follows `to-\u003efrom`, `IS_USING` follows `from-\u003eto`\n- Root node is pinned at origin with sub-nodes arranged in a circle\n- `isNodeFiltered()` combines type filters + search hide-mode + focus visibility into a single predicate\n- Changing `edgeDirection` while focused rebuilds the visible set\n\n**Force simulation:**\n- Repulsion (Coulomb), attraction on edges (Hooke), central gravity toward world origin `(0, 0)`\n- Configurable parameters: repulsion, attraction, gravity, link length, min distance, steps/frame, threshold, damping\n- Auto-stops when total movement drops below threshold\n- Optional auto-pause during node drag\n- `restartSimIfEnabled()` helper: used by filter changes, direction changes, breadcrumb navigation\n\n**Settings panel:**\n- Collapsible sections (Edges, Node Colors, Force Simulation, Display, Controls) with persisted collapse state\n- Edge style and direction selectors (synced with breadcrumb bar dropdown)\n- Color pickers per target type (updates all nodes + filter checkboxes in real-time)\n- Tapered width slider\n- Simulation parameter sliders with per-parameter reset buttons\n- Minimap toggle, auto-pause checkbox\n- Start/Stop, Restart, Fit to View, Screenshot buttons\n- Panel open/close state persisted to workspace settings\n\n**CSV export:**\n- Provider sends `exportCsv` message to webview\n- Webview collects visible nodes/edges using `isNodeFiltered()`, sends back `csvData`\n- Provider saves 5 columns: `node_a`, `type_a`, `link_type`, `node_b`, `type_b`\n\n**State persistence:**\n- Camera position and zoom are saved via `vscode.setState()` / `vscode.getState()` (survives webview refresh)\n- All graph settings (edge style, direction, colors, simulation parameters, minimap, collapse states, panel visibility) are persisted to workspace settings via `updateSetting` messages to the provider\n- On load, provider reads all settings and sends them in the `update` message; webview applies them via `applySettingsFromProvider()`\n\n**Relayout policy:**\n- `centerOnNodes()` is only called in 3 cases: first load, double-click on background, Fit-to-View button\n- Focus navigation, direction changes, breadcrumb navigation, and simulation restarts never trigger relayout\n\n### CTest Discovery \u0026 Test-to-Target Mapping\n\nAfter each configure, `refreshAvailableTests()` in `extension.ts`:\n\n1. Runs `ctest --show-only=json-v1` (silently)\n2. Parses the JSON to extract test names and properties\n3. Builds a `Map\u003cbuildPath, targetName\u003e` from all EXECUTABLE targets (resolving `target.paths.build` to absolute paths)\n4. For each test, matches its `WORKING_DIRECTORY` property against the build path map to find the owning target\n5. Produces a `Map\u003ctargetName, testNames[]\u003e` passed to `impactedProvider.setTestMap()`\n\nThis allows the Impacted Targets view to:\n- Show test executables in a dedicated **Tests** section (with beaker icon)\n- Run all tests of a target with a single click (using a grouped regex)\n- Run all tests of the entire Tests section\n\n### Preset Reader (`preset_reader.ts` + `preset_evaluator.ts`)\n\nReads `CMakePresets.json` and `CMakeUserPresets.json`:\n\n1. Loads JSON from source directory\n2. Resolves recursive `include` directives (version \u003e= 4)\n3. Merges user presets over project presets\n4. Evaluates `inherits` chains (single or array)\n5. Expands macros: `${sourceDir}`, `${presetName}`, `${fileDir}`, `${pathListSep}`, `$env{VAR}`, `$penv{VAR}`\n6. Evaluates conditions: `const`, `equals`, `notEquals`, `inList`, `notInList`, `matches`, `notMatches`, `anyOf`, `allOf`, `not`\n7. Returns resolved `configurePresets`, `buildPresets`, `testPresets`, `packagePresets`\n\n### Kit Scanner (`kit_scanner.ts` + `msvc_env.ts`)\n\nDetects compilers on the system:\n\n**Windows:**\n- MSVC: uses `vswhere.exe` to find Visual Studio installations, extracts `cl.exe` paths for x64/x86/arm64\n- GCC: searches `PATH` and user-provided extra paths for `gcc`/`g++`\n- Clang: searches for `clang`/`clang++`\n- Clang-cl: MSVC-compatible Clang variant\n\n**Unix/Linux/macOS:**\n- GCC: searches `PATH` and extra paths\n- Clang: searches `PATH` and extra paths\n\nA special `[Unspecified]` kit lets CMake auto-detect the compiler.\n\n**MSVC environment injection** (`msvc_env.ts`):\n- Runs `vcvarsall.bat \u003carch\u003e` in a subprocess\n- Captures the resulting environment variables\n- Injects them into all spawned cmake/ctest/cpack processes\n- Caches the resolved environment in `workspaceState` for faster subsequent launches\n- Auto-detects `vcvarsall.bat` if no kit is selected but `cl.exe` is not in PATH\n\n### Output Colorization (`output_coloration.tmLanguage.json`)\n\nTextMate grammar for the `vscmake-output` language, applied to the output channel when `colorizeOutput` is `true`:\n\n| Pattern | Scope | Visual |\n|---------|-------|--------|\n| `[25/105]` build progress | `constant.numeric.progress` | Numeric color |\n| `Building CXX object` | `keyword.operator.action` | Keyword color |\n| Language tokens (C, CXX, CUDA) | `entity.name.type.language` | Type color |\n| File paths | `string.unquoted.filepath` | String color |\n| Success messages | `string.success` | Green |\n| Error messages | `invalid.illegal.error` | Red |\n| CMake warnings | `markup.changed.warning` | Yellow |\n| CMake status lines | `comment.line.cmake-status` | Comment color |\n| Target names | `entity.name.function.target` | Function color |\n| Cancellation | `markup.changed.cancelled` | Yellow |\n\n### File Decoration Provider (`cmake_file_decoration_provider.ts`)\n\nDecorates files and folders in the Explorer with diagnostic badges:\n\n- **E** (red): CMake error at this file\n- **W** (yellow): CMake warning\n- **D** (yellow): CMake deprecation warning\n- Parent directories propagate the highest severity from their children\n\n## package.json Structure\n\n### Views\n\nTwo tree views in the `CMakeGraph` activity bar container plus a custom editor:\n\n| View ID | Name | Type |\n|---------|------|------|\n| `CMakeGraphOutline` | Project Outline | Tree view |\n| `CMakeGraphImpacted` | Impacted Targets | Tree view |\n| `CMakeGraph.graphEditor` | Dependency Graph | Custom editor (`cmake-graph:` scheme) |\n\n### Context Values\n\nContext values control which inline buttons appear on each tree node:\n\n**Impacted Targets:**\n- `impactedSection_libraries` -- build, rebuild buttons\n- `impactedSection_executables` -- build, rebuild, test buttons\n- `impactedSection_tests` -- build, rebuild, test buttons\n- `impactedTarget_EXECUTABLE` -- build, rebuild, test buttons\n- `impactedTarget_TEST` -- build, rebuild, test buttons\n- `impactedTarget_STATIC_LIBRARY` etc. -- build, rebuild buttons\n- `impactedFilter` / `impactedFilterActive` -- filter / clear filter\n\n**Project Outline:**\n- `outlineProject` -- inline graph icon (open full graph)\n- `outlineTarget_\u003cTYPE\u003e` -- build, rebuild buttons; inline graph icon (except UTILITY)\n- `outlineFilter` / `outlineFilterActive` -- filter / clear filter\n- `outlineCopyable` -- copy to clipboard\n- `outlineExtras_\u003ctype\u003e` -- copy entire section\n- `outlineDirectLink` -- double-click navigates to target in outline; inline graph icon\n- `outlineDependency` -- copy, show in outline\n\n### Commands\n\nAll commands are prefixed with `CMakeGraph.`. The full list is declared in `package.json` under `contributes.commands`. Key commands:\n\n| Command | Title | Keybinding |\n|---------|-------|------------|\n| `configure` | Configure | `Ctrl+Shift+F7` |\n| `build` | Build | `Ctrl+F7` |\n| `clean` | Clean | -- |\n| `test` | Test | -- |\n| `buildTarget` | Build target | -- |\n| `rebuildTarget` | Rebuild target (clean + build) | -- |\n| `testImpactedTarget` | Run test | -- |\n| `testImpactedSection` | Run all tests in section | -- |\n| `cancelTask` | Cancel running task | -- |\n| `refresh` | Refresh | -- |\n| `filterImpacted` | Filter targets | -- |\n| `filterOutline` | Filter targets | -- |\n| `openGraphInEditor` | Open full dependency graph | -- |\n| `openTargetGraphInEditor` | Open target sub-graph | -- |\n| `graphEditorRefresh` | Refresh graph editor | -- |\n| `graphEditorSettings` | Graph settings | -- |\n| `graphEditorScreenshot` | Screenshot graph | -- |\n| `graphEditorExportCsv` | Export graph as CSV | -- |\n| `selectTargetInOutline` | Select target in outline | -- |\n| `openSettings` | Open extension settings | -- |\n\n## TypeScript Configuration\n\nFrom `tsconfig.json`:\n\n- **Target**: ES2022\n- **Module**: CommonJS\n- **Strict mode**: enabled\n- **Source maps**: enabled\n- **Root**: `src/`\n- **Output**: `out/`\n\n## Dependencies\n\n**Runtime dependencies:**\n- `vscode-cmake-tools` ^1.5.0 -- CMake Tools extension API types\n- `vis-data` ^8.0.3, `vis-network` ^10.0.2 -- legacy (no longer used by the dependency graph which is now pure Canvas2D, but still declared in package.json)\n\n**Dev dependencies:**\n- `@types/node` ^20.0.0\n- `@types/vscode` ^1.80.0\n- `typescript` ^5.9.3\n- `esbuild` ^0.27.3\n- `archiver` ^7.0.1 -- used by the custom VSIX packager\n\n## Quick Reference\n\n```bash\n# Type-check without compiling\nnpm run check\n\n# Compile once (development, with source maps)\nnpm run compile\n\n# Watch mode (auto-compile on save)\nnpm run watch\n\n# Bundle with esbuild and produce VSIX\nnpm run package\n\n# Install VSIX locally\ncode --install-extension vscmake-\u003cversion\u003e.vsix\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiekick%2FCMakeGraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faiekick%2FCMakeGraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiekick%2FCMakeGraph/lists"}