Skip to content

Commit 2ea7d60

Browse files
author
Benjamin Pasero
committed
💄
1 parent c0989df commit 2ea7d60

7 files changed

Lines changed: 37 additions & 37 deletions

File tree

src/vs/workbench/browser/parts/editor/editorControl.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class EditorControl extends Disposable {
3838
private _activeControl: BaseEditor | null;
3939
private controls: BaseEditor[] = [];
4040

41-
private readonly activeControlDisposeables = this._register(new DisposableStore());
41+
private readonly activeControlDisposables = this._register(new DisposableStore());
4242
private dimension: Dimension;
4343
private editorOperation: LongRunningOperation;
4444

@@ -139,12 +139,12 @@ export class EditorControl extends Disposable {
139139
this._activeControl = control;
140140

141141
// Clear out previous active control listeners
142-
this.activeControlDisposeables.clear();
142+
this.activeControlDisposables.clear();
143143

144144
// Listen to control changes
145145
if (control) {
146-
this.activeControlDisposeables.add(control.onDidSizeConstraintsChange(e => this._onDidSizeConstraintsChange.fire(e)));
147-
this.activeControlDisposeables.add(control.onDidFocus(() => this._onDidFocus.fire()));
146+
this.activeControlDisposables.add(control.onDidSizeConstraintsChange(e => this._onDidSizeConstraintsChange.fire(e)));
147+
this.activeControlDisposables.add(control.onDidFocus(() => this._onDidFocus.fire()));
148148
}
149149

150150
// Indicate that size constraints could have changed due to new editor

src/vs/workbench/browser/parts/editor/editorStatus.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ export class ChangeModeAction extends Action {
900900

901901
return {
902902
label: lang,
903-
iconClasses: getIconClasses(this.modelService, this.modeService, this.getResource(lang)),
903+
iconClasses: getIconClasses(this.modelService, this.modeService, this.getFakeResource(lang)),
904904
description
905905
};
906906
});
@@ -999,7 +999,7 @@ export class ChangeModeAction extends Action {
999999
return {
10001000
id,
10011001
label: lang,
1002-
iconClasses: getIconClasses(this.modelService, this.modeService, this.getResource(lang)),
1002+
iconClasses: getIconClasses(this.modelService, this.modeService, this.getFakeResource(lang)),
10031003
description: (id === currentAssociation) ? nls.localize('currentAssociation', "Current Association") : undefined
10041004
};
10051005
});
@@ -1031,9 +1031,9 @@ export class ChangeModeAction extends Action {
10311031
}, 50 /* quick open is sensitive to being opened so soon after another */);
10321032
}
10331033

1034-
private getResource(lang: string): URI | undefined {
1035-
// construct a fake resource to be able to show nice icons if any
1034+
private getFakeResource(lang: string): URI | undefined {
10361035
let fakeResource: URI | undefined;
1036+
10371037
const extensions = this.modeService.getExtensions(lang);
10381038
if (extensions && extensions.length) {
10391039
fakeResource = URI.file(extensions[0]);
@@ -1043,6 +1043,7 @@ export class ChangeModeAction extends Action {
10431043
fakeResource = URI.file(filenames[0]);
10441044
}
10451045
}
1046+
10461047
return fakeResource;
10471048
}
10481049
}

src/vs/workbench/browser/parts/editor/tabsTitleControl.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class TabsTitleControl extends TitleControl {
6161

6262
private tabResourceLabels: ResourceLabels;
6363
private tabLabels: IEditorInputLabel[] = [];
64-
private tabDisposeables: IDisposable[] = [];
64+
private tabDisposables: IDisposable[] = [];
6565

6666
private dimension: Dimension;
6767
private readonly layoutScheduled = this._register(new MutableDisposable());
@@ -301,7 +301,7 @@ export class TabsTitleControl extends TitleControl {
301301
(this.tabsContainer.lastChild as HTMLElement).remove();
302302

303303
// Remove associated tab label and widget
304-
this.tabDisposeables.pop()!.dispose();
304+
this.tabDisposables.pop()!.dispose();
305305
}
306306

307307
// A removal of a label requires to recompute all labels
@@ -315,7 +315,7 @@ export class TabsTitleControl extends TitleControl {
315315
else {
316316
clearNode(this.tabsContainer);
317317

318-
this.tabDisposeables = dispose(this.tabDisposeables);
318+
this.tabDisposables = dispose(this.tabDisposables);
319319
this.tabResourceLabels.clear();
320320
this.tabLabels = [];
321321

@@ -454,7 +454,7 @@ export class TabsTitleControl extends TitleControl {
454454
// Eventing
455455
const eventsDisposable = this.registerTabListeners(tabContainer, index);
456456

457-
this.tabDisposeables.push(combinedDisposable(eventsDisposable, tabActionBar, tabActionRunner, editorLabel));
457+
this.tabDisposables.push(combinedDisposable(eventsDisposable, tabActionBar, tabActionRunner, editorLabel));
458458

459459
return tabContainer;
460460
}
@@ -1149,7 +1149,7 @@ export class TabsTitleControl extends TitleControl {
11491149
dispose(): void {
11501150
super.dispose();
11511151

1152-
this.tabDisposeables = dispose(this.tabDisposeables);
1152+
this.tabDisposables = dispose(this.tabDisposables);
11531153
}
11541154
}
11551155

src/vs/workbench/browser/parts/notifications/notificationsToasts.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export class NotificationsToasts extends Themable {
135135
// Make Visible
136136
addClass(this.notificationsToastsContainer, 'visible');
137137

138-
const itemDisposeables = new DisposableStore();
138+
const itemDisposables = new DisposableStore();
139139

140140
// Container
141141
const notificationToastContainer = document.createElement('div');
@@ -158,12 +158,12 @@ export class NotificationsToasts extends Themable {
158158
ariaLabel: localize('notificationsToast', "Notification Toast"),
159159
verticalScrollMode: ScrollbarVisibility.Hidden
160160
});
161-
itemDisposeables.add(notificationList);
161+
itemDisposables.add(notificationList);
162162

163-
const toast: INotificationToast = { item, list: notificationList, container: notificationToastContainer, toast: notificationToast, toDispose: itemDisposeables };
163+
const toast: INotificationToast = { item, list: notificationList, container: notificationToastContainer, toast: notificationToast, toDispose: itemDisposables };
164164
this.mapNotificationToToast.set(item, toast);
165165

166-
itemDisposeables.add(toDisposable(() => {
166+
itemDisposables.add(toDisposable(() => {
167167
if (this.isVisible(toast)) {
168168
this.notificationsToastsContainer.removeChild(toast.container);
169169
}
@@ -184,12 +184,12 @@ export class NotificationsToasts extends Themable {
184184
this.layoutContainer(maxDimensions.height);
185185

186186
// Update when item height changes due to expansion
187-
itemDisposeables.add(item.onDidExpansionChange(() => {
187+
itemDisposables.add(item.onDidExpansionChange(() => {
188188
notificationList.updateNotificationsList(0, 1, [item]);
189189
}));
190190

191191
// Update when item height potentially changes due to label changes
192-
itemDisposeables.add(item.onDidLabelChange(e => {
192+
itemDisposables.add(item.onDidLabelChange(e => {
193193
if (!item.expanded) {
194194
return; // dynamic height only applies to expanded notifications
195195
}
@@ -205,7 +205,7 @@ export class NotificationsToasts extends Themable {
205205
});
206206

207207
// Automatically purge non-sticky notifications
208-
this.purgeNotification(item, notificationToastContainer, notificationList, itemDisposeables);
208+
this.purgeNotification(item, notificationToastContainer, notificationList, itemDisposables);
209209

210210
// Theming
211211
this.updateStyles();
@@ -215,7 +215,7 @@ export class NotificationsToasts extends Themable {
215215

216216
// Animate in
217217
addClass(notificationToast, 'notification-fade-in');
218-
itemDisposeables.add(addDisposableListener(notificationToast, 'transitionend', () => {
218+
itemDisposables.add(addDisposableListener(notificationToast, 'transitionend', () => {
219219
removeClass(notificationToast, 'notification-fade-in');
220220
addClass(notificationToast, 'notification-fade-in-done');
221221
}));

src/vs/workbench/browser/parts/notifications/notificationsViewer.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ export class NotificationTemplateRenderer extends Disposable {
288288

289289
private static readonly SEVERITIES: Array<'info' | 'warning' | 'error'> = ['info', 'warning', 'error'];
290290

291-
private readonly inputDisposeables = this._register(new DisposableStore());
291+
private readonly inputDisposables = this._register(new DisposableStore());
292292

293293
constructor(
294294
private template: INotificationTemplateData,
@@ -308,7 +308,7 @@ export class NotificationTemplateRenderer extends Disposable {
308308
}
309309

310310
setInput(notification: INotificationViewItem): void {
311-
this.inputDisposeables.clear();
311+
this.inputDisposables.clear();
312312

313313
this.render(notification);
314314
}
@@ -317,7 +317,7 @@ export class NotificationTemplateRenderer extends Disposable {
317317

318318
// Container
319319
toggleClass(this.template.container, 'expanded', notification.expanded);
320-
this.inputDisposeables.add(addDisposableListener(this.template.container, EventType.MOUSE_UP, e => {
320+
this.inputDisposables.add(addDisposableListener(this.template.container, EventType.MOUSE_UP, e => {
321321
if (e.button === 1 /* Middle Button */) {
322322
EventHelper.stop(e);
323323

@@ -344,7 +344,7 @@ export class NotificationTemplateRenderer extends Disposable {
344344
this.renderProgress(notification);
345345

346346
// Label Change Events
347-
this.inputDisposeables.add(notification.onDidLabelChange(event => {
347+
this.inputDisposables.add(notification.onDidLabelChange(event => {
348348
switch (event.kind) {
349349
case NotificationViewItemLabelKind.SEVERITY:
350350
this.renderSeverity(notification);
@@ -370,7 +370,7 @@ export class NotificationTemplateRenderer extends Disposable {
370370
clearNode(this.template.message);
371371
this.template.message.appendChild(NotificationMessageRenderer.render(notification.message, {
372372
callback: link => this.openerService.open(URI.parse(link)),
373-
toDispose: this.inputDisposeables
373+
toDispose: this.inputDisposables
374374
}));
375375

376376
const messageOverflows = notification.canCollapse && !notification.expanded && this.template.message.scrollWidth > this.template.message.clientWidth;
@@ -395,7 +395,7 @@ export class NotificationTemplateRenderer extends Disposable {
395395
if (isNonEmptyArray(notification.actions.secondary)) {
396396
const configureNotificationAction = this.instantiationService.createInstance(ConfigureNotificationAction, ConfigureNotificationAction.ID, ConfigureNotificationAction.LABEL, notification.actions.secondary);
397397
actions.push(configureNotificationAction);
398-
this.inputDisposeables.add(configureNotificationAction);
398+
this.inputDisposables.add(configureNotificationAction);
399399
}
400400

401401
// Expand / Collapse
@@ -441,7 +441,7 @@ export class NotificationTemplateRenderer extends Disposable {
441441
const action = notification.actions.primary![index];
442442
button.label = action.label;
443443

444-
this.inputDisposeables.add(button.onDidClick(e => {
444+
this.inputDisposables.add(button.onDidClick(e => {
445445
EventHelper.stop(e, true);
446446

447447
// Run action
@@ -453,10 +453,10 @@ export class NotificationTemplateRenderer extends Disposable {
453453
}
454454
}));
455455

456-
this.inputDisposeables.add(attachButtonStyler(button, this.themeService));
456+
this.inputDisposables.add(attachButtonStyler(button, this.themeService));
457457
});
458458

459-
this.inputDisposeables.add(buttonGroup);
459+
this.inputDisposables.add(buttonGroup);
460460
}
461461
}
462462

src/vs/workbench/electron-browser/main.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ class CodeRendererMain extends Disposable {
210210
fileService.registerProvider(Schemas.vscodeRemote, remoteFileSystemProvider);
211211
}
212212

213-
214213
const payload = await this.resolveWorkspaceInitializationPayload();
215214

216215
const services = await Promise.all([

src/vs/workbench/services/editor/browser/editorService.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,29 +118,29 @@ export class EditorService extends Disposable implements EditorServiceImpl {
118118
}
119119

120120
private registerGroupListeners(group: IEditorGroupView): void {
121-
const groupDisposeables = new DisposableStore();
121+
const groupDisposables = new DisposableStore();
122122

123-
groupDisposeables.add(group.onDidGroupChange(e => {
123+
groupDisposables.add(group.onDidGroupChange(e => {
124124
if (e.kind === GroupChangeKind.EDITOR_ACTIVE) {
125125
this.handleActiveEditorChange(group);
126126
this._onDidVisibleEditorsChange.fire();
127127
}
128128
}));
129129

130-
groupDisposeables.add(group.onDidCloseEditor(event => {
130+
groupDisposables.add(group.onDidCloseEditor(event => {
131131
this._onDidCloseEditor.fire(event);
132132
}));
133133

134-
groupDisposeables.add(group.onWillOpenEditor(event => {
134+
groupDisposables.add(group.onWillOpenEditor(event => {
135135
this.onGroupWillOpenEditor(group, event);
136136
}));
137137

138-
groupDisposeables.add(group.onDidOpenEditorFail(editor => {
138+
groupDisposables.add(group.onDidOpenEditorFail(editor => {
139139
this._onDidOpenEditorFail.fire({ editor, groupId: group.id });
140140
}));
141141

142142
Event.once(group.onWillDispose)(() => {
143-
dispose(groupDisposeables);
143+
dispose(groupDisposables);
144144
});
145145
}
146146

0 commit comments

Comments
 (0)