CMSIS CSolution Extension API
The CMSIS Csolution extension exposes an API that other extensions can get hold of:
import type { CsolutionExtension } from '@arm-software/vscode-cmsis-csolution';
const csolutionExtension = vscode.extensions.getExtension<CsolutionExtension>('Arm.cmsis-csolution');
if (csolutionExtension) {
const api = (await csolutionExtension.activate()).getApi(1);
await api.manageComponents({
solutionFilePath: '/path/to/solution.csolution.yml',
projectFilePath: '/path/to/project.cproject.yml'
});
}