Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>C++ CP Template AssistantNew to Visual Studio Code? Get it now.
C++ CP Template Assistant

C++ CP Template Assistant

gifken

|
1 install
| (0) | Free
競技プログラミングのテンプレート総合支援システム。DI、依存関係可視化、ローカルジャッジ、コード生成をサポート。
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

C++ CP Template Assistant

English

This extension provides a comprehensive template and judge support system for C++ competitive programming.

It provides three main workflows:

  • Completion for //@inject ... so you can quickly select headers to inject.
  • Safe expansion of dependency headers, including nested hpp files under the configured library root.
  • Visualization of the dependency graph so you can inspect how headers connect.

The extension is designed for competitive programming codebases where shared utilities live under a configurable library root, and where header inclusion needs to stay fast, repeatable, and easy to debug.

日本語

この拡張は、競技プログラミング向けの C++ テンプレート総合支援システムです。ローカルジャッジ、DI(依存性注入)、そしてグラフの可視化を強力にサポートします。

主な機能は次のとおりです。

  • //@inject ... の補完を出し、注入したいヘッダをすばやく選べます。
  • 設定したライブラリルート配下の hpp を再帰的に展開し、安全に依存を注入できます。
  • 依存グラフを可視化して、どのヘッダがどこへつながっているかを確認できます。

共通ライブラリを任意のフォルダにまとめている競技プログラミングのコードベースで、依存関係を速く、再現性高く、デバッグしやすく扱うための拡張です。

Setting

English

Set dihelper.libraryRoot to change the library directory. The default is _lib.

日本語

dihelper.libraryRoot を変更すると、ライブラリディレクトリを切り替えられます。既定値は _lib です。

Usage

English

  1. Open a C++ file in a workspace that contains the configured library root.
  2. Type //@inject ... and pick a completion item to expand the dependency.
  3. Use the editor title button Library Graph to open the full dependency graph for all headers under the configured root.
  4. If a cycle is detected, the extension reports it in the Problems panel and prevents unsafe injection.

日本語

  1. 設定したライブラリルートを含むワークスペースで C++ ファイルを開きます。
  2. //@inject ... を入力し、候補からヘッダを選ぶと依存が展開されます。
  3. エディタ上部の Library Graph ボタンで、設定したルート全体の依存グラフを表示できます。
  4. 循環参照がある場合は Problems パネルに通知し、安全でない注入を止めます。

Commands

English

  • Visualize Dependency Graph: show the dependency graph for the current file.
  • Visualize Library Dependency Graph: show the full dependency graph under the configured library root.
  • Debug Library Dependency Graph: show the graph with layout diagnostics for troubleshooting.

日本語

  • Visualize Dependency Graph: 現在のファイルに対する依存グラフを表示します。
  • Visualize Library Dependency Graph: 設定したライブラリルート全体の依存グラフを表示します。
  • Debug Library Dependency Graph: レイアウト診断つきでグラフを表示し、描画崩れの原因を追いやすくします。

Local Judge (Library Checker)

English

  • Open the CP Template Assistant view in the Activity Bar.
  • Use Create test cpp to pick a library header and a Library Checker problem, then generate a test file under ../library_check by default.
  • Use Run All or Run Library to re-expand dependencies and execute the judge command template.
  • The sidebar shows AC, WA, and Unverified counts and per-case status.

日本語

  • アクティビティバーの CP Template Assistant ビューを開きます。
  • Create test cpp でライブラリヘッダと Library Checker の問題を選ぶと、既定では ../library_check 配下にテスト用 cpp が生成されます。
  • Run All または Run Library で依存を再注入してから判定コマンドを実行します。
  • サイドバーには AC / WA / Unverified の件数と各ケースの状態が表示されます。

Settings

English

  • dihelper.libraryCheckerProblemsRoot: Library Checker problem data root.
  • dihelper.libraryCheckerOutputRoot: generated test cpp and status root.
  • dihelper.libraryCheckerJudgeCommandTemplate: command template used to run judge.

日本語

  • dihelper.libraryCheckerProblemsRoot: Library Checker の問題データのルート。
  • dihelper.libraryCheckerOutputRoot: 生成したテスト cpp と状態ファイルの出力先。
  • dihelper.libraryCheckerJudgeCommandTemplate: 判定実行に使うコマンドテンプレート。

Quick test

English

Run the bundled fixture test to verify nested library resolution, idempotent expansion, and graph generation:

npm run test:di

日本語

組み込みの fixture テストを実行すると、ネストしたライブラリ解決、冪等な展開、グラフ生成を確認できます。

Build

English

npm run compile
vsce package

日本語

ビルドと VSIX 作成は次のコマンドです。

npm run compile
vsce package
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft