Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the names of the status bar items #4621

Merged
merged 1 commit into from
Jun 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"@types/semver": "5.5.0",
"@types/tmp": "0.0.33",
"@types/unzipper": "^0.9.1",
"@types/vscode": "1.53.0",
"@types/vscode": "1.57.0",
"@types/yauzl": "2.9.1",
"archiver": "5.3.0",
"chai": "4.3.4",
Expand Down Expand Up @@ -381,7 +381,7 @@
}
],
"engines": {
"vscode": "^1.53.0"
"vscode": "^1.57.0"
},
"activationEvents": [
"onDebugInitialConfigurations",
Expand Down
3 changes: 3 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,17 @@ export async function activate(context: vscode.ExtensionContext): Promise<CSharp
eventStream.subscribe(errorMessageObserver.post);

let omnisharpStatusBar = new StatusBarItemAdapter(vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left, Number.MIN_VALUE + 2));
omnisharpStatusBar.name = "C# Language Service Status";
let omnisharpStatusBarObserver = new OmnisharpStatusBarObserver(omnisharpStatusBar);
eventStream.subscribe(omnisharpStatusBarObserver.post);

let projectStatusBar = new StatusBarItemAdapter(vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left, Number.MIN_VALUE + 1));
projectStatusBar.name = "C# Project Selector";
let projectStatusBarObserver = new ProjectStatusBarObserver(projectStatusBar);
eventStream.subscribe(projectStatusBarObserver.post);

let backgroundWorkStatusBar = new StatusBarItemAdapter(vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left, Number.MIN_VALUE));
backgroundWorkStatusBar.name = "C# Code Analysis";
let backgroundWorkStatusBarObserver = new BackgroundWorkStatusBarObserver(backgroundWorkStatusBar);
eventStream.subscribe(backgroundWorkStatusBarObserver.post);

Expand Down
8 changes: 8 additions & 0 deletions src/statusBarItemAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ export class StatusBarItemAdapter implements vscodeAdapter.StatusBarItem {
this.statusBarItem.command = value;
}

get name(): string {
return this.statusBarItem.name;
}

set name(value: string) {
this.statusBarItem.name = value;
}

show(): void {
this.statusBarItem.show();
}
Expand Down