MCPcopy Create free account
hub / github.com/Wscats/vscode-explore / setContribute

Method setContribute

contextKeyExpr/src/contributes.ts:52–68  ·  view source on GitHub ↗
({
        name,
        json,
        contextOptions
    }: {
        name: string,
        json: any,
        contextOptions: IContextOptions
    })

Source from the content-addressed store, hash-verified

50 }
51
52 public setContribute({
53 name,
54 json,
55 contextOptions
56 }: {
57 name: string,
58 json: any,
59 contextOptions: IContextOptions
60 }) {
61 // 获取 JSON 文件中的配置参数
62 if (!json.contributes) return;
63 const contributes = json.contributes;
64 // 更新作用域
65 this._updateContexts({ name, contextOptions });
66 // 根据条件表达式规则结合 context 匹配配置项
67 this._config.setValue(name, contributes);
68 }
69
70 // 深度遍历配置项树
71 private _iterateContribute(obj: any, context: Context) {

Callers 1

index.tsFile · 0.80

Calls 2

_updateContextsMethod · 0.95
setValueMethod · 0.45

Tested by

no test coverage detected