-
Notifications
You must be signed in to change notification settings - Fork 37.4k
Show current problem in the status bar #84609
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
Conversation
- Listen to the event to show or hide status entry by default - Register a command to show current problem status entry
|
@bpasero Added an event This event will also be helpful for other status bar entries to release any event listeners |
bpasero
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I typically prefer to not repeat types, e.g. this:
private readonly _onDidChangeEntryVisibility: Emitter<{ id: string, visible: boolean }> = this._register(new Emitter<{ id: string, visible: boolean }>());
can be written shorter as:
private readonly _onDidChangeEntryVisibility = this._register(new Emitter<{ id: string, visible: boolean }>());
given automatic type inference.
|
@bpasero I no longer need this event as I decided to use setting to enable or disable the feature - Show current error in the status bar. I still think this event is helpful for others to release the listeners. So, I would push this change, what do you think? |
Who would use this event can you show an example? |
|
Eg: Editor Status bar contributions. They listen on editor and get updated. When they are hidden these listeners can be disposed and re-registered after getting shown again. |
|
@sandy081 oh yeah makes sense, feel free to add it |
This PR fixes #20183