Skip to content

Commit fa1a894

Browse files
committed
Remove err/warn message from tooltip
1 parent d932995 commit fa1a894

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

src/status-bar.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ describe('StatusBar', () => {
9292
targetType: 'target'
9393
}]);
9494
const cmsisToolboxManager = cmsisToolboxManagerFactory();
95-
cmsisToolboxManager.getSetupMessages = jest.fn().mockReturnValue(['message1', 'message2']);
9695

9796
const statusBar = new StatusBar(solutionManager, cmsisToolboxManager, themeProvider);
9897
await statusBar.activate(extensionContext);
@@ -110,10 +109,9 @@ describe('StatusBar', () => {
110109

111110
// end cmsis tool
112111
cmsisToolboxManager.mockTriggerOnRunCmsisTool(false, false);
113-
expect(cmsisToolboxManager.getSetupMessages).toHaveBeenCalledWith('project.build+target');
114112
expect(statusBarItem.show).toHaveBeenCalledTimes(4);
115113
expect(statusBarItem.text).toBe('$(target) target@set');
116-
expect(statusBarItem.tooltip.valueOf()).toEqual('**solution/test**\n - project.build\n - message1\n - message2\n');
114+
expect(statusBarItem.tooltip.valueOf()).toEqual('**solution/test**\n - project.build\n');
117115

118116
// cbuild setup completed and files loaded successfully
119117
solutionManager.onLoadedBuildFilesEmitter.fire(['success', false]);

src/status-bar.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,8 @@ export class StatusBar {
106106
}
107107

108108
protected contextToolTip(context: ContextDescriptor): string {
109-
const messages = this.cmsisToolboxManager.getSetupMessages(context.displayName)?.map(m => ` - ${m}`) ?? [];
110109
const build = context.buildType ? `.${context.buildType}` : '';
111-
return ` - ${context.projectName}${build}\n${messages.join('\n')}\n`;
110+
return ` - ${context.projectName}${build}\n`;
112111
}
113112

114113
protected updateIconStatus(statusBarItem: vscode.StatusBarItem, start: boolean, packs?: boolean): void {

0 commit comments

Comments
 (0)