Allow to show status bar entries with an id and name (fix #74972)

This commit is contained in:
Benjamin Pasero
2021-05-19 14:03:28 +02:00
parent f23f011f55
commit 159479eb5a
31 changed files with 212 additions and 167 deletions

View File

@@ -135,12 +135,8 @@ export default class VersionStatus extends Disposable {
) {
super();
this._statusBarEntry = this._register(vscode.window.createStatusBarItem({
id: 'status.typescript',
name: localize('projectInfo.name', "TypeScript: Project Info"),
alignment: vscode.StatusBarAlignment.Right,
priority: 99 /* to the right of editor status (100) */
}));
this._statusBarEntry = this._register(vscode.window.createStatusBarItem('status.typescript', vscode.StatusBarAlignment.Right, 99 /* to the right of editor status (100) */));
this._statusBarEntry.name = localize('projectInfo.name', "TypeScript: Project Info");
const command = new ProjectStatusCommand(this._client, () => this._state);
commandManager.register(command);

View File

@@ -23,12 +23,8 @@ class ExcludeHintItem {
constructor(
private readonly telemetryReporter: TelemetryReporter
) {
this._item = vscode.window.createStatusBarItem({
id: 'status.typescript.exclude',
name: localize('statusExclude', "TypeScript: Configure Excludes"),
alignment: vscode.StatusBarAlignment.Right,
priority: 98 /* to the right of typescript version status (99) */
});
this._item = vscode.window.createStatusBarItem('status.typescript.exclude', vscode.StatusBarAlignment.Right, 98 /* to the right of typescript version status (99) */);
this._item.name = localize('statusExclude', "TypeScript: Configure Excludes");
this._item.command = 'js.projectStatus.command';
}