{{ message }}
feat: add member-scoped mcpp run/test editor actions - #2
Merged
Conversation
Member
Author
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
mcpp runandmcpp testactions to the editor title bar.cwd.findFiles("**/mcpp.toml")flag.$(tools) mcpp: 快捷菜单so it is distinct from the module availability status item.0.2.5; the release tag must be created from mergedmain, not from the PR head.Command semantics
These are project/member-level commands. They invoke fixed
mcpp run/mcpp testarguments from the resolved member root. They do not treat the active.cppfile as an independently runnable/testable file; that would require target/test mapping and is a separate feature.The original
editorLangId == cppcondition was insufficient because it exposed generic actions for every C++ file. The currentmcpp.inProjectcontext is derived from the active resource and its nearest in-workspace mcpp project instead.Necessity and compatibility
This is a convenience entry point, not required core functionality: the status-bar quick menu and command palette already expose run/test. Editor-title play/test buttons can still coexist with and visually compete with Code Runner and similar extensions. The member-scoped condition limits incorrect exposure, but it does not eliminate that ecosystem-level title-bar conflict.
Test plan
npm test: 95 passednpm run package: generatedmcpp-vscode-0.2.5.vsix0.2.5dist/src/commands.jscontains$(tools) mcpp: 快捷菜单Release order
v0.2.5from the mergedmaincommit..github/workflows/release.ymlrun tests/package and create or update the Release assets.