Skip to content

Commit 5f7ec94

Browse files
committed
debug start label
microsoft#85548
1 parent 49ef020 commit 5f7ec94

1 file changed

Lines changed: 22 additions & 17 deletions

File tree

src/vs/workbench/contrib/debug/browser/startView.ts

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -66,29 +66,34 @@ export class StartView extends ViewPane {
6666
};
6767
this._register(editorService.onDidActiveEditorChange(setContextKey));
6868
this._register(this.debugService.getConfigurationManager().onDidRegisterDebugger(setContextKey));
69+
this.registerViews();
6970
}
7071

7172
shouldShowWelcome(): boolean {
7273
return true;
7374
}
74-
}
7575

76-
const viewsRegistry = Registry.as<IViewsRegistry>(Extensions.ViewsRegistry);
77-
viewsRegistry.registerViewWelcomeContent(StartView.ID, {
78-
content: localize('openAFileWhichCanBeDebugged', "[Open a file](command:{0}) which can be debugged or run.", isMacintosh ? OpenFileFolderAction.ID : OpenFileAction.ID),
79-
when: CONTEXT_DEBUGGER_INTERESTED_IN_ACTIVE_EDITOR
80-
});
76+
private registerViews(): void {
77+
const viewsRegistry = Registry.as<IViewsRegistry>(Extensions.ViewsRegistry);
78+
viewsRegistry.registerViewWelcomeContent(StartView.ID, {
79+
content: localize('openAFileWhichCanBeDebugged', "[Open a file](command:{0}) which can be debugged or run.", isMacintosh ? OpenFileFolderAction.ID : OpenFileAction.ID),
80+
when: CONTEXT_DEBUGGER_INTERESTED_IN_ACTIVE_EDITOR
81+
});
8182

82-
viewsRegistry.registerViewWelcomeContent(StartView.ID, {
83-
content: localize('runAndDebugAction', "[Run and Debug](command:{0})", StartAction.ID)
84-
});
83+
const debugKeybinding = this.keybindingService.lookupKeybinding(StartAction.ID);
84+
const debugKeybindingLabel = debugKeybinding ? ` (${debugKeybinding.getLabel()})` : '';
85+
viewsRegistry.registerViewWelcomeContent(StartView.ID, {
86+
content: localize('runAndDebugAction', "[Run and Debug{0}](command:{1})", debugKeybindingLabel, StartAction.ID)
87+
});
8588

86-
viewsRegistry.registerViewWelcomeContent(StartView.ID, {
87-
content: localize('customizeRunAndDebug', "To customize Run and Debug [create a launch.json file](command:{0}).", ConfigureAction.ID),
88-
when: WorkbenchStateContext.notEqualsTo('empty')
89-
});
89+
viewsRegistry.registerViewWelcomeContent(StartView.ID, {
90+
content: localize('customizeRunAndDebug', "To customize Run and Debug [create a launch.json file](command:{0}).", ConfigureAction.ID),
91+
when: WorkbenchStateContext.notEqualsTo('empty')
92+
});
9093

91-
viewsRegistry.registerViewWelcomeContent(StartView.ID, {
92-
content: localize('customizeRunAndDebugOpenFolder', "To customize Run and Debug, [open a folder](command:{0}) and create a launch.json file.", isMacintosh ? OpenFileFolderAction.ID : OpenFolderAction.ID),
93-
when: WorkbenchStateContext.isEqualTo('empty')
94-
});
94+
viewsRegistry.registerViewWelcomeContent(StartView.ID, {
95+
content: localize('customizeRunAndDebugOpenFolder', "To customize Run and Debug, [open a folder](command:{0}) and create a launch.json file.", isMacintosh ? OpenFileFolderAction.ID : OpenFolderAction.ID),
96+
when: WorkbenchStateContext.isEqualTo('empty')
97+
});
98+
}
99+
}

0 commit comments

Comments
 (0)