executeWithoutTraversal method
Nested-mode entry point (--nested).
For a single-command tool, ToolRunner routes nested invocation here
rather than through traversal (see tool_runner.dart _runNestedMode).
The host (e.g. buildkit :reflectiongenerator) has already changed into
the target project directory before invoking us, so we build a cwd-scoped
CommandContext and run the same per-project execute logic — there is
exactly one implementation of the generation flow.
Implementation
@override
Future<ToolResult> executeWithoutTraversal(CliArgs args) async {
final cwd = Directory.current.path;
final context = CommandContext(
fsFolder: FsFolder(path: cwd),
natures: const [],
executionRoot: cwd,
);
final result = await execute(context, args);
return ToolResult.fromItems([result]);
}