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
hppfiles 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
- Open a C++ file in a workspace that contains the configured library root.
- Type
//@inject ...and pick a completion item to expand the dependency. - Use the editor title button
Library Graphto open the full dependency graph for all headers under the configured root. - If a cycle is detected, the extension reports it in the Problems panel and prevents unsafe injection.
日本語
- 設定したライブラリルートを含むワークスペースで C++ ファイルを開きます。
//@inject ...を入力し、候補からヘッダを選ぶと依存が展開されます。- エディタ上部の
Library Graphボタンで、設定したルート全体の依存グラフを表示できます。 - 循環参照がある場合は 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 Assistantview in the Activity Bar. - Use
Create test cppto pick a library header and a Library Checker problem, then generate a test file under../library_checkby default. - Use
Run AllorRun Libraryto re-expand dependencies and execute the judge command template. - The sidebar shows
AC,WA, andUnverifiedcounts 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