({
name,
json,
contextOptions
}: {
name: string,
json: any,
contextOptions: IContextOptions
})
| 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) { |
no test coverage detected