Open
Conversation
- 将 ACTION_QUICK_CREATE_FOLDER常量添加到 const.ts 文件中 - 在 extension.ts 中导入新的常量并更新相关动作映射 - 修改 quickToggleSideBarAction.ts 中的 ID 引用,使用新常量替代原有值
…ESS_SETTINGS 修改为正确的 constants.ACTION_QUICK_TOGGLE_SIDE_BAR
mortalYoung
requested changes
May 6, 2025
|
|
||
| export class CommandQuickSideBarViewAction extends Action2 { | ||
| static readonly ID = ID_SIDE_BAR; | ||
| static readonly ID = constants.ACTION_QUICK_TOGGLE_SIDE_BAR; |
Collaborator
There was a problem hiding this comment.
如果修改了这个 Action 的 ID,需要额外修改一下 Menu 里对应的,否则 keybinding 会获取失败。
大概在 https://github.com/DTStack/molecule/blob/main/src/services/builtinService/const.ts#L603-L604
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.
Description
原来注册CommandQuickSideBarViewAction是依据ID_SIDE_BAR,这样是无法禁用CommandQuickSideBarViewAction的,但是在有些场景下是不需要这个action的。
通过添加quickToggleSideBarAction这个builtin module,使得通过经验builtin module达到禁用CommandQuickSideBarViewAction成为可能。
Changes