diff --git a/src/vs/base/browser/dnd.ts b/src/vs/base/browser/dnd.ts index 3753e458b28c23..c9d07cccfc397c 100644 --- a/src/vs/base/browser/dnd.ts +++ b/src/vs/base/browser/dnd.ts @@ -42,7 +42,7 @@ export class DelayedDragHandler extends Disposable { } } - dispose(): void { + override dispose(): void { super.dispose(); this.clearDragTimeout(); diff --git a/src/vs/base/browser/dom.ts b/src/vs/base/browser/dom.ts index 0bdba6f8d6c21f..90f56d92e05507 100644 --- a/src/vs/base/browser/dom.ts +++ b/src/vs/base/browser/dom.ts @@ -1589,7 +1589,7 @@ export class ModifierKeyEmitter extends Emitter { return ModifierKeyEmitter.instance; } - dispose() { + override dispose() { super.dispose(); this._subscriptions.dispose(); } diff --git a/src/vs/base/browser/touch.ts b/src/vs/base/browser/touch.ts index 7166c4ec3a9cfd..8e9c085748ab9e 100644 --- a/src/vs/base/browser/touch.ts +++ b/src/vs/base/browser/touch.ts @@ -136,7 +136,7 @@ export class Gesture extends Disposable { return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || (window as Window).navigator.msMaxTouchPoints > 0; } - public dispose(): void { + public override dispose(): void { if (this.handle) { this.handle.dispose(); this.handle = null; diff --git a/src/vs/base/browser/ui/actionbar/actionViewItems.ts b/src/vs/base/browser/ui/actionbar/actionViewItems.ts index 7203b9850c030a..98c0c667054dad 100644 --- a/src/vs/base/browser/ui/actionbar/actionViewItems.ts +++ b/src/vs/base/browser/ui/actionbar/actionViewItems.ts @@ -212,7 +212,7 @@ export class BaseActionViewItem extends Disposable implements IActionViewItem { // implement in subclass } - dispose(): void { + override dispose(): void { if (this.element) { this.element.remove(); this.element = undefined; @@ -231,7 +231,7 @@ export interface IActionViewItemOptions extends IBaseActionViewItemOptions { export class ActionViewItem extends BaseActionViewItem { protected label: HTMLElement | undefined; - protected options: IActionViewItemOptions; + protected override options: IActionViewItemOptions; private cssClass?: string; @@ -244,7 +244,7 @@ export class ActionViewItem extends BaseActionViewItem { this.cssClass = ''; } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { super.render(container); if (this.element) { @@ -276,32 +276,32 @@ export class ActionViewItem extends BaseActionViewItem { // Only set the tabIndex on the element once it is about to get focused // That way this element wont be a tab stop when it is not needed #106441 - focus(): void { + override focus(): void { if (this.label) { this.label.tabIndex = 0; this.label.focus(); } } - blur(): void { + override blur(): void { if (this.label) { this.label.tabIndex = -1; } } - setFocusable(focusable: boolean): void { + override setFocusable(focusable: boolean): void { if (this.label) { this.label.tabIndex = focusable ? 0 : -1; } } - updateLabel(): void { + override updateLabel(): void { if (this.options.label && this.label) { this.label.textContent = this.getAction().label; } } - updateTooltip(): void { + override updateTooltip(): void { let title: string | null = null; if (this.getAction().tooltip) { @@ -320,7 +320,7 @@ export class ActionViewItem extends BaseActionViewItem { } } - updateClass(): void { + override updateClass(): void { if (this.cssClass && this.label) { this.label.classList.remove(...this.cssClass.split(' ')); } @@ -343,7 +343,7 @@ export class ActionViewItem extends BaseActionViewItem { } } - updateEnabled(): void { + override updateEnabled(): void { if (this.getAction().enabled) { if (this.label) { this.label.removeAttribute('aria-disabled'); @@ -365,7 +365,7 @@ export class ActionViewItem extends BaseActionViewItem { } } - updateChecked(): void { + override updateChecked(): void { if (this.label) { if (this.getAction().checked) { this.label.classList.add('checked'); @@ -407,23 +407,23 @@ export class SelectActionViewItem extends BaseActionViewItem { return option; } - setFocusable(focusable: boolean): void { + override setFocusable(focusable: boolean): void { this.selectBox.setFocusable(focusable); } - focus(): void { + override focus(): void { if (this.selectBox) { this.selectBox.focus(); } } - blur(): void { + override blur(): void { if (this.selectBox) { this.selectBox.blur(); } } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { this.selectBox.render(container); } } diff --git a/src/vs/base/browser/ui/actionbar/actionbar.ts b/src/vs/base/browser/ui/actionbar/actionbar.ts index b6fcbb2429538d..d5486aefaeeed3 100644 --- a/src/vs/base/browser/ui/actionbar/actionbar.ts +++ b/src/vs/base/browser/ui/actionbar/actionbar.ts @@ -529,7 +529,7 @@ export class ActionBar extends Disposable implements IActionRunner { await this._actionRunner.run(action, context); } - dispose(): void { + override dispose(): void { dispose(this.viewItems); this.viewItems = []; diff --git a/src/vs/base/browser/ui/checkbox/checkbox.ts b/src/vs/base/browser/ui/checkbox/checkbox.ts index d9319424fc5441..5a67a234770595 100644 --- a/src/vs/base/browser/ui/checkbox/checkbox.ts +++ b/src/vs/base/browser/ui/checkbox/checkbox.ts @@ -44,7 +44,7 @@ export class CheckboxActionViewItem extends BaseActionViewItem { protected checkbox: Checkbox | undefined; protected readonly disposables = new DisposableStore(); - render(container: HTMLElement): void { + override render(container: HTMLElement): void { this.element = container; this.disposables.clear(); @@ -59,7 +59,7 @@ export class CheckboxActionViewItem extends BaseActionViewItem { this.element.appendChild(this.checkbox.domNode); } - updateEnabled(): void { + override updateEnabled(): void { if (this.checkbox) { if (this.isEnabled()) { this.checkbox.enable(); @@ -69,33 +69,33 @@ export class CheckboxActionViewItem extends BaseActionViewItem { } } - updateChecked(): void { + override updateChecked(): void { if (this.checkbox) { this.checkbox.checked = this._action.checked; } } - focus(): void { + override focus(): void { if (this.checkbox) { this.checkbox.domNode.tabIndex = 0; this.checkbox.focus(); } } - blur(): void { + override blur(): void { if (this.checkbox) { this.checkbox.domNode.tabIndex = -1; this.checkbox.domNode.blur(); } } - setFocusable(focusable: boolean): void { + override setFocusable(focusable: boolean): void { if (this.checkbox) { this.checkbox.domNode.tabIndex = focusable ? 0 : -1; } } - dispose(): void { + override dispose(): void { this.disposables.dispose(); super.dispose(); } diff --git a/src/vs/base/browser/ui/contextview/contextview.ts b/src/vs/base/browser/ui/contextview/contextview.ts index 9632da876a7161..30efdd96b63801 100644 --- a/src/vs/base/browser/ui/contextview/contextview.ts +++ b/src/vs/base/browser/ui/contextview/contextview.ts @@ -351,7 +351,7 @@ export class ContextView extends Disposable { } } - dispose(): void { + override dispose(): void { this.hide(); super.dispose(); diff --git a/src/vs/base/browser/ui/dialog/dialog.ts b/src/vs/base/browser/ui/dialog/dialog.ts index a1646c4ccf3702..35d0ddc2db79f6 100644 --- a/src/vs/base/browser/ui/dialog/dialog.ts +++ b/src/vs/base/browser/ui/dialog/dialog.ts @@ -417,7 +417,7 @@ export class Dialog extends Disposable { this.applyStyles(); } - dispose(): void { + override dispose(): void { super.dispose(); if (this.modalElement) { diff --git a/src/vs/base/browser/ui/dropdown/dropdown.ts b/src/vs/base/browser/ui/dropdown/dropdown.ts index ea6611aba29c3b..059b85ecb1943c 100644 --- a/src/vs/base/browser/ui/dropdown/dropdown.ts +++ b/src/vs/base/browser/ui/dropdown/dropdown.ts @@ -125,7 +125,7 @@ export class BaseDropdown extends ActionRunner { this.hide(); } - dispose(): void { + override dispose(): void { super.dispose(); this.hide(); @@ -159,7 +159,7 @@ export class Dropdown extends BaseDropdown { this.contextViewProvider = options.contextViewProvider; } - show(): void { + override show(): void { super.show(); this.element.classList.add('active'); @@ -187,7 +187,7 @@ export class Dropdown extends BaseDropdown { this.element.classList.remove('active'); } - hide(): void { + override hide(): void { super.hide(); if (this.contextViewProvider) { @@ -250,7 +250,7 @@ export class DropdownMenu extends BaseDropdown { this._actions = actions; } - show(): void { + override show(): void { super.show(); this.element.classList.add('active'); @@ -269,7 +269,7 @@ export class DropdownMenu extends BaseDropdown { }); } - hide(): void { + override hide(): void { super.hide(); } diff --git a/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.ts b/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.ts index 67e2e9bb7c1a87..98092a5cbf360a 100644 --- a/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.ts +++ b/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.ts @@ -58,7 +58,7 @@ export class DropdownMenuActionViewItem extends BaseActionViewItem { } } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { this.actionItem = container; const labelRenderer: ILabelRenderer = (el: HTMLElement): IDisposable | null => { @@ -123,7 +123,7 @@ export class DropdownMenuActionViewItem extends BaseActionViewItem { this.updateEnabled(); } - setActionContext(newContext: unknown): void { + override setActionContext(newContext: unknown): void { super.setActionContext(newContext); if (this.dropdownMenu) { @@ -141,7 +141,7 @@ export class DropdownMenuActionViewItem extends BaseActionViewItem { } } - protected updateEnabled(): void { + protected override updateEnabled(): void { const disabled = !this.getAction().enabled; this.actionItem?.classList.toggle('disabled', disabled); this.element?.classList.toggle('disabled', disabled); @@ -166,7 +166,7 @@ export class ActionWithDropdownActionViewItem extends ActionViewItem { super(context, action, options); } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { super.render(container); if (this.element) { this.element.classList.add('action-dropdown-item'); diff --git a/src/vs/base/browser/ui/findinput/replaceInput.ts b/src/vs/base/browser/ui/findinput/replaceInput.ts index 1d6200fdb85f27..13ed1ade990e61 100644 --- a/src/vs/base/browser/ui/findinput/replaceInput.ts +++ b/src/vs/base/browser/ui/findinput/replaceInput.ts @@ -382,7 +382,7 @@ export class ReplaceInput extends Widget { this.domNode.style.width = newWidth + 'px'; } - public dispose(): void { + public override dispose(): void { super.dispose(); } } diff --git a/src/vs/base/browser/ui/grid/grid.ts b/src/vs/base/browser/ui/grid/grid.ts index 75e139fc46f692..38bc8c53d9e985 100644 --- a/src/vs/base/browser/ui/grid/grid.ts +++ b/src/vs/base/browser/ui/grid/grid.ts @@ -551,7 +551,7 @@ export class SerializableGrid extends Grid { }; } - layout(width: number, height: number): void { + override layout(width: number, height: number): void { super.layout(width, height); if (this.initialLayoutContext) { diff --git a/src/vs/base/browser/ui/inputbox/inputBox.ts b/src/vs/base/browser/ui/inputbox/inputBox.ts index c22ee4169c4393..6263845661559f 100644 --- a/src/vs/base/browser/ui/inputbox/inputBox.ts +++ b/src/vs/base/browser/ui/inputbox/inputBox.ts @@ -610,7 +610,7 @@ export class InputBox extends Widget { } } - public dispose(): void { + public override dispose(): void { this._hideMessage(); this.message = null; diff --git a/src/vs/base/browser/ui/list/listWidget.ts b/src/vs/base/browser/ui/list/listWidget.ts index 41cfef5cd14e35..dcffc73d99b9a0 100644 --- a/src/vs/base/browser/ui/list/listWidget.ts +++ b/src/vs/base/browser/ui/list/listWidget.ts @@ -188,7 +188,7 @@ class SelectionTrait extends Trait { super('selected'); } - renderIndex(index: number, container: HTMLElement): void { + override renderIndex(index: number, container: HTMLElement): void { super.renderIndex(index, container); if (this.setAriaSelected) { diff --git a/src/vs/base/browser/ui/menu/menu.ts b/src/vs/base/browser/ui/menu/menu.ts index 36e09bb3a66140..4bf8f108bed59d 100644 --- a/src/vs/base/browser/ui/menu/menu.ts +++ b/src/vs/base/browser/ui/menu/menu.ts @@ -264,7 +264,7 @@ export class Menu extends ActionBar { } } - getContainer(): HTMLElement { + override getContainer(): HTMLElement { return this.scrollableElement.getDomNode(); } @@ -309,7 +309,7 @@ export class Menu extends ActionBar { } } - protected updateFocus(fromRight?: boolean): void { + protected override updateFocus(fromRight?: boolean): void { super.updateFocus(fromRight, true); if (typeof this.focusedItem !== 'undefined') { @@ -385,7 +385,7 @@ class BaseMenuActionViewItem extends BaseActionViewItem { public container: HTMLElement | undefined; - protected options: IMenuItemOptions; + protected override options: IMenuItemOptions; protected item: HTMLElement | undefined; private runOnceToEnableMouseUp: RunOnceScheduler; @@ -465,7 +465,7 @@ class BaseMenuActionViewItem extends BaseActionViewItem { this._register(this.runOnceToEnableMouseUp); } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { super.render(container); if (!this.element) { @@ -504,12 +504,12 @@ class BaseMenuActionViewItem extends BaseActionViewItem { this.updateChecked(); } - blur(): void { + override blur(): void { super.blur(); this.applyStyle(); } - focus(): void { + override focus(): void { super.focus(); if (this.item) { @@ -526,7 +526,7 @@ class BaseMenuActionViewItem extends BaseActionViewItem { } } - updateLabel(): void { + override updateLabel(): void { if (!this.label) { return; } @@ -579,7 +579,7 @@ class BaseMenuActionViewItem extends BaseActionViewItem { } } - updateTooltip(): void { + override updateTooltip(): void { let title: string | null = null; if (this.getAction().tooltip) { @@ -598,7 +598,7 @@ class BaseMenuActionViewItem extends BaseActionViewItem { } } - updateClass(): void { + override updateClass(): void { if (this.cssClass && this.item) { this.item.classList.remove(...this.cssClass.split(' ')); } @@ -614,7 +614,7 @@ class BaseMenuActionViewItem extends BaseActionViewItem { } } - updateEnabled(): void { + override updateEnabled(): void { if (this.getAction().enabled) { if (this.element) { this.element.classList.remove('disabled'); @@ -639,7 +639,7 @@ class BaseMenuActionViewItem extends BaseActionViewItem { } } - updateChecked(): void { + override updateChecked(): void { if (!this.item) { return; } @@ -724,7 +724,7 @@ class SubmenuMenuActionViewItem extends BaseMenuActionViewItem { }, 750); } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { super.render(container); if (!this.element) { @@ -783,7 +783,7 @@ class SubmenuMenuActionViewItem extends BaseMenuActionViewItem { })); } - updateEnabled(): void { + override updateEnabled(): void { // override on submenu entry // native menus do not observe enablement on sumbenus // we mimic that behavior @@ -794,7 +794,7 @@ class SubmenuMenuActionViewItem extends BaseMenuActionViewItem { this.createSubmenu(selectFirst); } - onClick(e: EventLike): void { + override onClick(e: EventLike): void { // stop clicking from trying to run an action EventHelper.stop(e, true); @@ -925,7 +925,7 @@ class SubmenuMenuActionViewItem extends BaseMenuActionViewItem { } } - protected applyStyle(): void { + protected override applyStyle(): void { super.applyStyle(); if (!this.menuStyle) { @@ -944,7 +944,7 @@ class SubmenuMenuActionViewItem extends BaseMenuActionViewItem { } } - dispose(): void { + override dispose(): void { super.dispose(); this.hideScheduler.dispose(); diff --git a/src/vs/base/browser/ui/menu/menubar.ts b/src/vs/base/browser/ui/menu/menubar.ts index 129c566352361a..1667f808289a31 100644 --- a/src/vs/base/browser/ui/menu/menubar.ts +++ b/src/vs/base/browser/ui/menu/menubar.ts @@ -422,7 +422,7 @@ export class MenuBar extends Disposable { } } - dispose(): void { + override dispose(): void { super.dispose(); this.menuCache.forEach(menuBarMenu => { diff --git a/src/vs/base/browser/ui/sash/sash.ts b/src/vs/base/browser/ui/sash/sash.ts index b3d76b24de9389..d9bd8266e443a6 100644 --- a/src/vs/base/browser/ui/sash/sash.ts +++ b/src/vs/base/browser/ui/sash/sash.ts @@ -484,7 +484,7 @@ export class Sash extends Disposable { return undefined; } - dispose(): void { + override dispose(): void { super.dispose(); this.el.remove(); } diff --git a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts index fe7b7edc9b9a0e..733e913ae6fe61 100644 --- a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts +++ b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts @@ -239,7 +239,7 @@ export abstract class AbstractScrollableElement extends Widget { this._revealOnScroll = true; } - public dispose(): void { + public override dispose(): void { this._mouseWheelToDispose = dispose(this._mouseWheelToDispose); super.dispose(); } diff --git a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts index 19e22c098547f8..9f60bfb43ef3a6 100644 --- a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts +++ b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts @@ -1046,7 +1046,7 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi } } - public dispose(): void { + public override dispose(): void { this.hideSelectDropDown(false); super.dispose(); } diff --git a/src/vs/base/browser/ui/splitview/paneview.ts b/src/vs/base/browser/ui/splitview/paneview.ts index 15bdc774f69d30..06e8b064d49a9e 100644 --- a/src/vs/base/browser/ui/splitview/paneview.ts +++ b/src/vs/base/browser/ui/splitview/paneview.ts @@ -568,7 +568,7 @@ export class PaneView extends Disposable { }, 200); } - dispose(): void { + override dispose(): void { super.dispose(); this.paneItems.forEach(i => i.disposable.dispose()); diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index 40082a2270f69c..8434bc1c528ca0 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -1022,7 +1022,7 @@ export class SplitView extends Disposable { return undefined; } - dispose(): void { + override dispose(): void { super.dispose(); this.viewItems.forEach(i => i.dispose()); diff --git a/src/vs/base/browser/ui/toolbar/toolbar.ts b/src/vs/base/browser/ui/toolbar/toolbar.ts index 8d1c5b6b17a946..013fc13a2b7a3f 100644 --- a/src/vs/base/browser/ui/toolbar/toolbar.ts +++ b/src/vs/base/browser/ui/toolbar/toolbar.ts @@ -181,7 +181,7 @@ export class ToolBar extends Disposable { this.actionBar.clear(); } - dispose(): void { + override dispose(): void { this.clear(); super.dispose(); } @@ -202,7 +202,7 @@ class ToggleMenuAction extends Action { this.toggleDropdownMenu = toggleDropdownMenu; } - async run(): Promise { + async override run(): Promise { this.toggleDropdownMenu(); } diff --git a/src/vs/base/browser/ui/tree/abstractTree.ts b/src/vs/base/browser/ui/tree/abstractTree.ts index 2b466e549185a4..efc69fa47558a8 100644 --- a/src/vs/base/browser/ui/tree/abstractTree.ts +++ b/src/vs/base/browser/ui/tree/abstractTree.ts @@ -29,11 +29,11 @@ import { treeItemExpandedIcon, treeFilterOnTypeOnIcon, treeFilterOnTypeOffIcon, class TreeElementsDragAndDropData extends ElementsDragAndDropData { - set context(context: TContext | undefined) { + override set context(context: TContext | undefined) { this.data.context = context; } - get context(): TContext | undefined { + override get context(): TContext | undefined { return this.data.context; } @@ -1091,7 +1091,7 @@ class TreeNodeListMouseController extends MouseController< super(list); } - protected onViewPointer(e: IListMouseEvent>): void { + protected override onViewPointer(e: IListMouseEvent>): void { if (isInputElement(e.browserEvent.target as HTMLElement) || isMonacoEditor(e.browserEvent.target as HTMLElement)) { return; } @@ -1141,7 +1141,7 @@ class TreeNodeListMouseController extends MouseController< super.onViewPointer(e); } - protected onDoubleClick(e: IListMouseEvent>): void { + protected override onDoubleClick(e: IListMouseEvent>): void { const onTwistie = (e.browserEvent.target as HTMLElement).classList.contains('monaco-tl-twistie'); if (onTwistie || !this.tree.expandOnDoubleClick) { @@ -1175,11 +1175,11 @@ class TreeNodeList extends List> super(user, container, virtualDelegate, renderers, options); } - protected createMouseController(options: ITreeNodeListOptions): MouseController> { + protected override createMouseController(options: ITreeNodeListOptions): MouseController> { return new TreeNodeListMouseController(this, options.tree); } - splice(start: number, deleteCount: number, elements: ITreeNode[] = []): void { + override splice(start: number, deleteCount: number, elements: ITreeNode[] = []): void { super.splice(start, deleteCount, elements); if (elements.length === 0) { @@ -1217,7 +1217,7 @@ class TreeNodeList extends List> } } - setFocus(indexes: number[], browserEvent?: UIEvent, fromAPI = false): void { + override setFocus(indexes: number[], browserEvent?: UIEvent, fromAPI = false): void { super.setFocus(indexes, browserEvent); if (!fromAPI) { @@ -1225,7 +1225,7 @@ class TreeNodeList extends List> } } - setSelection(indexes: number[], browserEvent?: UIEvent, fromAPI = false): void { + override setSelection(indexes: number[], browserEvent?: UIEvent, fromAPI = false): void { super.setSelection(indexes, browserEvent); if (!fromAPI) { @@ -1233,7 +1233,7 @@ class TreeNodeList extends List> } } - setAnchor(index: number | undefined, fromAPI = false): void { + override setAnchor(index: number | undefined, fromAPI = false): void { super.setAnchor(index); if (!fromAPI) { diff --git a/src/vs/base/browser/ui/tree/asyncDataTree.ts b/src/vs/base/browser/ui/tree/asyncDataTree.ts index 731137df0a60b6..c9be6ae0d689e5 100644 --- a/src/vs/base/browser/ui/tree/asyncDataTree.ts +++ b/src/vs/base/browser/ui/tree/asyncDataTree.ts @@ -157,11 +157,11 @@ function asTreeContextMenuEvent(e: ITreeContextMenuEvent extends ElementsDragAndDropData { - set context(context: TContext | undefined) { + override set context(context: TContext | undefined) { this.data.context = context; } - get context(): TContext | undefined { + override get context(): TContext | undefined { return this.data.context; } @@ -1148,7 +1148,7 @@ export class CompressibleAsyncDataTree extends As this.filter = options.filter; } - protected createTree( + protected override createTree( user: string, container: HTMLElement, delegate: IListVirtualDelegate, @@ -1162,18 +1162,18 @@ export class CompressibleAsyncDataTree extends As return new CompressibleObjectTree(user, container, objectTreeDelegate, objectTreeRenderers, objectTreeOptions); } - protected asTreeElement(node: IAsyncDataTreeNode, viewStateContext?: IAsyncDataTreeViewStateContext): ICompressedTreeElement> { + protected override asTreeElement(node: IAsyncDataTreeNode, viewStateContext?: IAsyncDataTreeViewStateContext): ICompressedTreeElement> { return { incompressible: this.compressionDelegate.isIncompressible(node.element as T), ...super.asTreeElement(node, viewStateContext) }; } - updateOptions(options: ICompressibleAsyncDataTreeOptionsUpdate = {}): void { + override updateOptions(options: ICompressibleAsyncDataTreeOptionsUpdate = {}): void { this.tree.updateOptions(options); } - getViewState(): IAsyncDataTreeViewState { + override getViewState(): IAsyncDataTreeViewState { if (!this.identityProvider) { throw new TreeError(this.user, 'Can\'t get tree view state without an identity provider'); } @@ -1201,7 +1201,7 @@ export class CompressibleAsyncDataTree extends As return { focus, selection, expanded, scrollTop: this.scrollTop }; } - protected render(node: IAsyncDataTreeNode, viewStateContext?: IAsyncDataTreeViewStateContext): void { + protected override render(node: IAsyncDataTreeNode, viewStateContext?: IAsyncDataTreeViewStateContext): void { if (!this.identityProvider) { return super.render(node, viewStateContext); } @@ -1277,7 +1277,7 @@ export class CompressibleAsyncDataTree extends As // For compressed async data trees, `TreeVisibility.Recurse` doesn't currently work // and we have to filter everything beforehand // Related to #85193 and #85835 - protected processChildren(children: Iterable): Iterable { + protected override processChildren(children: Iterable): Iterable { if (this.filter) { children = Iterable.filter(children, e => { const result = this.filter!.filter(e, TreeVisibility.Visible); diff --git a/src/vs/base/browser/ui/tree/objectTree.ts b/src/vs/base/browser/ui/tree/objectTree.ts index 21e6557013207e..0e417939857b00 100644 --- a/src/vs/base/browser/ui/tree/objectTree.ts +++ b/src/vs/base/browser/ui/tree/objectTree.ts @@ -40,7 +40,7 @@ export class ObjectTree, TFilterData = void> extends protected model!: IObjectTreeModel; - get onDidChangeCollapseState(): Event> { return this.model.onDidChangeCollapseState; } + override get onDidChangeCollapseState(): Event> { return this.model.onDidChangeCollapseState; } constructor( user: string, @@ -208,15 +208,15 @@ export class CompressibleObjectTree, TFilterData = vo super(user, container, delegate, compressibleRenderers, asObjectTreeOptions(compressedTreeNodeProvider, options)); } - setChildren(element: T | null, children: Iterable> = Iterable.empty(), options?: IObjectTreeSetChildrenOptions): void { + override setChildren(element: T | null, children: Iterable> = Iterable.empty(), options?: IObjectTreeSetChildrenOptions): void { this.model.setChildren(element, children, options); } - protected createModel(user: string, view: IList>, options: ICompressibleObjectTreeOptions): ITreeModel { + protected override createModel(user: string, view: IList>, options: ICompressibleObjectTreeOptions): ITreeModel { return new CompressibleObjectTreeModel(user, view, options); } - updateOptions(optionsUpdate: ICompressibleObjectTreeOptionsUpdate = {}): void { + override updateOptions(optionsUpdate: ICompressibleObjectTreeOptionsUpdate = {}): void { super.updateOptions(optionsUpdate); if (typeof optionsUpdate.compressionEnabled !== 'undefined') { diff --git a/src/vs/base/browser/ui/tree/treeDefaults.ts b/src/vs/base/browser/ui/tree/treeDefaults.ts index 834ab449fdd664..155d88b8804573 100644 --- a/src/vs/base/browser/ui/tree/treeDefaults.ts +++ b/src/vs/base/browser/ui/tree/treeDefaults.ts @@ -13,7 +13,7 @@ export class CollapseAllAction extends Action { super('vs.tree.collapse', nls.localize('collapse all', "Collapse All"), 'collapse-all', enabled); } - async run(): Promise { + async override run(): Promise { this.viewer.collapseAll(); this.viewer.setSelection([]); this.viewer.setFocus([]); diff --git a/src/vs/base/common/async.ts b/src/vs/base/common/async.ts index 03fb0d84bc4bdf..7fdec199755690 100644 --- a/src/vs/base/common/async.ts +++ b/src/vs/base/common/async.ts @@ -381,7 +381,7 @@ export class AutoOpenBarrier extends Barrier { this._timeout = setTimeout(() => this.open(), autoOpenTimeMs); } - open(): void { + override open(): void { clearTimeout(this._timeout); super.open(); } @@ -772,7 +772,7 @@ export class RunOnceWorker extends RunOnceScheduler { } } - protected doRun(): void { + protected override doRun(): void { const units = this.units; this.units = []; @@ -781,7 +781,7 @@ export class RunOnceWorker extends RunOnceScheduler { } } - dispose(): void { + override dispose(): void { this.units = []; super.dispose(); diff --git a/src/vs/base/common/event.ts b/src/vs/base/common/event.ts index add858d259c984..8b4efda9d448a7 100644 --- a/src/vs/base/common/event.ts +++ b/src/vs/base/common/event.ts @@ -674,7 +674,7 @@ export class PauseableEmitter extends Emitter { } } - fire(event: T): void { + override fire(event: T): void { if (this._listeners) { if (this._isPaused !== 0) { this._eventQueue.push(event); diff --git a/src/vs/base/common/map.ts b/src/vs/base/common/map.ts index 0e08876e537dbe..2ca5fe50f9ab8b 100644 --- a/src/vs/base/common/map.ts +++ b/src/vs/base/common/map.ts @@ -1028,7 +1028,7 @@ export class LRUCache extends LinkedMap { this.checkTrim(); } - get(key: K, touch: Touch = Touch.AsNew): V | undefined { + override get(key: K, touch: Touch = Touch.AsNew): V | undefined { return super.get(key, touch); } @@ -1036,7 +1036,7 @@ export class LRUCache extends LinkedMap { return super.get(key, Touch.None); } - set(key: K, value: V): this { + override set(key: K, value: V): this { super.set(key, value, Touch.AsNew); this.checkTrim(); return this; diff --git a/src/vs/base/common/scrollable.ts b/src/vs/base/common/scrollable.ts index 73a8622890ee6b..cb2f7860bf62f7 100644 --- a/src/vs/base/common/scrollable.ts +++ b/src/vs/base/common/scrollable.ts @@ -223,7 +223,7 @@ export class Scrollable extends Disposable { this._smoothScrolling = null; } - public dispose(): void { + public override dispose(): void { if (this._smoothScrolling) { this._smoothScrolling.dispose(); this._smoothScrolling = null; diff --git a/src/vs/base/common/uri.ts b/src/vs/base/common/uri.ts index 55a39c0f372a47..c2b0b02eb867ee 100644 --- a/src/vs/base/common/uri.ts +++ b/src/vs/base/common/uri.ts @@ -418,14 +418,14 @@ class Uri extends URI { _formatted: string | null = null; _fsPath: string | null = null; - get fsPath(): string { + override get fsPath(): string { if (!this._fsPath) { this._fsPath = uriToFsPath(this, false); } return this._fsPath; } - toString(skipEncoding: boolean = false): string { + override toString(skipEncoding: boolean = false): string { if (!skipEncoding) { if (!this._formatted) { this._formatted = _asFormatted(this, false); @@ -437,7 +437,7 @@ class Uri extends URI { } } - toJSON(): UriComponents { + override toJSON(): UriComponents { const res = { $mid: 1 }; diff --git a/src/vs/base/node/processes.ts b/src/vs/base/node/processes.ts index 0273af2365c1d6..363dc229f62739 100644 --- a/src/vs/base/node/processes.ts +++ b/src/vs/base/node/processes.ts @@ -379,7 +379,7 @@ export class LineProcess extends AbstractProcess { this.stderrLineDecoder = stderrLineDecoder; } - protected handleClose(data: any, cc: ValueCallback, pp: ProgressCallback, ee: ErrorCallback): void { + protected override handleClose(data: any, cc: ValueCallback, pp: ProgressCallback, ee: ErrorCallback): void { const stdoutLine = this.stdoutLineDecoder ? this.stdoutLineDecoder.end() : null; if (stdoutLine) { pp({ line: stdoutLine, source: Source.stdout }); diff --git a/src/vs/base/parts/ipc/common/ipc.mp.ts b/src/vs/base/parts/ipc/common/ipc.mp.ts index 01c36e6351da91..1022eb173c4108 100644 --- a/src/vs/base/parts/ipc/common/ipc.mp.ts +++ b/src/vs/base/parts/ipc/common/ipc.mp.ts @@ -72,7 +72,7 @@ export class Client extends IPCClient implements IDisposable { this.protocol = protocol; } - dispose(): void { + override dispose(): void { this.protocol.disconnect(); } } diff --git a/src/vs/base/parts/ipc/common/ipc.net.ts b/src/vs/base/parts/ipc/common/ipc.net.ts index 777d4379f43b81..aad4fb4e92a287 100644 --- a/src/vs/base/parts/ipc/common/ipc.net.ts +++ b/src/vs/base/parts/ipc/common/ipc.net.ts @@ -252,7 +252,7 @@ class ProtocolReader extends Disposable { return this._incomingData.read(this._incomingData.byteLength); } - public dispose(): void { + public override dispose(): void { this._isDisposed = true; super.dispose(); } @@ -412,7 +412,7 @@ export class Client extends IPCClient { super(protocol, id, ipcLogger); } - dispose(): void { + override dispose(): void { super.dispose(); const socket = this.protocol.getSocket(); this.protocol.sendDisconnect(); diff --git a/src/vs/base/parts/ipc/electron-sandbox/ipc.electron.ts b/src/vs/base/parts/ipc/electron-sandbox/ipc.electron.ts index f2eaa813112683..94ece5a43be2f8 100644 --- a/src/vs/base/parts/ipc/electron-sandbox/ipc.electron.ts +++ b/src/vs/base/parts/ipc/electron-sandbox/ipc.electron.ts @@ -32,7 +32,7 @@ export class Client extends IPCClient implements IDisposable { this.protocol = protocol; } - dispose(): void { + override dispose(): void { this.protocol.disconnect(); } } diff --git a/src/vs/base/parts/ipc/node/ipc.net.ts b/src/vs/base/parts/ipc/node/ipc.net.ts index 09024a5fed1973..aa2512c4272d2c 100644 --- a/src/vs/base/parts/ipc/node/ipc.net.ts +++ b/src/vs/base/parts/ipc/node/ipc.net.ts @@ -266,7 +266,7 @@ export class WebSocketNodeSocket extends Disposable implements ISocket { this._register(this.socket.onClose(() => this._onClose.fire())); } - public dispose(): void { + public override dispose(): void { if (this._zlibDeflateFlushWaitingCount > 0) { // Wait for any outstanding writes to finish before disposing this._register(this._onDidZlibFlush.event(() => { @@ -581,7 +581,7 @@ export class Server extends IPCServer { this.server = server; } - dispose(): void { + override dispose(): void { super.dispose(); if (this.server) { this.server.close(); diff --git a/src/vs/base/parts/ipc/test/common/ipc.test.ts b/src/vs/base/parts/ipc/test/common/ipc.test.ts index f9855abda48bd5..38ce85a7a0cfc7 100644 --- a/src/vs/base/parts/ipc/test/common/ipc.test.ts +++ b/src/vs/base/parts/ipc/test/common/ipc.test.ts @@ -66,7 +66,7 @@ class TestIPCClient extends IPCClient { super(protocol, id); } - dispose(): void { + override dispose(): void { this._onDidDisconnect.fire(); super.dispose(); } diff --git a/src/vs/base/parts/quickinput/browser/quickInput.ts b/src/vs/base/parts/quickinput/browser/quickInput.ts index f84ec1479c3b63..2360748200301e 100644 --- a/src/vs/base/parts/quickinput/browser/quickInput.ts +++ b/src/vs/base/parts/quickinput/browser/quickInput.ts @@ -410,7 +410,7 @@ class QuickInput extends Disposable implements IQuickInput { readonly onDispose = this.onDisposeEmitter.event; - dispose(): void { + override dispose(): void { this.hide(); this.onDisposeEmitter.fire(); @@ -694,7 +694,7 @@ class QuickPick extends QuickInput implements IQuickPi } } - show() { + override show() { if (!this.visible) { this.visibleDisposables.add( this.ui.inputBox.onDidChange(value => { @@ -884,7 +884,7 @@ class QuickPick extends QuickInput implements IQuickPi }); } - protected update() { + protected override update() { if (!this.visible) { return; } @@ -1063,7 +1063,7 @@ class InputBox extends QuickInput implements IInputBox { readonly onDidAccept = this.onDidAcceptEmitter.event; - show() { + override show() { if (!this.visible) { this.visibleDisposables.add( this.ui.inputBox.onDidChange(value => { @@ -1079,7 +1079,7 @@ class InputBox extends QuickInput implements IInputBox { super.show(); } - protected update() { + protected override update() { if (!this.visible) { return; } diff --git a/src/vs/base/parts/storage/common/storage.ts b/src/vs/base/parts/storage/common/storage.ts index a2c28e17070529..ff52a44983b250 100644 --- a/src/vs/base/parts/storage/common/storage.ts +++ b/src/vs/base/parts/storage/common/storage.ts @@ -320,7 +320,7 @@ export class Storage extends Disposable implements IStorage { return new Promise(resolve => this.whenFlushedCallbacks.push(resolve)); } - dispose(): void { + override dispose(): void { this.flushDelayer.cancel(); // workaround https://github.com/microsoft/vscode/issues/116777 this.flushDelayer.dispose(); diff --git a/src/vs/base/parts/storage/test/node/storage.test.ts b/src/vs/base/parts/storage/test/node/storage.test.ts index 990e531905ea7f..fd963590dc43d4 100644 --- a/src/vs/base/parts/storage/test/node/storage.test.ts +++ b/src/vs/base/parts/storage/test/node/storage.test.ts @@ -111,7 +111,7 @@ flakySuite('Storage Library', function () { class TestSQLiteStorageDatabase extends SQLiteStorageDatabase { private readonly _onDidChangeItemsExternal = new Emitter(); - get onDidChangeItemsExternal(): Event { return this._onDidChangeItemsExternal.event; } + override get onDidChangeItemsExternal(): Event { return this._onDidChangeItemsExternal.event; } fireDidChangeItemsExternal(event: IStorageItemsChangeEvent): void { this._onDidChangeItemsExternal.fire(event); diff --git a/src/vs/editor/browser/config/configuration.ts b/src/vs/editor/browser/config/configuration.ts index 545d1321e7b127..ddb077f57dbb46 100644 --- a/src/vs/editor/browser/config/configuration.ts +++ b/src/vs/editor/browser/config/configuration.ts @@ -112,7 +112,7 @@ class CSSBasedConfiguration extends Disposable { this._evictUntrustedReadingsTimeout = -1; } - public dispose(): void { + public override dispose(): void { if (this._evictUntrustedReadingsTimeout !== -1) { clearTimeout(this._evictUntrustedReadingsTimeout); this._evictUntrustedReadingsTimeout = -1; @@ -353,11 +353,11 @@ export class Configuration extends CommonEditorConfiguration { this._recomputeOptions(); } - public observeReferenceElement(dimension?: IDimension): void { + public override observeReferenceElement(dimension?: IDimension): void { this._elementSizeObserver.observe(dimension); } - public updatePixelRatio(): void { + public override updatePixelRatio(): void { this._recomputeOptions(); } diff --git a/src/vs/editor/browser/config/elementSizeObserver.ts b/src/vs/editor/browser/config/elementSizeObserver.ts index 06b42c6f9c6dac..cf42a075793b74 100644 --- a/src/vs/editor/browser/config/elementSizeObserver.ts +++ b/src/vs/editor/browser/config/elementSizeObserver.ts @@ -52,7 +52,7 @@ export class ElementSizeObserver extends Disposable { this.measureReferenceDomElement(false, dimension); } - public dispose(): void { + public override dispose(): void { this.stopObserving(); super.dispose(); } diff --git a/src/vs/editor/browser/controller/mouseHandler.ts b/src/vs/editor/browser/controller/mouseHandler.ts index 005fe7ad0caf1a..0b26756bc9f073 100644 --- a/src/vs/editor/browser/controller/mouseHandler.ts +++ b/src/vs/editor/browser/controller/mouseHandler.ts @@ -133,13 +133,13 @@ export class MouseHandler extends ViewEventHandler { this._context.addEventHandler(this); } - public dispose(): void { + public override dispose(): void { this._context.removeEventHandler(this); super.dispose(); } // --- begin event handlers - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { if (e.hasChanged(EditorOption.layoutInfo)) { // layout change const height = this._context.configuration.options.get(EditorOption.layoutInfo).height; @@ -150,14 +150,14 @@ export class MouseHandler extends ViewEventHandler { } return false; } - public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + public override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { this._mouseDownOperation.onCursorStateChanged(e); return false; } - public onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean { + public override onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean { return false; } - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { + public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { this._mouseDownOperation.onScrollChanged(); return false; } @@ -311,7 +311,7 @@ class MouseDownOperation extends Disposable { this._lastMouseEvent = null; } - public dispose(): void { + public override dispose(): void { super.dispose(); } diff --git a/src/vs/editor/browser/controller/mouseTarget.ts b/src/vs/editor/browser/controller/mouseTarget.ts index bc0478ca4585eb..d2af49b222f6f5 100644 --- a/src/vs/editor/browser/controller/mouseTarget.ts +++ b/src/vs/editor/browser/controller/mouseTarget.ts @@ -422,7 +422,7 @@ class HitTestRequest extends BareHitTestRequest { } } - public toString(): string { + public override toString(): string { return `pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target ? (this.target).outerHTML : null}`; } diff --git a/src/vs/editor/browser/controller/pointerHandler.ts b/src/vs/editor/browser/controller/pointerHandler.ts index ee291a86fcb66c..5c4df88ff3b175 100644 --- a/src/vs/editor/browser/controller/pointerHandler.ts +++ b/src/vs/editor/browser/controller/pointerHandler.ts @@ -87,7 +87,7 @@ export class PointerEventHandler extends MouseHandler { } } - public _onMouseDown(e: EditorMouseEvent): void { + public override _onMouseDown(e: EditorMouseEvent): void { if ((e.browserEvent as any).pointerType === 'touch') { return; } diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index be84e6511c01b5..fe41979c3a91b8 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -330,7 +330,7 @@ export class TextAreaHandler extends ViewPart { })); } - public dispose(): void { + public override dispose(): void { super.dispose(); } @@ -425,7 +425,7 @@ export class TextAreaHandler extends ViewPart { // --- begin event handlers - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { const options = this._context.configuration.options; const layoutInfo = options.get(EditorOption.layoutInfo); @@ -454,34 +454,34 @@ export class TextAreaHandler extends ViewPart { return true; } - public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + public override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { this._selections = e.selections.slice(0); this._modelSelections = e.modelSelections.slice(0); this._textAreaInput.writeScreenReaderContent('selection changed'); return true; } - public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { + public override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { // true for inline decorations that can end up relayouting text return true; } - public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { + public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean { return true; } - public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { + public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { return true; } - public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { + public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { return true; } - public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { + public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { + public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { this._scrollLeft = e.scrollLeft; this._scrollTop = e.scrollTop; return true; } - public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { + public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { return true; } diff --git a/src/vs/editor/browser/controller/textAreaInput.ts b/src/vs/editor/browser/controller/textAreaInput.ts index 63722bb873af5b..37dbdb7f67bf8f 100644 --- a/src/vs/editor/browser/controller/textAreaInput.ts +++ b/src/vs/editor/browser/controller/textAreaInput.ts @@ -524,7 +524,7 @@ export class TextAreaInput extends Disposable { }); } - public dispose(): void { + public override dispose(): void { super.dispose(); if (this._selectionChangeListener) { this._selectionChangeListener.dispose(); diff --git a/src/vs/editor/browser/core/editorState.ts b/src/vs/editor/browser/core/editorState.ts index 5d4c1ffb0e513a..360149811031a1 100644 --- a/src/vs/editor/browser/core/editorState.ts +++ b/src/vs/editor/browser/core/editorState.ts @@ -119,7 +119,7 @@ export class EditorStateCancellationTokenSource extends EditorKeybindingCancella } } - dispose() { + override dispose() { this._listener.dispose(); super.dispose(); } @@ -137,7 +137,7 @@ export class TextModelCancellationTokenSource extends CancellationTokenSource im this._listener = model.onDidChangeContent(() => this.cancel()); } - dispose() { + override dispose() { this._listener.dispose(); super.dispose(); } diff --git a/src/vs/editor/browser/core/keybindingCancellation.ts b/src/vs/editor/browser/core/keybindingCancellation.ts index 206fbeac8854de..2fc418a32a4ead 100644 --- a/src/vs/editor/browser/core/keybindingCancellation.ts +++ b/src/vs/editor/browser/core/keybindingCancellation.ts @@ -81,7 +81,7 @@ export class EditorKeybindingCancellationTokenSource extends CancellationTokenSo this._unregister = editor.invokeWithinContext(accessor => accessor.get(IEditorCancellationTokens).add(editor, this)); } - dispose(): void { + override dispose(): void { this._unregister(); super.dispose(); } diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index 5589fd7f120609..67823047296c1e 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -300,32 +300,32 @@ export class View extends ViewEventHandler { } // --- begin event handlers - public handleEvents(events: viewEvents.ViewEvent[]): void { + public override handleEvents(events: viewEvents.ViewEvent[]): void { super.handleEvents(events); this._scheduleRender(); } - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { this._configPixelRatio = this._context.configuration.options.get(EditorOption.pixelRatio); this.domNode.setClassName(this._getEditorClassName()); this._applyLayout(); return false; } - public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + public override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { this._selections = e.selections; return false; } - public onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean { + public override onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean { this.domNode.setClassName(this._getEditorClassName()); return false; } - public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { + public override onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { this.domNode.setClassName(this._getEditorClassName()); return false; } // --- end event handlers - public dispose(): void { + public override dispose(): void { if (this._renderAnimationFrame !== null) { this._renderAnimationFrame.dispose(); this._renderAnimationFrame = null; diff --git a/src/vs/editor/browser/view/viewOverlays.ts b/src/vs/editor/browser/view/viewOverlays.ts index 130f1f09fae812..0088f3d8b46d68 100644 --- a/src/vs/editor/browser/view/viewOverlays.ts +++ b/src/vs/editor/browser/view/viewOverlays.ts @@ -36,7 +36,7 @@ export class ViewOverlays extends ViewPart implements IVisibleLinesHost onBrowserDesperateReveal(this.scrollbarDomNode.domNode, true, false))); } - public dispose(): void { + public override dispose(): void { super.dispose(); } @@ -133,7 +133,7 @@ export class EditorScrollbar extends ViewPart { // --- begin event handlers - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { if ( e.hasChanged(EditorOption.scrollbar) || e.hasChanged(EditorOption.mouseWheelScrollSensitivity) @@ -157,10 +157,10 @@ export class EditorScrollbar extends ViewPart { } return true; } - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { + public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return true; } - public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { + public override onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { this.scrollbar.updateClassName('editor-scrollable' + ' ' + getThemeTypeSelector(this._context.theme.type)); return true; } diff --git a/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts b/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts index 0cdd9c61cc2ed4..3ccec5f60e321e 100644 --- a/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts +++ b/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts @@ -98,7 +98,7 @@ export class GlyphMarginOverlay extends DedupOverlay { this._context.addEventHandler(this); } - public dispose(): void { + public override dispose(): void { this._context.removeEventHandler(this); this._renderResult = null; super.dispose(); @@ -106,7 +106,7 @@ export class GlyphMarginOverlay extends DedupOverlay { // --- begin event handlers - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { const options = this._context.configuration.options; const layoutInfo = options.get(EditorOption.layoutInfo); @@ -116,25 +116,25 @@ export class GlyphMarginOverlay extends DedupOverlay { this._glyphMarginWidth = layoutInfo.glyphMarginWidth; return true; } - public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { + public override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { return true; } - public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { + public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean { return true; } - public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { + public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { return true; } - public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { + public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { return true; } - public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { + public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { + public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollTopChanged; } - public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { + public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { return true; } diff --git a/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts b/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts index f94c06247b40d3..de40ce8087078a 100644 --- a/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts +++ b/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts @@ -45,7 +45,7 @@ export class IndentGuidesOverlay extends DynamicViewOverlay { this._context.addEventHandler(this); } - public dispose(): void { + public override dispose(): void { this._context.removeEventHandler(this); this._renderResult = null; super.dispose(); @@ -53,7 +53,7 @@ export class IndentGuidesOverlay extends DynamicViewOverlay { // --- begin event handlers - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { const options = this._context.configuration.options; const wrappingInfo = options.get(EditorOption.wrappingInfo); const fontInfo = options.get(EditorOption.fontInfo); @@ -65,7 +65,7 @@ export class IndentGuidesOverlay extends DynamicViewOverlay { this._maxIndentLeft = wrappingInfo.wrappingColumn === -1 ? -1 : (wrappingInfo.wrappingColumn * fontInfo.typicalHalfwidthCharacterWidth); return true; } - public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + public override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { const selection = e.selections[0]; const newPrimaryLineNumber = selection.isEmpty() ? selection.positionLineNumber : 0; @@ -76,29 +76,29 @@ export class IndentGuidesOverlay extends DynamicViewOverlay { return false; } - public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { + public override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { // true for inline decorations return true; } - public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { + public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean { return true; } - public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { + public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { return true; } - public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { + public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { return true; } - public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { + public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { + public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollTopChanged;// || e.scrollWidthChanged; } - public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { + public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { return true; } - public onLanguageConfigurationChanged(e: viewEvents.ViewLanguageConfigurationEvent): boolean { + public override onLanguageConfigurationChanged(e: viewEvents.ViewLanguageConfigurationEvent): boolean { return true; } diff --git a/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts b/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts index 0eceebf7cf6ada..1c3f5d416d69b8 100644 --- a/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts +++ b/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts @@ -54,7 +54,7 @@ export class LineNumbersOverlay extends DynamicViewOverlay { this._lineNumbersWidth = layoutInfo.lineNumbersWidth; } - public dispose(): void { + public override dispose(): void { this._context.removeEventHandler(this); this._renderResult = null; super.dispose(); @@ -62,11 +62,11 @@ export class LineNumbersOverlay extends DynamicViewOverlay { // --- begin event handlers - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { this._readConfig(); return true; } - public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + public override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { const primaryViewPosition = e.selections[0].getPosition(); this._lastCursorModelPosition = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(primaryViewPosition); @@ -80,22 +80,22 @@ export class LineNumbersOverlay extends DynamicViewOverlay { } return shouldRender; } - public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { + public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean { return true; } - public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { + public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { return true; } - public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { + public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { return true; } - public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { + public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { + public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollTopChanged; } - public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { + public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { return true; } diff --git a/src/vs/editor/browser/viewParts/lines/viewLine.ts b/src/vs/editor/browser/viewParts/lines/viewLine.ts index 0c73f13abed5f9..edec7f7a041c30 100644 --- a/src/vs/editor/browser/viewParts/lines/viewLine.ts +++ b/src/vs/editor/browser/viewParts/lines/viewLine.ts @@ -662,7 +662,7 @@ class RenderedViewLine implements IRenderedViewLine { } class WebKitRenderedViewLine extends RenderedViewLine { - protected _readVisibleRangesForRange(domNode: FastDomNode, startColumn: number, endColumn: number, context: DomReadingContext): HorizontalRange[] | null { + protected override _readVisibleRangesForRange(domNode: FastDomNode, startColumn: number, endColumn: number, context: DomReadingContext): HorizontalRange[] | null { const output = super._readVisibleRangesForRange(domNode, startColumn, endColumn, context); if (!output || output.length === 0 || startColumn === endColumn || (startColumn === 1 && endColumn === this._characterMapping.length)) { diff --git a/src/vs/editor/browser/viewParts/lines/viewLines.ts b/src/vs/editor/browser/viewParts/lines/viewLines.ts index 6e92c558e1167c..8d9601ff720516 100644 --- a/src/vs/editor/browser/viewParts/lines/viewLines.ts +++ b/src/vs/editor/browser/viewParts/lines/viewLines.ts @@ -152,7 +152,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, this._horizontalRevealRequest = null; } - public dispose(): void { + public override dispose(): void { this._asyncUpdateLineWidths.dispose(); this._asyncCheckMonospaceFontAssumptions.dispose(); super.dispose(); @@ -172,7 +172,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, // ---- begin view event handlers - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { this._visibleLines.onConfigurationChanged(e); if (e.hasChanged(EditorOption.wrappingInfo)) { this._maxLineWidth = 0; @@ -217,7 +217,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, return false; } - public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + public override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { const rendStartLineNumber = this._visibleLines.getStartLineNumber(); const rendEndLineNumber = this._visibleLines.getEndLineNumber(); let r = false; @@ -226,7 +226,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, } return r; } - public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { + public override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { if (true/*e.inlineDecorationsChanged*/) { const rendStartLineNumber = this._visibleLines.getStartLineNumber(); const rendEndLineNumber = this._visibleLines.getEndLineNumber(); @@ -236,21 +236,21 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, } return true; } - public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { + public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean { const shouldRender = this._visibleLines.onFlushed(e); this._maxLineWidth = 0; return shouldRender; } - public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { + public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { return this._visibleLines.onLinesChanged(e); } - public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { + public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { return this._visibleLines.onLinesDeleted(e); } - public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { + public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return this._visibleLines.onLinesInserted(e); } - public onRevealRangeRequest(e: viewEvents.ViewRevealRangeRequestEvent): boolean { + public override onRevealRangeRequest(e: viewEvents.ViewRevealRangeRequestEvent): boolean { // Using the future viewport here in order to handle multiple // incoming reveal range requests that might all desire to be animated const desiredScrollTop = this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(), e.source, e.range, e.selections, e.verticalType); @@ -286,7 +286,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, return true; } - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { + public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { if (this._horizontalRevealRequest && e.scrollLeftChanged) { // cancel any outstanding horizontal reveal request if someone else scrolls horizontally. this._horizontalRevealRequest = null; @@ -303,14 +303,14 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, return this._visibleLines.onScrollChanged(e) || true; } - public onTokensChanged(e: viewEvents.ViewTokensChangedEvent): boolean { + public override onTokensChanged(e: viewEvents.ViewTokensChangedEvent): boolean { return this._visibleLines.onTokensChanged(e); } - public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { + public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { this._context.model.setMaxLineWidth(this._maxLineWidth); return this._visibleLines.onZonesChanged(e); } - public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { + public override onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { return this._onOptionsMaybeChanged(); } diff --git a/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.ts b/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.ts index 6e40faf77b47aa..bdc2eed97387ba 100644 --- a/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.ts +++ b/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.ts @@ -30,7 +30,7 @@ export class LinesDecorationsOverlay extends DedupOverlay { this._context.addEventHandler(this); } - public dispose(): void { + public override dispose(): void { this._context.removeEventHandler(this); this._renderResult = null; super.dispose(); @@ -38,32 +38,32 @@ export class LinesDecorationsOverlay extends DedupOverlay { // --- begin event handlers - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { const options = this._context.configuration.options; const layoutInfo = options.get(EditorOption.layoutInfo); this._decorationsLeft = layoutInfo.decorationsLeft; this._decorationsWidth = layoutInfo.decorationsWidth; return true; } - public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { + public override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { return true; } - public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { + public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean { return true; } - public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { + public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { return true; } - public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { + public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { return true; } - public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { + public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { + public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollTopChanged; } - public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { + public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { return true; } diff --git a/src/vs/editor/browser/viewParts/margin/margin.ts b/src/vs/editor/browser/viewParts/margin/margin.ts index 8181e2f8aa8079..11ba874cbff8ce 100644 --- a/src/vs/editor/browser/viewParts/margin/margin.ts +++ b/src/vs/editor/browser/viewParts/margin/margin.ts @@ -45,7 +45,7 @@ export class Margin extends ViewPart { this._domNode.appendChild(this._glyphMarginBackgroundDomNode); } - public dispose(): void { + public override dispose(): void { super.dispose(); } @@ -55,7 +55,7 @@ export class Margin extends ViewPart { // --- begin event handlers - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { const options = this._context.configuration.options; const layoutInfo = options.get(EditorOption.layoutInfo); @@ -66,7 +66,7 @@ export class Margin extends ViewPart { return true; } - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { + public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return super.onScrollChanged(e) || e.scrollTopChanged; } diff --git a/src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.ts b/src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.ts index 7f5d18d862167e..89a154d5dcdfa4 100644 --- a/src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.ts +++ b/src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.ts @@ -20,7 +20,7 @@ export class MarginViewLineDecorationsOverlay extends DedupOverlay { this._context.addEventHandler(this); } - public dispose(): void { + public override dispose(): void { this._context.removeEventHandler(this); this._renderResult = null; super.dispose(); @@ -28,28 +28,28 @@ export class MarginViewLineDecorationsOverlay extends DedupOverlay { // --- begin event handlers - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { return true; } - public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { + public override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { return true; } - public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { + public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean { return true; } - public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { + public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { return true; } - public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { + public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { return true; } - public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { + public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { + public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollTopChanged; } - public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { + public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { return true; } diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.ts b/src/vs/editor/browser/viewParts/minimap/minimap.ts index 348315fa9a8f09..0ea038e6b89019 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.ts +++ b/src/vs/editor/browser/viewParts/minimap/minimap.ts @@ -759,7 +759,7 @@ export class Minimap extends ViewPart implements IMinimapModel { this._actual = new InnerMinimap(context.theme, this); } - public dispose(): void { + public override dispose(): void { this._actual.dispose(); super.dispose(); } @@ -781,27 +781,27 @@ export class Minimap extends ViewPart implements IMinimapModel { // ---- begin view event handlers - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { return this._onOptionsMaybeChanged(); } - public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + public override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { this._selections = e.selections; this._minimapSelections = null; return this._actual.onSelectionChanged(); } - public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { + public override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { if (e.affectsMinimap) { return this._actual.onDecorationsChanged(); } return false; } - public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { + public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean { if (this._samplingState) { this._shouldCheckSampling = true; } return this._actual.onFlushed(); } - public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { + public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { if (this._samplingState) { const minimapLineRange = this._samplingState.modelLineRangeToMinimapLineRange(e.fromLineNumber, e.toLineNumber); if (minimapLineRange) { @@ -813,7 +813,7 @@ export class Minimap extends ViewPart implements IMinimapModel { return this._actual.onLinesChanged(e.fromLineNumber, e.toLineNumber); } } - public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { + public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { if (this._samplingState) { const [changeStartIndex, changeEndIndex] = this._samplingState.onLinesDeleted(e); if (changeStartIndex <= changeEndIndex) { @@ -825,7 +825,7 @@ export class Minimap extends ViewPart implements IMinimapModel { return this._actual.onLinesDeleted(e.fromLineNumber, e.toLineNumber); } } - public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { + public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { if (this._samplingState) { this._samplingState.onLinesInserted(e); this._shouldCheckSampling = true; @@ -834,16 +834,16 @@ export class Minimap extends ViewPart implements IMinimapModel { return this._actual.onLinesInserted(e.fromLineNumber, e.toLineNumber); } } - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { + public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return this._actual.onScrollChanged(); } - public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { + public override onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { this._context.model.invalidateMinimapColorCache(); this._actual.onThemeChanged(); this._onOptionsMaybeChanged(); return true; } - public onTokensChanged(e: viewEvents.ViewTokensChangedEvent): boolean { + public override onTokensChanged(e: viewEvents.ViewTokensChangedEvent): boolean { if (this._samplingState) { let ranges: { fromLineNumber: number; toLineNumber: number; }[] = []; for (const range of e.ranges) { @@ -861,11 +861,11 @@ export class Minimap extends ViewPart implements IMinimapModel { return this._actual.onTokensChanged(e.ranges); } } - public onTokensColorsChanged(e: viewEvents.ViewTokensColorsChangedEvent): boolean { + public override onTokensColorsChanged(e: viewEvents.ViewTokensColorsChangedEvent): boolean { this._onOptionsMaybeChanged(); return this._actual.onTokensColorsChanged(); } - public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { + public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { return this._actual.onZonesChanged(); } @@ -1211,7 +1211,7 @@ class InnerMinimap extends Disposable { this._model.setScrollTop(scrollTop); } - public dispose(): void { + public override dispose(): void { this._mouseDownListener.dispose(); this._sliderMouseMoveMonitor.dispose(); this._sliderMouseDownListener.dispose(); diff --git a/src/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.ts b/src/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.ts index b51be8aaba8cdd..ea3881e8a8a4ae 100644 --- a/src/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.ts +++ b/src/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.ts @@ -52,7 +52,7 @@ export class ViewOverlayWidgets extends ViewPart { this._domNode.setClassName('overlayWidgets'); } - public dispose(): void { + public override dispose(): void { super.dispose(); this._widgets = {}; } @@ -63,7 +63,7 @@ export class ViewOverlayWidgets extends ViewPart { // ---- begin view event handlers - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { const options = this._context.configuration.options; const layoutInfo = options.get(EditorOption.layoutInfo); diff --git a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts index 287011babea04c..02cc65c127ab11 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts @@ -237,7 +237,7 @@ export class DecorationsOverviewRuler extends ViewPart { this._cursorPositions = []; } - public dispose(): void { + public override dispose(): void { super.dispose(); this._tokensColorTrackerListener.dispose(); } @@ -267,10 +267,10 @@ export class DecorationsOverviewRuler extends ViewPart { // ---- begin view event handlers - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { return this._updateSettings(false); } - public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + public override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { this._cursorPositions = []; for (let i = 0, len = e.selections.length; i < len; i++) { this._cursorPositions[i] = e.selections[i].getPosition(); @@ -278,22 +278,22 @@ export class DecorationsOverviewRuler extends ViewPart { this._cursorPositions.sort(Position.compare); return true; } - public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { + public override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { if (e.affectsOverviewRuler) { return true; } return false; } - public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { + public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean { return true; } - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { + public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollHeightChanged; } - public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { + public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { return true; } - public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { + public override onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { // invalidate color cache this._context.model.invalidateOverviewRulerColorCache(); return this._updateSettings(false); diff --git a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts index b75ba0ae4223c0..d13dc67d8ac8c1 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts @@ -39,14 +39,14 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { this._context.addEventHandler(this); } - public dispose(): void { + public override dispose(): void { this._context.removeEventHandler(this); super.dispose(); } // ---- begin view event handlers - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { const options = this._context.configuration.options; if (e.hasChanged(EditorOption.lineHeight)) { @@ -65,18 +65,18 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { return true; } - public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { + public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean { this._render(); return true; } - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { + public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { if (e.scrollHeightChanged) { this._zoneManager.setOuterHeight(e.scrollHeight); this._render(); } return true; } - public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { + public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { this._render(); return true; } diff --git a/src/vs/editor/browser/viewParts/rulers/rulers.ts b/src/vs/editor/browser/viewParts/rulers/rulers.ts index 696e088de58103..fef13c81a92852 100644 --- a/src/vs/editor/browser/viewParts/rulers/rulers.ts +++ b/src/vs/editor/browser/viewParts/rulers/rulers.ts @@ -32,19 +32,19 @@ export class Rulers extends ViewPart { this._typicalHalfwidthCharacterWidth = options.get(EditorOption.fontInfo).typicalHalfwidthCharacterWidth; } - public dispose(): void { + public override dispose(): void { super.dispose(); } // --- begin event handlers - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { const options = this._context.configuration.options; this._rulers = options.get(EditorOption.rulers); this._typicalHalfwidthCharacterWidth = options.get(EditorOption.fontInfo).typicalHalfwidthCharacterWidth; return true; } - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { + public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollHeightChanged; } diff --git a/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts b/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts index 12e4df8b4658c9..5e5d5b6d566df6 100644 --- a/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts +++ b/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts @@ -37,7 +37,7 @@ export class ScrollDecorationViewPart extends ViewPart { this._domNode.setAttribute('aria-hidden', 'true'); } - public dispose(): void { + public override dispose(): void { super.dispose(); } @@ -67,7 +67,7 @@ export class ScrollDecorationViewPart extends ViewPart { // --- begin event handlers - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { const options = this._context.configuration.options; const scrollbar = options.get(EditorOption.scrollbar); this._useShadows = scrollbar.useShadows; @@ -75,7 +75,7 @@ export class ScrollDecorationViewPart extends ViewPart { this._updateShouldShow(); return true; } - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { + public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { this._scrollTop = e.scrollTop; return this._updateShouldShow(); } diff --git a/src/vs/editor/browser/viewParts/selections/selections.ts b/src/vs/editor/browser/viewParts/selections/selections.ts index 383f55a38c0f32..2ecb8afc50f30d 100644 --- a/src/vs/editor/browser/viewParts/selections/selections.ts +++ b/src/vs/editor/browser/viewParts/selections/selections.ts @@ -86,7 +86,7 @@ export class SelectionsOverlay extends DynamicViewOverlay { this._context.addEventHandler(this); } - public dispose(): void { + public override dispose(): void { this._context.removeEventHandler(this); this._renderResult = null; super.dispose(); @@ -94,37 +94,37 @@ export class SelectionsOverlay extends DynamicViewOverlay { // --- begin event handlers - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { const options = this._context.configuration.options; this._lineHeight = options.get(EditorOption.lineHeight); this._roundedSelection = options.get(EditorOption.roundedSelection); this._typicalHalfwidthCharacterWidth = options.get(EditorOption.fontInfo).typicalHalfwidthCharacterWidth; return true; } - public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + public override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { this._selections = e.selections.slice(0); return true; } - public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { + public override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { // true for inline decorations that can end up relayouting text return true;//e.inlineDecorationsChanged; } - public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { + public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean { return true; } - public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { + public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { return true; } - public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { + public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { return true; } - public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { + public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { + public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollTopChanged; } - public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { + public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { return true; } diff --git a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts index ec5077ea0c7aec..7454608e4f4a2a 100644 --- a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts +++ b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts @@ -74,7 +74,7 @@ export class ViewCursors extends ViewPart { this._updateBlinking(); } - public dispose(): void { + public override dispose(): void { super.dispose(); this._startCursorBlinkAnimation.dispose(); this._cursorFlatBlinkInterval.dispose(); @@ -85,17 +85,17 @@ export class ViewCursors extends ViewPart { } // --- begin event handlers - public onCompositionStart(e: viewEvents.ViewCompositionStartEvent): boolean { + public override onCompositionStart(e: viewEvents.ViewCompositionStartEvent): boolean { this._isComposingInput = true; this._updateBlinking(); return true; } - public onCompositionEnd(e: viewEvents.ViewCompositionEndEvent): boolean { + public override onCompositionEnd(e: viewEvents.ViewCompositionEndEvent): boolean { this._isComposingInput = false; this._updateBlinking(); return true; } - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { const options = this._context.configuration.options; this._readOnly = options.get(EditorOption.readOnly); @@ -138,7 +138,7 @@ export class ViewCursors extends ViewPart { } } - public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + public override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { const positions: Position[] = []; for (let i = 0, len = e.selections.length; i < len; i++) { positions[i] = e.selections[i].getPosition(); @@ -154,31 +154,31 @@ export class ViewCursors extends ViewPart { return true; } - public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { + public override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { // true for inline decorations that can end up relayouting text return true; } - public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { + public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean { return true; } - public onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean { + public override onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean { this._editorHasFocus = e.isFocused; this._updateBlinking(); return false; } - public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { + public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { return true; } - public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { + public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { return true; } - public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { + public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { + public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return true; } - public onTokensChanged(e: viewEvents.ViewTokensChangedEvent): boolean { + public override onTokensChanged(e: viewEvents.ViewTokensChangedEvent): boolean { const shouldRender = (position: Position) => { for (let i = 0, len = e.ranges.length; i < len; i++) { if (e.ranges[i].fromLineNumber <= position.lineNumber && position.lineNumber <= e.ranges[i].toLineNumber) { @@ -197,7 +197,7 @@ export class ViewCursors extends ViewPart { } return false; } - public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { + public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { return true; } diff --git a/src/vs/editor/browser/viewParts/viewZones/viewZones.ts b/src/vs/editor/browser/viewParts/viewZones/viewZones.ts index a73026a3f9bdca..7d6ae1885218a5 100644 --- a/src/vs/editor/browser/viewParts/viewZones/viewZones.ts +++ b/src/vs/editor/browser/viewParts/viewZones/viewZones.ts @@ -66,7 +66,7 @@ export class ViewZones extends ViewPart { this._zones = {}; } - public dispose(): void { + public override dispose(): void { super.dispose(); this._zones = {}; } @@ -97,7 +97,7 @@ export class ViewZones extends ViewPart { return hadAChange; } - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { + public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { const options = this._context.configuration.options; const layoutInfo = options.get(EditorOption.layoutInfo); @@ -112,23 +112,23 @@ export class ViewZones extends ViewPart { return true; } - public onLineMappingChanged(e: viewEvents.ViewLineMappingChangedEvent): boolean { + public override onLineMappingChanged(e: viewEvents.ViewLineMappingChangedEvent): boolean { return this._recomputeWhitespacesProps(); } - public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { + public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { return true; } - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { + public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollTopChanged || e.scrollWidthChanged; } - public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { + public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { return true; } - public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { + public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index 244447104d66c7..9d89b72db24f25 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -346,7 +346,7 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE return editorCommon.EditorType.ICodeEditor; } - public dispose(): void { + public override dispose(): void { this._codeEditorService.removeCodeEditor(this); this._focusTracker.dispose(); @@ -1906,7 +1906,7 @@ export class EditorModeContext extends Disposable { update(); } - dispose() { + override dispose() { super.dispose(); } diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index 6256e77b6ece36..19170cfe828040 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -619,7 +619,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE return instantiationService.createInstance(CodeEditorWidget, container, options, editorWidgetOptions); } - public dispose(): void { + public override dispose(): void { this._codeEditorService.removeDiffEditor(this); if (this._beginUpdateDecorationsTimeout !== -1) { @@ -2239,7 +2239,7 @@ class InlineViewZonesComputer extends ViewZonesComputer { this._lineBreaksComputer = this._modifiedEditor._getViewModel()!.createLineBreaksComputer(); } - public getViewZones(): IEditorsZones { + public override getViewZones(): IEditorsZones { const result = super.getViewZones(); this._finalize(result); return result; diff --git a/src/vs/editor/browser/widget/diffNavigator.ts b/src/vs/editor/browser/widget/diffNavigator.ts index f341549a1dc210..a69b401c677c05 100644 --- a/src/vs/editor/browser/widget/diffNavigator.ts +++ b/src/vs/editor/browser/widget/diffNavigator.ts @@ -221,7 +221,7 @@ export class DiffNavigator extends Disposable implements IDiffNavigator { this._move(false, scrollType); } - dispose(): void { + override dispose(): void { super.dispose(); this.ranges = []; this.disposed = true; diff --git a/src/vs/editor/browser/widget/embeddedCodeEditorWidget.ts b/src/vs/editor/browser/widget/embeddedCodeEditorWidget.ts index 3836a4ec0573fe..911e593563ac3d 100644 --- a/src/vs/editor/browser/widget/embeddedCodeEditorWidget.ts +++ b/src/vs/editor/browser/widget/embeddedCodeEditorWidget.ts @@ -57,7 +57,7 @@ export class EmbeddedCodeEditorWidget extends CodeEditorWidget { super.updateOptions(this._overwriteOptions); } - updateOptions(newOptions: IEditorOptions): void { + override updateOptions(newOptions: IEditorOptions): void { objects.mixin(this._overwriteOptions, newOptions, true); super.updateOptions(this._overwriteOptions); } @@ -102,7 +102,7 @@ export class EmbeddedDiffEditorWidget extends DiffEditorWidget { super.updateOptions(this._overwriteOptions); } - updateOptions(newOptions: IEditorOptions): void { + override updateOptions(newOptions: IEditorOptions): void { objects.mixin(this._overwriteOptions, newOptions, true); super.updateOptions(this._overwriteOptions); } diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 73ff201a517a93..6ebd6492b19f30 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -906,7 +906,7 @@ class EditorBooleanOption extends SimpleEditorOption extends SimpleEditorOption extends SimpleEditorOption extends SimpleEditorOption extends this._allowedValues = allowedValues; } - public validate(input: any): V { + public override validate(input: any): V { return stringSet(input, this.defaultValue, this._allowedValues); } } @@ -1112,7 +1112,7 @@ class EditorAccessibilitySupport extends BaseEditorOption { ); } - public validate(input: any): number { + public override validate(input: any): number { let r = EditorFloatOption.float(input, this.defaultValue); if (r === 0) { return EDITOR_FONT_DEFAULTS.fontSize; } return EditorFloatOption.clamp(r, 6, 100); } - public compute(env: IEnvironmentalOptions, options: IComputedEditorOptions, value: number): number { + public override compute(env: IEnvironmentalOptions, options: IComputedEditorOptions, value: number): number { // The final fontSize respects the editor zoom level. // So take the result from env.fontInfo return env.fontInfo.fontSize; @@ -2470,7 +2470,7 @@ class EditorLineHeight extends EditorIntOption { ); } - public compute(env: IEnvironmentalOptions, options: IComputedEditorOptions, value: number): number { + public override compute(env: IEnvironmentalOptions, options: IComputedEditorOptions, value: number): number { // The lineHeight is computed from the fontSize if it is 0. // Moreover, the final lineHeight respects the editor zoom level. // So take the result from env.fontInfo @@ -2766,7 +2766,7 @@ export type ValidQuickSuggestionsOptions = boolean | Readonly { - public readonly defaultValue: Readonly>; + public override readonly defaultValue: Readonly>; constructor() { const defaults: ValidQuickSuggestionsOptions = { diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index 36c9691b295993..41f2a9b17d4440 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -156,7 +156,7 @@ export class Cursor extends Disposable { this._prevEditOperationType = EditOperationType.Other; } - public dispose(): void { + public override dispose(): void { this._cursors.dispose(); this._autoClosedActions = dispose(this._autoClosedActions); super.dispose(); diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index ff4c4c567ef900..4acc0ae72be299 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -957,7 +957,7 @@ export class TypeWithAutoClosingCommand extends ReplaceCommandWithOffsetCursorSt this.enclosingRange = null; } - public computeCursorState(model: ITextModel, helper: ICursorStateComputerData): Selection { + public override computeCursorState(model: ITextModel, helper: ICursorStateComputerData): Selection { let inverseEditOperations = helper.getInverseEditOperations(); let range = inverseEditOperations[0].range; this.closeCharacterRange = new Range(range.startLineNumber, range.endColumn - this._closeCharacter.length, range.endLineNumber, range.endColumn); diff --git a/src/vs/editor/common/core/selection.ts b/src/vs/editor/common/core/selection.ts index 8f192adcb9385e..37ec04cd12de62 100644 --- a/src/vs/editor/common/core/selection.ts +++ b/src/vs/editor/common/core/selection.ts @@ -76,7 +76,7 @@ export class Selection extends Range { /** * Transform to a human-readable representation. */ - public toString(): string { + public override toString(): string { return '[' + this.selectionStartLineNumber + ',' + this.selectionStartColumn + ' -> ' + this.positionLineNumber + ',' + this.positionColumn + ']'; } @@ -114,7 +114,7 @@ export class Selection extends Range { /** * Create a new selection with a different `positionLineNumber` and `positionColumn`. */ - public setEndPosition(endLineNumber: number, endColumn: number): Selection { + public override setEndPosition(endLineNumber: number, endColumn: number): Selection { if (this.getDirection() === SelectionDirection.LTR) { return new Selection(this.startLineNumber, this.startColumn, endLineNumber, endColumn); } @@ -131,7 +131,7 @@ export class Selection extends Range { /** * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`. */ - public setStartPosition(startLineNumber: number, startColumn: number): Selection { + public override setStartPosition(startLineNumber: number, startColumn: number): Selection { if (this.getDirection() === SelectionDirection.LTR) { return new Selection(startLineNumber, startColumn, this.endLineNumber, this.endColumn); } diff --git a/src/vs/editor/common/model/textModel.ts b/src/vs/editor/common/model/textModel.ts index 6e01f85c7c521b..5abb19f3ce0038 100644 --- a/src/vs/editor/common/model/textModel.ts +++ b/src/vs/editor/common/model/textModel.ts @@ -384,7 +384,7 @@ export class TextModel extends Disposable implements model.ITextModel { this._tokenization = new TextModelTokenization(this); } - public dispose(): void { + public override dispose(): void { this._isDisposing = true; this._onWillDispose.fire(); this._languageRegistryListener.dispose(); diff --git a/src/vs/editor/common/model/textModelTokens.ts b/src/vs/editor/common/model/textModelTokens.ts index 3cf7bc9a29227b..5696219cc4a947 100644 --- a/src/vs/editor/common/model/textModelTokens.ts +++ b/src/vs/editor/common/model/textModelTokens.ts @@ -246,7 +246,7 @@ export class TextModelTokenization extends Disposable { this._resetTokenizationState(); } - public dispose(): void { + public override dispose(): void { this._isDisposed = true; super.dispose(); } diff --git a/src/vs/editor/common/services/editorSimpleWorker.ts b/src/vs/editor/common/services/editorSimpleWorker.ts index 5bdbc995b04905..4cab183c0eee87 100644 --- a/src/vs/editor/common/services/editorSimpleWorker.ts +++ b/src/vs/editor/common/services/editorSimpleWorker.ts @@ -96,7 +96,7 @@ class MirrorModel extends BaseMirrorModel implements ICommonModel { return this._uri; } - public get version(): number { + public override get version(): number { return this._versionId; } diff --git a/src/vs/editor/common/services/editorWorkerServiceImpl.ts b/src/vs/editor/common/services/editorWorkerServiceImpl.ts index dc6a0f706a688a..2763dd1280d82e 100644 --- a/src/vs/editor/common/services/editorWorkerServiceImpl.ts +++ b/src/vs/editor/common/services/editorWorkerServiceImpl.ts @@ -77,7 +77,7 @@ export class EditorWorkerServiceImpl extends Disposable implements IEditorWorker this._register(modes.CompletionProviderRegistry.register('*', new WordBasedCompletionItemProvider(this._workerManager, configurationService, this._modelService))); } - public dispose(): void { + public override dispose(): void { super.dispose(); } @@ -225,7 +225,7 @@ class WorkerManager extends Disposable { this._register(this._modelService.onModelRemoved(_ => this._checkStopEmptyWorker())); } - public dispose(): void { + public override dispose(): void { if (this._editorWorkerClient) { this._editorWorkerClient.dispose(); this._editorWorkerClient = null; @@ -292,7 +292,7 @@ class EditorModelManager extends Disposable { } } - public dispose(): void { + public override dispose(): void { for (let modelUrl in this._syncedModels) { dispose(this._syncedModels[modelUrl]); } @@ -523,7 +523,7 @@ export class EditorWorkerClient extends Disposable { }); } - dispose(): void { + override dispose(): void { super.dispose(); this._disposed = true; } diff --git a/src/vs/editor/common/services/markerDecorationsServiceImpl.ts b/src/vs/editor/common/services/markerDecorationsServiceImpl.ts index a80302ddbccc6a..939470195c9458 100644 --- a/src/vs/editor/common/services/markerDecorationsServiceImpl.ts +++ b/src/vs/editor/common/services/markerDecorationsServiceImpl.ts @@ -81,7 +81,7 @@ export class MarkerDecorationsService extends Disposable implements IMarkerDecor this._register(this._markerService.onMarkerChanged(this._handleMarkerChange, this)); } - dispose() { + override dispose() { super.dispose(); this._markerDecorations.forEach(value => value.dispose()); this._markerDecorations.clear(); diff --git a/src/vs/editor/common/services/modelServiceImpl.ts b/src/vs/editor/common/services/modelServiceImpl.ts index af7000ffd9c09a..3357e282ea175a 100644 --- a/src/vs/editor/common/services/modelServiceImpl.ts +++ b/src/vs/editor/common/services/modelServiceImpl.ts @@ -774,7 +774,7 @@ export class ModelSemanticColoring extends Disposable { this._fetchDocumentSemanticTokens.schedule(0); } - public dispose(): void { + public override dispose(): void { if (this._currentDocumentResponse) { this._currentDocumentResponse.dispose(); this._currentDocumentResponse = null; diff --git a/src/vs/editor/common/services/webWorker.ts b/src/vs/editor/common/services/webWorker.ts index 55dfe84af398c3..2e3e7e67148e00 100644 --- a/src/vs/editor/common/services/webWorker.ts +++ b/src/vs/editor/common/services/webWorker.ts @@ -76,7 +76,7 @@ class MonacoWebWorkerImpl extends EditorWorkerClient implements MonacoWebWork } // foreign host request - public fhr(method: string, args: any[]): Promise { + public override fhr(method: string, args: any[]): Promise { if (!this._foreignModuleHost || typeof this._foreignModuleHost[method] !== 'function') { return Promise.reject(new Error('Missing method ' + method + ' or missing main thread foreign host.')); } diff --git a/src/vs/editor/common/viewLayout/viewLayout.ts b/src/vs/editor/common/viewLayout/viewLayout.ts index 9d5583ee0da37e..2f9d18b13ba7f8 100644 --- a/src/vs/editor/common/viewLayout/viewLayout.ts +++ b/src/vs/editor/common/viewLayout/viewLayout.ts @@ -178,7 +178,7 @@ export class ViewLayout extends Disposable implements IViewLayout { this._updateHeight(); } - public dispose(): void { + public override dispose(): void { super.dispose(); } diff --git a/src/vs/editor/common/viewModel/monospaceLineBreaksComputer.ts b/src/vs/editor/common/viewModel/monospaceLineBreaksComputer.ts index 9640d007634aba..57370e069f7a54 100644 --- a/src/vs/editor/common/viewModel/monospaceLineBreaksComputer.ts +++ b/src/vs/editor/common/viewModel/monospaceLineBreaksComputer.ts @@ -32,7 +32,7 @@ class WrappingCharacterClassifier extends CharacterClassifier { } } - public get(charCode: number): CharacterClass { + public override get(charCode: number): CharacterClass { if (charCode >= 0 && charCode < 256) { return this._asciiMap[charCode]; } else { diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index 82dc9853efb9bc..eb7353176b52a5 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -142,7 +142,7 @@ export class ViewModel extends Disposable implements IViewModel { this._updateConfigurationViewLineCountNow(); } - public dispose(): void { + public override dispose(): void { // First remove listeners, as disposing the lines might end up sending // model decoration changed events ... and we no longer care about them ... super.dispose(); diff --git a/src/vs/editor/contrib/codeAction/codeActionModel.ts b/src/vs/editor/contrib/codeAction/codeActionModel.ts index d6e380ddc78a5c..9f230ac4da97c9 100644 --- a/src/vs/editor/contrib/codeAction/codeActionModel.ts +++ b/src/vs/editor/contrib/codeAction/codeActionModel.ts @@ -207,7 +207,7 @@ export class CodeActionModel extends Disposable { this._update(); } - dispose(): void { + override dispose(): void { if (this.#isDisposed) { return; } diff --git a/src/vs/editor/contrib/codeAction/codeActionUi.ts b/src/vs/editor/contrib/codeAction/codeActionUi.ts index 099789d95047c2..7a7abf66191ac3 100644 --- a/src/vs/editor/contrib/codeAction/codeActionUi.ts +++ b/src/vs/editor/contrib/codeAction/codeActionUi.ts @@ -52,7 +52,7 @@ export class CodeActionUi extends Disposable { }); } - dispose() { + override dispose() { this.#disposed = true; super.dispose(); } diff --git a/src/vs/editor/contrib/codeAction/lightBulbWidget.ts b/src/vs/editor/contrib/codeAction/lightBulbWidget.ts index 8eac58026d9aa3..7c0fedd446fa52 100644 --- a/src/vs/editor/contrib/codeAction/lightBulbWidget.ts +++ b/src/vs/editor/contrib/codeAction/lightBulbWidget.ts @@ -126,7 +126,7 @@ export class LightBulbWidget extends Disposable implements IContentWidget { this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon, this)); } - dispose(): void { + override dispose(): void { super.dispose(); this._editor.removeContentWidget(this); } diff --git a/src/vs/editor/contrib/colorPicker/colorContributions.ts b/src/vs/editor/contrib/colorPicker/colorContributions.ts index 90f91a846c1258..d7eefbf410f88f 100644 --- a/src/vs/editor/contrib/colorPicker/colorContributions.ts +++ b/src/vs/editor/contrib/colorPicker/colorContributions.ts @@ -26,7 +26,7 @@ export class ColorContribution extends Disposable implements IEditorContribution this._register(_editor.onMouseDown((e) => this.onMouseDown(e))); } - dispose(): void { + override dispose(): void { super.dispose(); } diff --git a/src/vs/editor/contrib/colorPicker/colorDetector.ts b/src/vs/editor/contrib/colorPicker/colorDetector.ts index ccd09304a0e3ff..4579e3c2daf9cb 100644 --- a/src/vs/editor/contrib/colorPicker/colorDetector.ts +++ b/src/vs/editor/contrib/colorPicker/colorDetector.ts @@ -92,7 +92,7 @@ export class ColorDetector extends Disposable implements IEditorContribution { return editor.getContribution(this.ID); } - dispose(): void { + override dispose(): void { this.stop(); this.removeAllDecorations(); super.dispose(); diff --git a/src/vs/editor/contrib/dnd/dnd.ts b/src/vs/editor/contrib/dnd/dnd.ts index d535bb906960d8..1f15af6828a976 100644 --- a/src/vs/editor/contrib/dnd/dnd.ts +++ b/src/vs/editor/contrib/dnd/dnd.ts @@ -232,7 +232,7 @@ export class DragAndDropController extends Disposable implements IEditorContribu target.type === MouseTargetType.GUTTER_LINE_DECORATIONS; } - public dispose(): void { + public override dispose(): void { this._removeDecoration(); this._dragSelection = null; this._mouseDown = false; diff --git a/src/vs/editor/contrib/find/findController.ts b/src/vs/editor/contrib/find/findController.ts index 8d4e6649a23493..4da47b56237914 100644 --- a/src/vs/editor/contrib/find/findController.ts +++ b/src/vs/editor/contrib/find/findController.ts @@ -139,7 +139,7 @@ export class CommonFindController extends Disposable implements IEditorContribut })); } - public dispose(): void { + public override dispose(): void { this.disposeModel(); super.dispose(); } @@ -422,7 +422,7 @@ export class FindController extends CommonFindController implements IFindControl this._findOptionsWidget = null; } - protected async _start(opts: IFindStartOptions): Promise { + protected async override _start(opts: IFindStartOptions): Promise { if (!this._widget) { this._createFindWidget(); } @@ -459,7 +459,7 @@ export class FindController extends CommonFindController implements IFindControl } } - public highlightFindOptions(ignoreWhenVisible: boolean = false): void { + public override highlightFindOptions(ignoreWhenVisible: boolean = false): void { if (!this._widget) { this._createFindWidget(); } diff --git a/src/vs/editor/contrib/find/findOptionsWidget.ts b/src/vs/editor/contrib/find/findOptionsWidget.ts index 660eed85579b32..72b9bdf9f2dab4 100644 --- a/src/vs/editor/contrib/find/findOptionsWidget.ts +++ b/src/vs/editor/contrib/find/findOptionsWidget.ts @@ -128,7 +128,7 @@ export class FindOptionsWidget extends Widget implements IOverlayWidget { return ` (${kb.getLabel()})`; } - public dispose(): void { + public override dispose(): void { this._editor.removeOverlayWidget(this); super.dispose(); } diff --git a/src/vs/editor/contrib/find/test/findController.test.ts b/src/vs/editor/contrib/find/test/findController.test.ts index 9daca6b12dacb7..6bf8752fe349cb 100644 --- a/src/vs/editor/contrib/find/test/findController.test.ts +++ b/src/vs/editor/contrib/find/test/findController.test.ts @@ -41,7 +41,7 @@ export class TestFindController extends CommonFindController { this.hasFocus = false; } - protected async _start(opts: IFindStartOptions): Promise { + protected async override _start(opts: IFindStartOptions): Promise { await super._start(opts); if (opts.shouldFocus !== FindStartFocusAction.NoFocusChange) { diff --git a/src/vs/editor/contrib/folding/folding.ts b/src/vs/editor/contrib/folding/folding.ts index 139348a448addf..c6396a556db8b8 100644 --- a/src/vs/editor/contrib/folding/folding.ts +++ b/src/vs/editor/contrib/folding/folding.ts @@ -475,7 +475,7 @@ abstract class FoldingAction extends EditorAction { abstract invoke(foldingController: FoldingController, foldingModel: FoldingModel, editor: ICodeEditor, args: T): void; - public runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: T): void | Promise { + public override runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: T): void | Promise { let foldingController = FoldingController.get(editor); if (!foldingController) { return; diff --git a/src/vs/editor/contrib/gotoError/gotoErrorWidget.ts b/src/vs/editor/contrib/gotoError/gotoErrorWidget.ts index 8096baa177be06..5a78e184f6a356 100644 --- a/src/vs/editor/contrib/gotoError/gotoErrorWidget.ts +++ b/src/vs/editor/contrib/gotoError/gotoErrorWidget.ts @@ -280,14 +280,14 @@ export class MarkerNavigationWidget extends PeekViewWidget { }); // style() will trigger _applyStyles } - protected _applyStyles(): void { + protected override _applyStyles(): void { if (this._parentContainer) { this._parentContainer.style.backgroundColor = this._backgroundColor ? this._backgroundColor.toString() : ''; } super._applyStyles(); } - dispose(): void { + override dispose(): void { this._callOnDispose.dispose(); super.dispose(); } @@ -296,7 +296,7 @@ export class MarkerNavigationWidget extends PeekViewWidget { this._parentContainer.focus(); } - protected _fillHead(container: HTMLElement): void { + protected override _fillHead(container: HTMLElement): void { super._fillHead(container); this._disposables.add(this._actionbarWidget!.actionRunner.onBeforeRun(e => this.editor.focus())); @@ -308,7 +308,7 @@ export class MarkerNavigationWidget extends PeekViewWidget { menu.dispose(); } - protected _fillTitleIcon(container: HTMLElement): void { + protected override _fillTitleIcon(container: HTMLElement): void { this._icon = dom.append(container, dom.$('')); } @@ -325,7 +325,7 @@ export class MarkerNavigationWidget extends PeekViewWidget { this._disposables.add(this._message); } - show(): void { + override show(): void { throw new Error('call showAtMarker'); } @@ -369,18 +369,18 @@ export class MarkerNavigationWidget extends PeekViewWidget { this._relayout(); } - protected _doLayoutBody(heightInPixel: number, widthInPixel: number): void { + protected override _doLayoutBody(heightInPixel: number, widthInPixel: number): void { super._doLayoutBody(heightInPixel, widthInPixel); this._heightInPixel = heightInPixel; this._message.layout(heightInPixel, widthInPixel); this._container.style.height = `${heightInPixel}px`; } - public _onWidth(widthInPixel: number): void { + public override _onWidth(widthInPixel: number): void { this._message.layout(this._heightInPixel, widthInPixel); } - protected _relayout(): void { + protected override _relayout(): void { super._relayout(this.computeRequiredHeight()); } diff --git a/src/vs/editor/contrib/gotoSymbol/goToCommands.ts b/src/vs/editor/contrib/gotoSymbol/goToCommands.ts index 835033505288b2..50ff4809f47c26 100644 --- a/src/vs/editor/contrib/gotoSymbol/goToCommands.ts +++ b/src/vs/editor/contrib/gotoSymbol/goToCommands.ts @@ -379,7 +379,7 @@ registerEditorAction(class GoToDeclarationAction extends DeclarationAction { }); } - protected _getNoResultFoundMessage(info: IWordAtPosition | null): string { + protected override _getNoResultFoundMessage(info: IWordAtPosition | null): string { return info && info.word ? nls.localize('decl.noResultWord', "No declaration found for '{0}'", info.word) : nls.localize('decl.generic.noResults', "No declaration found"); @@ -744,7 +744,7 @@ CommandsRegistry.registerCommand({ return editor.invokeWithinContext(accessor => { const command = new class extends GenericGoToLocationAction { - _getNoResultFoundMessage(info: IWordAtPosition | null) { + override _getNoResultFoundMessage(info: IWordAtPosition | null) { return noResultsMessage || super._getNoResultFoundMessage(info); } }({ diff --git a/src/vs/editor/contrib/gotoSymbol/peek/referencesWidget.ts b/src/vs/editor/contrib/gotoSymbol/peek/referencesWidget.ts index 09472b107c3a52..9f93856f7da588 100644 --- a/src/vs/editor/contrib/gotoSymbol/peek/referencesWidget.ts +++ b/src/vs/editor/contrib/gotoSymbol/peek/referencesWidget.ts @@ -231,7 +231,7 @@ export class ReferenceWidget extends peekView.PeekViewWidget { this.create(); } - dispose(): void { + override dispose(): void { this.setModel(undefined); this._callOnDispose.dispose(); this._disposeOnNewModel.dispose(); @@ -254,7 +254,7 @@ export class ReferenceWidget extends peekView.PeekViewWidget { }); } - show(where: IRange) { + override show(where: IRange) { this.editor.revealRangeInCenterIfOutsideViewport(where, ScrollType.Smooth); super.show(where, this.layoutData.heightInLines || 18); } @@ -271,7 +271,7 @@ export class ReferenceWidget extends peekView.PeekViewWidget { return this._preview.hasTextFocus(); } - protected _onTitleClick(e: IMouseEvent): void { + protected override _onTitleClick(e: IMouseEvent): void { if (this._preview && this._preview.getModel()) { this._onDidSelectReference.fire({ element: this._getFocusedReference(), @@ -398,13 +398,13 @@ export class ReferenceWidget extends peekView.PeekViewWidget { dom.hide(this._treeContainer); } - protected _onWidth(width: number) { + protected override _onWidth(width: number) { if (this._dim) { this._doLayoutBody(this._dim.height, width); } } - protected _doLayoutBody(heightInPixel: number, widthInPixel: number): void { + protected override _doLayoutBody(heightInPixel: number, widthInPixel: number): void { super._doLayoutBody(heightInPixel, widthInPixel); this._dim = new dom.Dimension(widthInPixel, heightInPixel); this.layoutData.heightInLines = this._viewZone ? this._viewZone.heightInLines : this.layoutData.heightInLines; diff --git a/src/vs/editor/contrib/hover/hoverWidgets.ts b/src/vs/editor/contrib/hover/hoverWidgets.ts index ecc374f22b2451..446be6a8b37001 100644 --- a/src/vs/editor/contrib/hover/hoverWidgets.ts +++ b/src/vs/editor/contrib/hover/hoverWidgets.ts @@ -83,7 +83,7 @@ export class GlyphHoverWidget extends Widget implements IOverlayWidget { return null; } - public dispose(): void { + public override dispose(): void { this._editor.removeOverlayWidget(this); super.dispose(); } diff --git a/src/vs/editor/contrib/hover/modesContentHover.ts b/src/vs/editor/contrib/hover/modesContentHover.ts index 7b401019e0618d..ade944741b10a7 100644 --- a/src/vs/editor/contrib/hover/modesContentHover.ts +++ b/src/vs/editor/contrib/hover/modesContentHover.ts @@ -292,7 +292,7 @@ export class ModesContentHoverWidget extends Widget implements IContentWidget, I })); } - public dispose(): void { + public override dispose(): void { this._hoverOperation.cancel(); this._editor.removeContentWidget(this); super.dispose(); diff --git a/src/vs/editor/contrib/hover/modesGlyphHover.ts b/src/vs/editor/contrib/hover/modesGlyphHover.ts index 54d0c58c7321b8..db0337c0652b28 100644 --- a/src/vs/editor/contrib/hover/modesGlyphHover.ts +++ b/src/vs/editor/contrib/hover/modesGlyphHover.ts @@ -117,7 +117,7 @@ export class ModesGlyphHoverWidget extends GlyphHoverWidget { } - public dispose(): void { + public override dispose(): void { this._hoverOperation.cancel(); super.dispose(); } @@ -147,7 +147,7 @@ export class ModesGlyphHoverWidget extends GlyphHoverWidget { this._hoverOperation.start(HoverStartMode.Delayed); } - public hide(): void { + public override hide(): void { this._lastLineNumber = -1; this._hoverOperation.cancel(); super.hide(); diff --git a/src/vs/editor/contrib/linkedEditing/linkedEditing.ts b/src/vs/editor/contrib/linkedEditing/linkedEditing.ts index 441460812f4b2a..8a586c1b13a078 100644 --- a/src/vs/editor/contrib/linkedEditing/linkedEditing.ts +++ b/src/vs/editor/contrib/linkedEditing/linkedEditing.ts @@ -230,7 +230,7 @@ export class LinkedEditingContribution extends Disposable implements IEditorCont } } - public dispose(): void { + public override dispose(): void { this.clearRanges(); super.dispose(); } @@ -378,7 +378,7 @@ export class LinkedEditingAction extends EditorAction { }); } - runCommand(accessor: ServicesAccessor, args: [URI, IPosition]): void | Promise { + override runCommand(accessor: ServicesAccessor, args: [URI, IPosition]): void | Promise { const editorService = accessor.get(ICodeEditorService); const [uri, pos] = Array.isArray(args) && args || [undefined, undefined]; diff --git a/src/vs/editor/contrib/multicursor/multicursor.ts b/src/vs/editor/contrib/multicursor/multicursor.ts index 250a689c71dd0a..cfbd4b2d20827d 100644 --- a/src/vs/editor/contrib/multicursor/multicursor.ts +++ b/src/vs/editor/contrib/multicursor/multicursor.ts @@ -463,7 +463,7 @@ export class MultiCursorSelectionController extends Disposable implements IEdito this._session = null; } - public dispose(): void { + public override dispose(): void { this._endSession(); super.dispose(); } @@ -1060,7 +1060,7 @@ export class SelectionHighlighter extends Disposable implements IEditorContribut className: 'selectionHighlight', }); - public dispose(): void { + public override dispose(): void { this._setState(null); super.dispose(); } diff --git a/src/vs/editor/contrib/parameterHints/parameterHintsModel.ts b/src/vs/editor/contrib/parameterHints/parameterHintsModel.ts index 2c01d06321b004..8c4d7d6fcb2d71 100644 --- a/src/vs/editor/contrib/parameterHints/parameterHintsModel.ts +++ b/src/vs/editor/contrib/parameterHints/parameterHintsModel.ts @@ -305,7 +305,7 @@ export class ParameterHintsModel extends Disposable { } } - dispose(): void { + override dispose(): void { this.cancel(true); super.dispose(); } diff --git a/src/vs/editor/contrib/peekView/peekView.ts b/src/vs/editor/contrib/peekView/peekView.ts index 91e8bc41b42c60..6dbcde25dac002 100644 --- a/src/vs/editor/contrib/peekView/peekView.ts +++ b/src/vs/editor/contrib/peekView/peekView.ts @@ -124,7 +124,7 @@ export abstract class PeekViewWidget extends ZoneWidget { objects.mixin(this.options, defaultOptions, false); } - dispose(): void { + override dispose(): void { if (!this.disposed) { this.disposed = true; // prevent consumers who dispose on onDidClose from looping super.dispose(); @@ -132,7 +132,7 @@ export abstract class PeekViewWidget extends ZoneWidget { } } - style(styles: IPeekViewStyles): void { + override style(styles: IPeekViewStyles): void { let options = this.options; if (styles.headerBackgroundColor) { options.headerBackgroundColor = styles.headerBackgroundColor; @@ -146,7 +146,7 @@ export abstract class PeekViewWidget extends ZoneWidget { super.style(styles); } - protected _applyStyles(): void { + protected override _applyStyles(): void { super._applyStyles(); let options = this.options; if (this._headElement && options.headerBackgroundColor) { @@ -241,7 +241,7 @@ export abstract class PeekViewWidget extends ZoneWidget { protected abstract _fillBody(container: HTMLElement): void; - protected _doLayout(heightInPixel: number, widthInPixel: number): void { + protected override _doLayout(heightInPixel: number, widthInPixel: number): void { if (!this._isShowing && heightInPixel < 0) { // Looks like the view zone got folded away! diff --git a/src/vs/editor/contrib/rename/rename.ts b/src/vs/editor/contrib/rename/rename.ts index 415473087a8282..3eafd33c8a02a5 100644 --- a/src/vs/editor/contrib/rename/rename.ts +++ b/src/vs/editor/contrib/rename/rename.ts @@ -281,7 +281,7 @@ export class RenameAction extends EditorAction { }); } - runCommand(accessor: ServicesAccessor, args: [URI, IPosition]): void | Promise { + override runCommand(accessor: ServicesAccessor, args: [URI, IPosition]): void | Promise { const editorService = accessor.get(ICodeEditorService); const [uri, pos] = Array.isArray(args) && args || [undefined, undefined]; diff --git a/src/vs/editor/contrib/snippet/snippetParser.ts b/src/vs/editor/contrib/snippet/snippetParser.ts index b6bd2eb37d36d6..8986345e970bb1 100644 --- a/src/vs/editor/contrib/snippet/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/snippetParser.ts @@ -200,13 +200,13 @@ export class Text extends Marker { constructor(public value: string) { super(); } - toString() { + override toString() { return this.value; } toTextmateString(): string { return Text.escape(this.value); } - len(): number { + override len(): number { return this.value.length; } clone(): Text { @@ -279,7 +279,7 @@ export class Choice extends Marker { readonly options: Text[] = []; - appendChild(marker: Marker): this { + override appendChild(marker: Marker): this { if (marker instanceof Text) { marker.parent = this; this.options.push(marker); @@ -287,7 +287,7 @@ export class Choice extends Marker { return this; } - toString() { + override toString() { return this.options[0].value; } @@ -297,7 +297,7 @@ export class Choice extends Marker { .join(','); } - len(): number { + override len(): number { return this.options[0].len(); } @@ -341,7 +341,7 @@ export class Transform extends Marker { return ret; } - toString(): string { + override toString(): string { return ''; } @@ -555,12 +555,12 @@ export class TextmateSnippet extends Marker { return this; } - appendChild(child: Marker) { + override appendChild(child: Marker) { this._placeholders = undefined; return super.appendChild(child); } - replace(child: Marker, others: Marker[]): void { + override replace(child: Marker, others: Marker[]): void { this._placeholders = undefined; return super.replace(child, others); } diff --git a/src/vs/editor/contrib/snippet/test/snippetVariables.test.ts b/src/vs/editor/contrib/snippet/test/snippetVariables.test.ts index dff2a64beffbdc..e370cd9ed1550e 100644 --- a/src/vs/editor/contrib/snippet/test/snippetVariables.test.ts +++ b/src/vs/editor/contrib/snippet/test/snippetVariables.test.ts @@ -21,7 +21,7 @@ import { toWorkspaceFolders } from 'vs/platform/workspaces/common/workspaces'; suite('Snippet Variables Resolver', function () { const labelService = new class extends mock() { - getUriLabel(uri: URI) { + override getUriLabel(uri: URI) { return uri.fsPath; } }; @@ -92,7 +92,7 @@ suite('Snippet Variables Resolver', function () { test('Path delimiters in code snippet variables aren\'t specific to remote OS #76840', function () { const labelService = new class extends mock() { - getUriLabel(uri: URI) { + override getUriLabel(uri: URI) { return uri.fsPath.replace(/\/|\\/g, '|'); } }; @@ -349,7 +349,7 @@ suite('Snippet Variables Resolver', function () { // Mock a label service (only coded for file uris) const workspaceLabelService = ((rootPath: string): ILabelService => { const labelService = new class extends mock() { - getUriLabel(uri: URI, options: { relative?: boolean } = {}) { + override getUriLabel(uri: URI, options: { relative?: boolean } = {}) { const rootFsPath = URI.file(rootPath).fsPath + sep; const fsPath = uri.fsPath; if (options.relative && rootPath && fsPath.startsWith(rootFsPath)) { diff --git a/src/vs/editor/contrib/suggest/suggestMemory.ts b/src/vs/editor/contrib/suggest/suggestMemory.ts index dfb293635a22f8..639725c3742f0e 100644 --- a/src/vs/editor/contrib/suggest/suggestMemory.ts +++ b/src/vs/editor/contrib/suggest/suggestMemory.ts @@ -90,7 +90,7 @@ export class LRUMemory extends Memory { }); } - select(model: ITextModel, pos: IPosition, items: CompletionItem[]): number { + override select(model: ITextModel, pos: IPosition, items: CompletionItem[]): number { if (items.length === 0) { return 0; @@ -166,7 +166,7 @@ export class PrefixMemory extends Memory { }); } - select(model: ITextModel, pos: IPosition, items: CompletionItem[]): number { + override select(model: ITextModel, pos: IPosition, items: CompletionItem[]): number { let { word } = model.getWordUntilPosition(pos); if (!word) { return super.select(model, pos, items); diff --git a/src/vs/editor/contrib/suggest/suggestWidgetStatus.ts b/src/vs/editor/contrib/suggest/suggestWidgetStatus.ts index 5739f38f198b64..ad7f97aee271e4 100644 --- a/src/vs/editor/contrib/suggest/suggestWidgetStatus.ts +++ b/src/vs/editor/contrib/suggest/suggestWidgetStatus.ts @@ -17,7 +17,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti class StatusBarViewItem extends MenuEntryActionViewItem { - updateLabel() { + override updateLabel() { const kb = this._keybindingService.lookupKeybinding(this._action.id); if (!kb) { return super.updateLabel(); diff --git a/src/vs/editor/contrib/suggest/test/suggestController.test.ts b/src/vs/editor/contrib/suggest/test/suggestController.test.ts index 11a7019886b47c..492e1cd391d19f 100644 --- a/src/vs/editor/contrib/suggest/test/suggestController.test.ts +++ b/src/vs/editor/contrib/suggest/test/suggestController.test.ts @@ -45,19 +45,19 @@ suite('SuggestController', function () { [IStorageService, new InMemoryStorageService()], [IKeybindingService, new MockKeybindingService()], [IEditorWorkerService, new class extends mock() { - computeWordRanges() { + override computeWordRanges() { return Promise.resolve({}); } }], [ISuggestMemoryService, new class extends mock() { - memorize(): void { } - select(): number { return 0; } + override memorize(): void { } + override select(): number { return 0; } }], [IMenuService, new class extends mock() { - createMenu() { + override createMenu() { return new class extends mock() { - onDidChange = Event.None; - dispose() { } + override onDidChange = Event.None; + override dispose() { } }; } }] diff --git a/src/vs/editor/contrib/suggest/test/suggestModel.test.ts b/src/vs/editor/contrib/suggest/test/suggestModel.test.ts index 6a4afa2d48b0fd..a17fa48850bf65 100644 --- a/src/vs/editor/contrib/suggest/test/suggestModel.test.ts +++ b/src/vs/editor/contrib/suggest/test/suggestModel.test.ts @@ -194,12 +194,12 @@ suite('SuggestModel - TriggerAndCancelOracle', function () { const oracle = new SuggestModel( editor, new class extends mock() { - computeWordRanges() { + override computeWordRanges() { return Promise.resolve({}); } }, new class extends mock() { - readText() { + override readText() { return Promise.resolve('CLIPPY'); } }, @@ -680,7 +680,7 @@ suite('SuggestModel - TriggerAndCancelOracle', function () { return withOracle(async (sugget, editor) => { class TestCtrl extends SuggestController { - _insertSuggestion(item: ISelectedSuggestion, flags: number = 0) { + override _insertSuggestion(item: ISelectedSuggestion, flags: number = 0) { super._insertSuggestion(item, flags); } } diff --git a/src/vs/editor/contrib/suggest/test/wordDistance.test.ts b/src/vs/editor/contrib/suggest/test/wordDistance.test.ts index 05ccef17d53705..c7f7cbf70c997d 100644 --- a/src/vs/editor/contrib/suggest/test/wordDistance.test.ts +++ b/src/vs/editor/contrib/suggest/test/wordDistance.test.ts @@ -54,8 +54,8 @@ suite('suggest, word distance', function () { editor.setPosition({ lineNumber: 2, column: 2 }); let modelService = new class extends mock() { - onModelRemoved = Event.None; - getModel(uri: URI) { + override onModelRemoved = Event.None; + override getModel(uri: URI) { return uri.toString() === model.uri.toString() ? model : null; } }; @@ -74,7 +74,7 @@ suite('suggest, word distance', function () { }); model.onDidChangeContent(e => this._worker.acceptModelChanged(model.uri.toString(), e)); } - computeWordRanges(resource: URI, range: IRange): Promise<{ [word: string]: IRange[] } | null> { + override computeWordRanges(resource: URI, range: IRange): Promise<{ [word: string]: IRange[] } | null> { return this._worker.computeWordRanges(resource.toString(), range, DEFAULT_WORD_REGEXP.source, DEFAULT_WORD_REGEXP.flags); } }; diff --git a/src/vs/editor/contrib/wordHighlighter/wordHighlighter.ts b/src/vs/editor/contrib/wordHighlighter/wordHighlighter.ts index 35e8b64ab0038b..8e2d8a09078500 100644 --- a/src/vs/editor/contrib/wordHighlighter/wordHighlighter.ts +++ b/src/vs/editor/contrib/wordHighlighter/wordHighlighter.ts @@ -140,7 +140,7 @@ class TextualOccurenceAtPositionRequest extends OccurenceAtPositionRequest { }); } - public isValid(model: ITextModel, selection: Selection, decorationIds: string[]): boolean { + public override isValid(model: ITextModel, selection: Selection, decorationIds: string[]): boolean { const currentSelectionIsEmpty = selection.isEmpty(); if (this._selectionIsEmpty !== currentSelectionIsEmpty) { return false; @@ -528,7 +528,7 @@ class WordHighlighterContribution extends Disposable implements IEditorContribut } } - public dispose(): void { + public override dispose(): void { if (this.wordHighlighter) { this.wordHighlighter.dispose(); this.wordHighlighter = null; diff --git a/src/vs/editor/contrib/wordOperations/wordOperations.ts b/src/vs/editor/contrib/wordOperations/wordOperations.ts index d617c47bc6868b..4dd26431815a2f 100644 --- a/src/vs/editor/contrib/wordOperations/wordOperations.ts +++ b/src/vs/editor/contrib/wordOperations/wordOperations.ts @@ -187,7 +187,7 @@ export class CursorWordAccessibilityLeft extends WordLeftCommand { }); } - protected _move(_: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType): Position { + protected override _move(_: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType): Position { return super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue), model, position, wordNavigationType); } } @@ -202,7 +202,7 @@ export class CursorWordAccessibilityLeftSelect extends WordLeftCommand { }); } - protected _move(_: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType): Position { + protected override _move(_: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType): Position { return super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue), model, position, wordNavigationType); } } @@ -295,7 +295,7 @@ export class CursorWordAccessibilityRight extends WordRightCommand { }); } - protected _move(_: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType): Position { + protected override _move(_: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType): Position { return super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue), model, position, wordNavigationType); } } @@ -310,7 +310,7 @@ export class CursorWordAccessibilityRightSelect extends WordRightCommand { }); } - protected _move(_: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType): Position { + protected override _move(_: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType): Position { return super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue), model, position, wordNavigationType); } } diff --git a/src/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.ts b/src/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.ts index 9da4eb8dacb0e2..cc247cbbd2b773 100644 --- a/src/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.ts +++ b/src/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.ts @@ -177,7 +177,7 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { this._editor.addOverlayWidget(this); } - public dispose(): void { + public override dispose(): void { this._editor.removeOverlayWidget(this); super.dispose(); } diff --git a/src/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.ts b/src/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.ts index e67d6364b57b17..39c480d0dd93d4 100644 --- a/src/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.ts +++ b/src/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.ts @@ -44,7 +44,7 @@ export class IPadShowKeyboard extends Disposable implements IEditorContribution } } - public dispose(): void { + public override dispose(): void { super.dispose(); if (this.widget) { this.widget.dispose(); @@ -77,7 +77,7 @@ class ShowKeyboardWidget extends Disposable implements IOverlayWidget { this.editor.addOverlayWidget(this); } - public dispose(): void { + public override dispose(): void { this.editor.removeOverlayWidget(this); super.dispose(); } diff --git a/src/vs/editor/standalone/browser/inspectTokens/inspectTokens.ts b/src/vs/editor/standalone/browser/inspectTokens/inspectTokens.ts index 88b54c86776f2a..df5c80779c355f 100644 --- a/src/vs/editor/standalone/browser/inspectTokens/inspectTokens.ts +++ b/src/vs/editor/standalone/browser/inspectTokens/inspectTokens.ts @@ -53,7 +53,7 @@ class InspectTokensController extends Disposable implements IEditorContribution this._register(this._editor.onKeyUp((e) => e.keyCode === KeyCode.Escape && this.stop())); } - public dispose(): void { + public override dispose(): void { this.stop(); super.dispose(); } @@ -171,7 +171,7 @@ class InspectTokensWidget extends Disposable implements IContentWidget { this._editor.addContentWidget(this); } - public dispose(): void { + public override dispose(): void { this._editor.removeContentWidget(this); super.dispose(); } diff --git a/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputServiceImpl.ts b/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputServiceImpl.ts index ae133a70df0c8b..4c4bd06b51ae9f 100644 --- a/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputServiceImpl.ts +++ b/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputServiceImpl.ts @@ -45,7 +45,7 @@ export class EditorScopedQuickInputServiceImpl extends QuickInputService { }; } - protected createController(): QuickInputController { + protected override createController(): QuickInputController { return super.createController(this.host); } } diff --git a/src/vs/editor/standalone/browser/standaloneCodeEditor.ts b/src/vs/editor/standalone/browser/standaloneCodeEditor.ts index f315ffb0ed14b5..89dff41d626bd6 100644 --- a/src/vs/editor/standalone/browser/standaloneCodeEditor.ts +++ b/src/vs/editor/standalone/browser/standaloneCodeEditor.ts @@ -427,11 +427,11 @@ export class StandaloneEditor extends StandaloneCodeEditor implements IStandalon } } - public dispose(): void { + public override dispose(): void { super.dispose(); } - public updateOptions(newOptions: Readonly): void { + public override updateOptions(newOptions: Readonly): void { updateConfigurationService(this._configurationService, newOptions, false); if (typeof newOptions.theme === 'string') { this._standaloneThemeService.setTheme(newOptions.theme); @@ -442,14 +442,14 @@ export class StandaloneEditor extends StandaloneCodeEditor implements IStandalon super.updateOptions(newOptions); } - _attachModel(model: ITextModel | null): void { + override _attachModel(model: ITextModel | null): void { super._attachModel(model); if (this._modelData) { this._contextViewService.setContainer(this._modelData.view.domNode.domNode); } } - _postDetachModelCleanup(detachedModel: ITextModel): void { + override _postDetachModelCleanup(detachedModel: ITextModel): void { super._postDetachModelCleanup(detachedModel); if (detachedModel && this._ownsModel) { detachedModel.dispose(); @@ -503,11 +503,11 @@ export class StandaloneDiffEditor extends DiffEditorWidget implements IStandalon this._contextViewService.setContainer(this._containerDomElement); } - public dispose(): void { + public override dispose(): void { super.dispose(); } - public updateOptions(newOptions: Readonly): void { + public override updateOptions(newOptions: Readonly): void { updateConfigurationService(this._configurationService, newOptions, true); if (typeof newOptions.theme === 'string') { this._standaloneThemeService.setTheme(newOptions.theme); @@ -518,15 +518,15 @@ export class StandaloneDiffEditor extends DiffEditorWidget implements IStandalon super.updateOptions(newOptions); } - protected _createInnerEditor(instantiationService: IInstantiationService, container: HTMLElement, options: Readonly): CodeEditorWidget { + protected override _createInnerEditor(instantiationService: IInstantiationService, container: HTMLElement, options: Readonly): CodeEditorWidget { return instantiationService.createInstance(StandaloneCodeEditor, container, options); } - public getOriginalEditor(): IStandaloneCodeEditor { + public override getOriginalEditor(): IStandaloneCodeEditor { return super.getOriginalEditor(); } - public getModifiedEditor(): IStandaloneCodeEditor { + public override getModifiedEditor(): IStandaloneCodeEditor { return super.getModifiedEditor(); } diff --git a/src/vs/editor/standalone/test/browser/standaloneLanguages.test.ts b/src/vs/editor/standalone/test/browser/standaloneLanguages.test.ts index c4755792c8bb27..bacfb056976881 100644 --- a/src/vs/editor/standalone/test/browser/standaloneLanguages.test.ts +++ b/src/vs/editor/standalone/test/browser/standaloneLanguages.test.ts @@ -25,7 +25,7 @@ suite('TokenizationSupport2Adapter', () => { constructor() { super(null!, null!); } - public match(languageId: LanguageId, token: string): number { + public override match(languageId: LanguageId, token: string): number { return ( ((this.counter++) << MetadataConsts.FOREGROUND_OFFSET) | (languageId << MetadataConsts.LANGUAGEID_OFFSET) diff --git a/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts b/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts index 8f0e568cc5fd53..55be31487ceae2 100644 --- a/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts +++ b/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts @@ -32,11 +32,11 @@ class TestGlobalStyleSheet extends GlobalStyleSheet { super(null!); } - public insertRule(rule: string, index?: number): void { + public override insertRule(rule: string, index?: number): void { this.rules.unshift(rule); } - public removeRulesContainingSelector(ruleName: string): void { + public override removeRulesContainingSelector(ruleName: string): void { for (let i = 0; i < this.rules.length; i++) { if (this.rules[i].indexOf(ruleName) >= 0) { this.rules.splice(i, 1); diff --git a/src/vs/editor/test/browser/testCodeEditor.ts b/src/vs/editor/test/browser/testCodeEditor.ts index 94741e65678912..a516f3bed10a1e 100644 --- a/src/vs/editor/test/browser/testCodeEditor.ts +++ b/src/vs/editor/test/browser/testCodeEditor.ts @@ -36,10 +36,10 @@ export interface ITestCodeEditor extends IActiveCodeEditor { export class TestCodeEditor extends CodeEditorWidget implements ICodeEditor { //#region testing overrides - protected _createConfiguration(options: Readonly): IConfiguration { + protected override _createConfiguration(options: Readonly): IConfiguration { return new TestConfiguration(options); } - protected _createView(viewModel: ViewModel): [View, boolean] { + protected override _createView(viewModel: ViewModel): [View, boolean] { // Never create a view return [null! as View, false]; } @@ -47,7 +47,7 @@ export class TestCodeEditor extends CodeEditorWidget implements ICodeEditor { public setHasTextFocus(hasTextFocus: boolean): void { this._hasTextFocus = hasTextFocus; } - public hasTextFocus(): boolean { + public override hasTextFocus(): boolean { return this._hasTextFocus; } //#endregion @@ -64,7 +64,7 @@ export class TestCodeEditor extends CodeEditorWidget implements ICodeEditor { } class TestCodeEditorWithAutoModelDisposal extends TestCodeEditor { - public dispose() { + public override dispose() { super.dispose(); if (this._modelData) { this._modelData.model.dispose(); diff --git a/src/vs/editor/test/common/config/commonEditorConfig.test.ts b/src/vs/editor/test/common/config/commonEditorConfig.test.ts index 1faca7a1767861..465996a78a1533 100644 --- a/src/vs/editor/test/common/config/commonEditorConfig.test.ts +++ b/src/vs/editor/test/common/config/commonEditorConfig.test.ts @@ -53,7 +53,7 @@ suite('Common Editor Config', () => { }); class TestWrappingConfiguration extends TestConfiguration { - protected _getEnvConfiguration(): IEnvConfiguration { + protected override _getEnvConfiguration(): IEnvConfiguration { return { extraEditorClassName: '', outerWidth: 1000, diff --git a/src/vs/editor/test/common/services/textResourceConfigurationService.test.ts b/src/vs/editor/test/common/services/textResourceConfigurationService.test.ts index a66a305526d758..dff36f24346bcf 100644 --- a/src/vs/editor/test/common/services/textResourceConfigurationService.test.ts +++ b/src/vs/editor/test/common/services/textResourceConfigurationService.test.ts @@ -18,10 +18,10 @@ suite('TextResourceConfigurationService - Update', () => { let configurationValue: IConfigurationValue = {}; let updateArgs: any[]; let configurationService = new class extends TestConfigurationService { - inspect() { + override inspect() { return configurationValue; } - updateValue() { + override updateValue() { updateArgs = [...arguments]; return Promise.resolve(); } diff --git a/src/vs/editor/test/common/viewModel/viewModelImpl.test.ts b/src/vs/editor/test/common/viewModel/viewModelImpl.test.ts index d556f3da7a5238..0e9f99aba50cd4 100644 --- a/src/vs/editor/test/common/viewModel/viewModelImpl.test.ts +++ b/src/vs/editor/test/common/viewModel/viewModelImpl.test.ts @@ -66,7 +66,7 @@ suite('ViewModel', () => { viewLineCount.push(viewModel.getLineCount()); viewModel.addViewEventHandler(new class extends ViewEventHandler { - handleEvents(events: ViewEvent[]): void { + override handleEvents(events: ViewEvent[]): void { // Access the view model viewLineCount.push(viewModel.getLineCount()); } diff --git a/src/vs/platform/actions/browser/menuEntryActionViewItem.ts b/src/vs/platform/actions/browser/menuEntryActionViewItem.ts index eed8299d735de3..19fe5f4821ca70 100644 --- a/src/vs/platform/actions/browser/menuEntryActionViewItem.ts +++ b/src/vs/platform/actions/browser/menuEntryActionViewItem.ts @@ -129,7 +129,7 @@ export class MenuEntryActionViewItem extends ActionViewItem { return this._wantsAltCommand && (this._action).alt || this._action; } - onClick(event: MouseEvent): void { + override onClick(event: MouseEvent): void { event.preventDefault(); event.stopPropagation(); @@ -138,7 +138,7 @@ export class MenuEntryActionViewItem extends ActionViewItem { .catch(err => this._notificationService.error(err)); } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { super.render(container); container.classList.add('menu-entry'); @@ -176,13 +176,13 @@ export class MenuEntryActionViewItem extends ActionViewItem { })); } - updateLabel(): void { + override updateLabel(): void { if (this.options.label && this.label) { this.label.textContent = this._commandAction.label; } } - updateTooltip(): void { + override updateTooltip(): void { if (this.label) { const keybinding = this._keybindingService.lookupKeybinding(this._commandAction.id); const keybindingLabel = keybinding && keybinding.getLabel(); @@ -204,7 +204,7 @@ export class MenuEntryActionViewItem extends ActionViewItem { } } - updateClass(): void { + override updateClass(): void { if (this.options.icon) { if (this._commandAction !== this._action) { if (this._action.alt) { @@ -268,7 +268,7 @@ export class SubmenuEntryActionViewItem extends DropdownMenuActionViewItem { }); } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { super.render(container); if (this.element) { container.classList.add('menu-entry'); diff --git a/src/vs/platform/actions/common/actions.ts b/src/vs/platform/actions/common/actions.ts index dd0f4963ed3641..31fdda60b37850 100644 --- a/src/vs/platform/actions/common/actions.ts +++ b/src/vs/platform/actions/common/actions.ts @@ -321,7 +321,7 @@ export class ExecuteCommandAction extends Action { super(id, label); } - run(...args: any[]): Promise { + override run(...args: any[]): Promise { return this._commandService.executeCommand(this.id, ...args); } } @@ -337,7 +337,7 @@ export class SubmenuItemAction extends SubmenuAction { super(`submenuitem.${item.submenu.id}`, typeof item.title === 'string' ? item.title : item.title.value, [], 'submenu'); } - get actions(): readonly IAction[] { + override get actions(): readonly IAction[] { const result: IAction[] = []; const menu = this._menuService.createMenu(this.item.submenu, this._contextKeyService); const groups = menu.getActions(this._options); diff --git a/src/vs/platform/actions/test/common/menuService.test.ts b/src/vs/platform/actions/test/common/menuService.test.ts index ee7369e06107e4..ca7d9eb31adcd2 100644 --- a/src/vs/platform/actions/test/common/menuService.test.ts +++ b/src/vs/platform/actions/test/common/menuService.test.ts @@ -13,7 +13,7 @@ import { MockContextKeyService } from 'vs/platform/keybinding/test/common/mockKe // --- service instances const contextKeyService = new class extends MockContextKeyService { - contextMatchesRules() { + override contextMatchesRules() { return true; } }; diff --git a/src/vs/platform/backup/test/electron-main/backupMainService.test.ts b/src/vs/platform/backup/test/electron-main/backupMainService.test.ts index 561f0069f5a5e7..9968de89189f52 100644 --- a/src/vs/platform/backup/test/electron-main/backupMainService.test.ts +++ b/src/vs/platform/backup/test/electron-main/backupMainService.test.ts @@ -123,7 +123,7 @@ flakySuite('BackupMainService', () => { return path.join(this.backupHome, id); } - getFolderHash(folderUri: URI): string { + override getFolderHash(folderUri: URI): string { return super.getFolderHash(folderUri); } }; diff --git a/src/vs/platform/contextkey/browser/contextKeyService.ts b/src/vs/platform/contextkey/browser/contextKeyService.ts index e40016315b3edc..34cf6f57ddd00c 100644 --- a/src/vs/platform/contextkey/browser/contextKeyService.ts +++ b/src/vs/platform/contextkey/browser/contextKeyService.ts @@ -75,19 +75,19 @@ class NullContext extends Context { super(-1, null); } - public setValue(key: string, value: any): boolean { + public override setValue(key: string, value: any): boolean { return false; } - public removeValue(key: string): boolean { + public override removeValue(key: string): boolean { return false; } - public getValue(key: string): T | undefined { + public override getValue(key: string): T | undefined { return undefined; } - collectAllValues(): { [key: string]: any; } { + override collectAllValues(): { [key: string]: any; } { return Object.create(null); } } @@ -137,7 +137,7 @@ class ConfigAwareContextValuesContainer extends Context { this._listener.dispose(); } - getValue(key: string): any { + override getValue(key: string): any { if (key.indexOf(ConfigAwareContextValuesContainer._keyPrefix) !== 0) { return super.getValue(key); @@ -168,15 +168,15 @@ class ConfigAwareContextValuesContainer extends Context { return value; } - setValue(key: string, value: any): boolean { + override setValue(key: string, value: any): boolean { return super.setValue(key, value); } - removeValue(key: string): boolean { + override removeValue(key: string): boolean { return super.removeValue(key); } - collectAllValues(): { [key: string]: any; } { + override collectAllValues(): { [key: string]: any; } { const result: { [key: string]: any } = Object.create(null); this._values.forEach((value, index) => result[index] = value); return { ...result, ...super.collectAllValues() }; diff --git a/src/vs/platform/debug/electron-main/extensionHostDebugIpc.ts b/src/vs/platform/debug/electron-main/extensionHostDebugIpc.ts index 08ff2ccf6285a8..c814220f55841d 100644 --- a/src/vs/platform/debug/electron-main/extensionHostDebugIpc.ts +++ b/src/vs/platform/debug/electron-main/extensionHostDebugIpc.ts @@ -16,7 +16,7 @@ export class ElectronExtensionHostDebugBroadcastChannel extends Extens super(); } - call(ctx: TContext, command: string, arg?: any): Promise { + override call(ctx: TContext, command: string, arg?: any): Promise { if (command === 'openExtensionDevelopmentHostWindow') { return this.openExtensionDevelopmentHostWindow(arg[0], arg[1], arg[2]); } else { diff --git a/src/vs/platform/extensionManagement/electron-sandbox/extensionTipsService.ts b/src/vs/platform/extensionManagement/electron-sandbox/extensionTipsService.ts index 51066d5bedd62b..0fbf6a632fe102 100644 --- a/src/vs/platform/extensionManagement/electron-sandbox/extensionTipsService.ts +++ b/src/vs/platform/extensionManagement/electron-sandbox/extensionTipsService.ts @@ -40,7 +40,7 @@ const lastPromptedMediumImpExeTimeStorageKey = 'extensionTips/lastPromptedMedium export class ExtensionTipsService extends BaseExtensionTipsService { - _serviceBrand: any; + override _serviceBrand: any; private readonly highImportanceExecutableTips: Map = new Map(); private readonly mediumImportanceExecutableTips: Map = new Map(); @@ -101,13 +101,13 @@ export class ExtensionTipsService extends BaseExtensionTipsService { }); } - async getImportantExecutableBasedTips(): Promise { + async override getImportantExecutableBasedTips(): Promise { const highImportanceExeTips = await this.getValidExecutableBasedExtensionTips(this.highImportanceExecutableTips); const mediumImportanceExeTips = await this.getValidExecutableBasedExtensionTips(this.mediumImportanceExecutableTips); return [...highImportanceExeTips, ...mediumImportanceExeTips]; } - getOtherExecutableBasedTips(): Promise { + override getOtherExecutableBasedTips(): Promise { return this.getValidExecutableBasedExtensionTips(this.allOtherExecutableTips); } diff --git a/src/vs/platform/files/common/fileService.ts b/src/vs/platform/files/common/fileService.ts index 6bdbbe9cc5cc0b..e1f24089f39f03 100644 --- a/src/vs/platform/files/common/fileService.ts +++ b/src/vs/platform/files/common/fileService.ts @@ -1000,7 +1000,7 @@ export class FileService extends Disposable implements IFileService { ].join(); } - dispose(): void { + override dispose(): void { super.dispose(); this.activeWatchers.forEach(watcher => dispose(watcher.disposable)); diff --git a/src/vs/platform/files/electron-browser/diskFileSystemProvider.ts b/src/vs/platform/files/electron-browser/diskFileSystemProvider.ts index a2db35c4e04cae..df5e06afc34c0e 100644 --- a/src/vs/platform/files/electron-browser/diskFileSystemProvider.ts +++ b/src/vs/platform/files/electron-browser/diskFileSystemProvider.ts @@ -21,7 +21,7 @@ export class DiskFileSystemProvider extends NodeDiskFileSystemProvider { super(logService, options); } - get capabilities(): FileSystemProviderCapabilities { + override get capabilities(): FileSystemProviderCapabilities { if (!this._capabilities) { this._capabilities = super.capabilities | FileSystemProviderCapabilities.Trash; } @@ -29,7 +29,7 @@ export class DiskFileSystemProvider extends NodeDiskFileSystemProvider { return this._capabilities; } - protected async doDelete(filePath: string, opts: FileDeleteOptions): Promise { + protected async override doDelete(filePath: string, opts: FileDeleteOptions): Promise { if (!opts.useTrash) { return super.doDelete(filePath, opts); } diff --git a/src/vs/platform/files/node/diskFileSystemProvider.ts b/src/vs/platform/files/node/diskFileSystemProvider.ts index ce598c20387352..ff111367d43e04 100644 --- a/src/vs/platform/files/node/diskFileSystemProvider.ts +++ b/src/vs/platform/files/node/diskFileSystemProvider.ts @@ -730,7 +730,7 @@ export class DiskFileSystemProvider extends Disposable implements //#endregion - dispose(): void { + override dispose(): void { super.dispose(); dispose(this.recursiveWatcher); diff --git a/src/vs/platform/files/node/watcher/nodejs/watcherService.ts b/src/vs/platform/files/node/watcher/nodejs/watcherService.ts index b645715d1608c3..0d03d317fc073e 100644 --- a/src/vs/platform/files/node/watcher/nodejs/watcherService.ts +++ b/src/vs/platform/files/node/watcher/nodejs/watcherService.ts @@ -124,7 +124,7 @@ export class FileWatcher extends Disposable { } } - dispose(): void { + override dispose(): void { this.isDisposed = true; super.dispose(); diff --git a/src/vs/platform/files/node/watcher/nsfw/watcherService.ts b/src/vs/platform/files/node/watcher/nsfw/watcherService.ts index 32dead9e7fd866..eebfe67f50222c 100644 --- a/src/vs/platform/files/node/watcher/nsfw/watcherService.ts +++ b/src/vs/platform/files/node/watcher/nsfw/watcherService.ts @@ -91,7 +91,7 @@ export class FileWatcher extends Disposable { } } - dispose(): void { + override dispose(): void { this.isDisposed = true; super.dispose(); diff --git a/src/vs/platform/files/node/watcher/unix/watcherService.ts b/src/vs/platform/files/node/watcher/unix/watcherService.ts index 1ee26f965ee299..da00c8a1658255 100644 --- a/src/vs/platform/files/node/watcher/unix/watcherService.ts +++ b/src/vs/platform/files/node/watcher/unix/watcherService.ts @@ -92,7 +92,7 @@ export class FileWatcher extends Disposable { } } - dispose(): void { + override dispose(): void { this.isDisposed = true; super.dispose(); diff --git a/src/vs/platform/files/test/browser/fileService.test.ts b/src/vs/platform/files/test/browser/fileService.test.ts index ff4126f2aaa16a..7fa3f3fdb0f7e8 100644 --- a/src/vs/platform/files/test/browser/fileService.test.ts +++ b/src/vs/platform/files/test/browser/fileService.test.ts @@ -141,7 +141,7 @@ suite('File Service', () => { const service = new FileService(new NullLogService()); const provider = new class extends NullFileSystemProvider { - async stat(resource: URI): Promise { + async override stat(resource: URI): Promise { return { mtime: Date.now(), ctime: Date.now(), @@ -150,7 +150,7 @@ suite('File Service', () => { }; } - readFile(resource: URI): Promise { + override readFile(resource: URI): Promise { if (async) { return timeout(5).then(() => { throw new Error('failed'); }); } @@ -158,7 +158,7 @@ suite('File Service', () => { throw new Error('failed'); } - open(resource: URI, opts: FileOpenOptions): Promise { + override open(resource: URI, opts: FileOpenOptions): Promise { if (async) { return timeout(5).then(() => { throw new Error('failed'); }); } diff --git a/src/vs/platform/files/test/electron-browser/diskFileService.test.ts b/src/vs/platform/files/test/electron-browser/diskFileService.test.ts index 58574258ee2b18..9b6c2cc4c0bb77 100644 --- a/src/vs/platform/files/test/electron-browser/diskFileService.test.ts +++ b/src/vs/platform/files/test/electron-browser/diskFileService.test.ts @@ -58,7 +58,7 @@ export class TestDiskFileSystemProvider extends DiskFileSystemProvider { private smallStatSize: boolean = false; private _testCapabilities!: FileSystemProviderCapabilities; - get capabilities(): FileSystemProviderCapabilities { + override get capabilities(): FileSystemProviderCapabilities { if (!this._testCapabilities) { this._testCapabilities = FileSystemProviderCapabilities.FileReadWrite | @@ -76,7 +76,7 @@ export class TestDiskFileSystemProvider extends DiskFileSystemProvider { return this._testCapabilities; } - set capabilities(capabilities: FileSystemProviderCapabilities) { + override set capabilities(capabilities: FileSystemProviderCapabilities) { this._testCapabilities = capabilities; } @@ -88,7 +88,7 @@ export class TestDiskFileSystemProvider extends DiskFileSystemProvider { this.smallStatSize = enabled; } - async stat(resource: URI): Promise { + async override stat(resource: URI): Promise { const res = await super.stat(resource); if (this.invalidStatSize) { @@ -100,7 +100,7 @@ export class TestDiskFileSystemProvider extends DiskFileSystemProvider { return res; } - async read(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise { + async override read(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise { const bytesRead = await super.read(fd, pos, data, offset, length); this.totalBytesRead += bytesRead; @@ -108,7 +108,7 @@ export class TestDiskFileSystemProvider extends DiskFileSystemProvider { return bytesRead; } - async readFile(resource: URI): Promise { + async override readFile(resource: URI): Promise { const res = await super.readFile(resource); this.totalBytesRead += res.byteLength; diff --git a/src/vs/platform/instantiation/common/instantiationService.ts b/src/vs/platform/instantiation/common/instantiationService.ts index 00f0cb9d95e3cc..5e9af069237361 100644 --- a/src/vs/platform/instantiation/common/instantiationService.ts +++ b/src/vs/platform/instantiation/common/instantiationService.ts @@ -267,8 +267,8 @@ class Trace { private static readonly _None = new class extends Trace { constructor() { super(-1, null); } - stop() { } - branch() { return this; } + override stop() { } + override branch() { return this; } }; static traceInvocation(ctor: any): Trace { diff --git a/src/vs/platform/keybinding/common/abstractKeybindingService.ts b/src/vs/platform/keybinding/common/abstractKeybindingService.ts index 23716ee9a1e9c5..689431ec33e9ee 100644 --- a/src/vs/platform/keybinding/common/abstractKeybindingService.ts +++ b/src/vs/platform/keybinding/common/abstractKeybindingService.ts @@ -61,7 +61,7 @@ export abstract class AbstractKeybindingService extends Disposable implements IK this._logging = false; } - public dispose(): void { + public override dispose(): void { super.dispose(); } diff --git a/src/vs/platform/keybinding/test/common/mockKeybindingService.ts b/src/vs/platform/keybinding/test/common/mockKeybindingService.ts index 2fe7bbabca9589..4f022e9dddf156 100644 --- a/src/vs/platform/keybinding/test/common/mockKeybindingService.ts +++ b/src/vs/platform/keybinding/test/common/mockKeybindingService.ts @@ -78,7 +78,7 @@ export class MockScopableContextKeyService extends MockContextKeyService { /** * Don't implement this for all tests since we rarely depend on this behavior and it isn't implemented fully */ - public createScoped(domNote: HTMLElement): IContextKeyService { + public override createScoped(domNote: HTMLElement): IContextKeyService { return new MockContextKeyService(); } } diff --git a/src/vs/platform/list/browser/listService.ts b/src/vs/platform/list/browser/listService.ts index d1b0fa738115e7..073308a7844828 100644 --- a/src/vs/platform/list/browser/listService.ts +++ b/src/vs/platform/list/browser/listService.ts @@ -298,7 +298,7 @@ export class WorkbenchList extends List { this.disposables.add(this.navigator); } - updateOptions(options: IWorkbenchListOptionsUpdate): void { + override updateOptions(options: IWorkbenchListOptionsUpdate): void { super.updateOptions(options); if (options.overrideStyles) { @@ -315,7 +315,7 @@ export class WorkbenchList extends List { return this._useAltAsMultipleSelectionModifier; } - dispose(): void { + override dispose(): void { this._styler?.dispose(); super.dispose(); } @@ -410,7 +410,7 @@ export class WorkbenchPagedList extends PagedList { this.disposables.add(this.navigator); } - updateOptions(options: IWorkbenchListOptionsUpdate): void { + override updateOptions(options: IWorkbenchListOptionsUpdate): void { super.updateOptions(options); if (options.overrideStyles) { @@ -427,7 +427,7 @@ export class WorkbenchPagedList extends PagedList { return this._useAltAsMultipleSelectionModifier; } - dispose(): void { + override dispose(): void { this._styler?.dispose(); this.disposables.dispose(); super.dispose(); @@ -547,7 +547,7 @@ export class WorkbenchTable extends Table { this.disposables.add(this.navigator); } - updateOptions(options: IWorkbenchTableOptionsUpdate): void { + override updateOptions(options: IWorkbenchTableOptionsUpdate): void { super.updateOptions(options); if (options.overrideStyles) { @@ -564,7 +564,7 @@ export class WorkbenchTable extends Table { return this._useAltAsMultipleSelectionModifier; } - dispose(): void { + override dispose(): void { this._styler?.dispose(); this.disposables.dispose(); super.dispose(); @@ -829,7 +829,7 @@ export class WorkbenchCompressibleObjectTree, TFilter this.disposables.add(this.internals); } - updateOptions(options: IWorkbenchCompressibleObjectTreeOptionsUpdate = {}): void { + override updateOptions(options: IWorkbenchCompressibleObjectTreeOptionsUpdate = {}): void { super.updateOptions(options); if (options.overrideStyles) { @@ -875,7 +875,7 @@ export class WorkbenchDataTree extends DataTree extends Async this.disposables.add(this.internals); } - updateOptions(options: IWorkbenchAsyncDataTreeOptionsUpdate = {}): void { + override updateOptions(options: IWorkbenchAsyncDataTreeOptionsUpdate = {}): void { super.updateOptions(options); if (options.overrideStyles) { diff --git a/src/vs/platform/log/common/bufferLog.ts b/src/vs/platform/log/common/bufferLog.ts index ea9020d9ba7890..6cedce2d5424e4 100644 --- a/src/vs/platform/log/common/bufferLog.ts +++ b/src/vs/platform/log/common/bufferLog.ts @@ -82,7 +82,7 @@ export class BufferLogService extends AbstractLogger implements ILogService { this._log(LogLevel.Critical, message, ...args); } - dispose(): void { + override dispose(): void { if (this._logger) { this._logger.dispose(); } diff --git a/src/vs/platform/log/common/log.ts b/src/vs/platform/log/common/log.ts index fe4e01b90bfb5b..1e3b749705a8d7 100644 --- a/src/vs/platform/log/common/log.ts +++ b/src/vs/platform/log/common/log.ts @@ -250,7 +250,7 @@ export class ConsoleMainLogger extends AbstractLogger implements ILogger { } } - dispose(): void { + override dispose(): void { // noop } @@ -303,7 +303,7 @@ export class ConsoleLogger extends AbstractLogger implements ILogger { } } - dispose(): void { + override dispose(): void { // noop } @@ -363,7 +363,7 @@ export class AdapterLogger extends AbstractLogger implements ILogger { return toErrorMessage(msg, this.getLevel() <= LogLevel.Trace); } - dispose(): void { + override dispose(): void { // noop } @@ -382,7 +382,7 @@ export class MultiplexLogService extends AbstractLogger implements ILogService { } } - setLevel(level: LogLevel): void { + override setLevel(level: LogLevel): void { for (const logService of this.logServices) { logService.setLevel(level); } @@ -431,7 +431,7 @@ export class MultiplexLogService extends AbstractLogger implements ILogService { } } - dispose(): void { + override dispose(): void { for (const logService of this.logServices) { logService.dispose(); } @@ -517,7 +517,7 @@ export abstract class AbstractLoggerService extends Disposable implements ILogge return logger; } - dispose(): void { + override dispose(): void { this.logLevelChangeableLoggers.splice(0, this.logLevelChangeableLoggers.length); this.loggers.forEach(logger => logger.dispose()); this.loggers.clear(); diff --git a/src/vs/platform/log/common/logIpc.ts b/src/vs/platform/log/common/logIpc.ts index 49d356e9b5e639..1f82b95d223f22 100644 --- a/src/vs/platform/log/common/logIpc.ts +++ b/src/vs/platform/log/common/logIpc.ts @@ -177,7 +177,7 @@ export class FollowerLogService extends LogService implements ILogService { this._register(parent.onDidChangeLogLevel(level => logService.setLevel(level))); } - setLevel(level: LogLevel): void { + override setLevel(level: LogLevel): void { super.setLevel(level); this.parent.setLevel(level); diff --git a/src/vs/platform/log/node/spdlogLog.ts b/src/vs/platform/log/node/spdlogLog.ts index 5b036c47ce2228..b97064e29f74a0 100644 --- a/src/vs/platform/log/node/spdlogLog.ts +++ b/src/vs/platform/log/node/spdlogLog.ts @@ -95,7 +95,7 @@ export class SpdLogLogger extends AbstractMessageLogger implements ILogger { } } - flush(): void { + override flush(): void { if (this._logger) { this._logger.flush(); } else { @@ -103,7 +103,7 @@ export class SpdLogLogger extends AbstractMessageLogger implements ILogger { } } - dispose(): void { + override dispose(): void { if (this._logger) { this.disposeLogger(); } else { diff --git a/src/vs/platform/quickinput/browser/quickInput.ts b/src/vs/platform/quickinput/browser/quickInput.ts index d696697f9d0d12..097074264efb61 100644 --- a/src/vs/platform/quickinput/browser/quickInput.ts +++ b/src/vs/platform/quickinput/browser/quickInput.ts @@ -166,7 +166,7 @@ export class QuickInputService extends Themable implements IQuickInputService { return this.controller.cancel(); } - protected updateStyles() { + protected override updateStyles() { this.controller.applyStyles(this.computeStyles()); } diff --git a/src/vs/platform/remote/node/tunnelService.ts b/src/vs/platform/remote/node/tunnelService.ts index 0f0bb25118a6c3..a43e2a2487a00b 100644 --- a/src/vs/platform/remote/node/tunnelService.ts +++ b/src/vs/platform/remote/node/tunnelService.ts @@ -58,7 +58,7 @@ class NodeRemoteTunnel extends Disposable implements RemoteTunnel { this.tunnelRemoteHost = tunnelRemoteHost; } - public async dispose(): Promise { + public async override dispose(): Promise { super.dispose(); this._server.removeListener('listening', this._listeningListener); this._server.removeListener('connection', this._connectionListener); diff --git a/src/vs/platform/request/electron-main/requestMainService.ts b/src/vs/platform/request/electron-main/requestMainService.ts index d08f82f4510788..ea709437ebbbce 100644 --- a/src/vs/platform/request/electron-main/requestMainService.ts +++ b/src/vs/platform/request/electron-main/requestMainService.ts @@ -14,7 +14,7 @@ function getRawRequest(options: IRequestOptions): IRawRequestFunction { export class RequestMainService extends NodeRequestService { - request(options: IRequestOptions, token: CancellationToken): Promise { + override request(options: IRequestOptions, token: CancellationToken): Promise { return super.request({ ...(options || {}), getRawRequest }, token); } } diff --git a/src/vs/platform/storage/browser/storageService.ts b/src/vs/platform/storage/browser/storageService.ts index 5cfb899602efce..c1aae2e7d2e5bd 100644 --- a/src/vs/platform/storage/browser/storageService.ts +++ b/src/vs/platform/storage/browser/storageService.ts @@ -94,7 +94,7 @@ export class BrowserStorageService extends AbstractStorageService { throw new Error('Migrating storage is currently unsupported in Web'); } - protected shouldFlushWhenIdle(): boolean { + protected override shouldFlushWhenIdle(): boolean { // this flush() will potentially cause new state to be stored // since new state will only be created while the document // has focus, one optimization is to not run this when the diff --git a/src/vs/platform/storage/electron-main/storageMain.ts b/src/vs/platform/storage/electron-main/storageMain.ts index c9a430dccef18a..234fb50c997b61 100644 --- a/src/vs/platform/storage/electron-main/storageMain.ts +++ b/src/vs/platform/storage/electron-main/storageMain.ts @@ -206,7 +206,7 @@ export class GlobalStorageMain extends BaseStorageMain implements IStorageMain { })); } - protected async doInit(storage: IStorage): Promise { + protected async override doInit(storage: IStorage): Promise { await super.doInit(storage); // Apply global telemetry values as part of the initialization diff --git a/src/vs/platform/storage/test/electron-main/storageMainService.test.ts b/src/vs/platform/storage/test/electron-main/storageMainService.test.ts index 897a2367af31af..0f55ca5c3b20df 100644 --- a/src/vs/platform/storage/test/electron-main/storageMainService.test.ts +++ b/src/vs/platform/storage/test/electron-main/storageMainService.test.ts @@ -26,7 +26,7 @@ suite('StorageMainService', function () { class TestStorageMainService extends StorageMainService { - protected getStorageOptions(): IStorageMainOptions { + protected override getStorageOptions(): IStorageMainOptions { return { useInMemoryStorage: true }; diff --git a/src/vs/platform/telemetry/browser/errorTelemetry.ts b/src/vs/platform/telemetry/browser/errorTelemetry.ts index 6ef338fd8419f4..48bb12478c4b9f 100644 --- a/src/vs/platform/telemetry/browser/errorTelemetry.ts +++ b/src/vs/platform/telemetry/browser/errorTelemetry.ts @@ -8,7 +8,7 @@ import { globals } from 'vs/base/common/platform'; import BaseErrorTelemetry, { ErrorEvent } from 'vs/platform/telemetry/common/errorTelemetry'; export default class ErrorTelemetry extends BaseErrorTelemetry { - protected installErrorListeners(): void { + protected override installErrorListeners(): void { let oldOnError: Function; let that = this; if (typeof globals.onerror === 'function') { diff --git a/src/vs/platform/telemetry/node/errorTelemetry.ts b/src/vs/platform/telemetry/node/errorTelemetry.ts index 562eb44b9c9451..ba1c2a18d461f9 100644 --- a/src/vs/platform/telemetry/node/errorTelemetry.ts +++ b/src/vs/platform/telemetry/node/errorTelemetry.ts @@ -7,7 +7,7 @@ import { onUnexpectedError, setUnexpectedErrorHandler } from 'vs/base/common/err import BaseErrorTelemetry from 'vs/platform/telemetry/common/errorTelemetry'; export default class ErrorTelemetry extends BaseErrorTelemetry { - protected installErrorListeners(): void { + protected override installErrorListeners(): void { setUnexpectedErrorHandler(err => console.error(err)); // Print a console message when rejection isn't handled within N seconds. For details: diff --git a/src/vs/platform/telemetry/test/browser/telemetryService.test.ts b/src/vs/platform/telemetry/test/browser/telemetryService.test.ts index 936526af0b5853..9b8969ffa1438b 100644 --- a/src/vs/platform/telemetry/test/browser/telemetryService.test.ts +++ b/src/vs/platform/telemetry/test/browser/telemetryService.test.ts @@ -217,7 +217,7 @@ suite('TelemetryService', () => { return Promise.all(this.promises); } - publicLog(eventName: string, data?: ITelemetryData, anonymizeFilePaths?: boolean): Promise { + override publicLog(eventName: string, data?: ITelemetryData, anonymizeFilePaths?: boolean): Promise { let p = super.publicLog(eventName, data, anonymizeFilePaths); this.promises.push(p); return p; @@ -773,8 +773,8 @@ suite('TelemetryService', () => { let service = new TelemetryService({ appender: testAppender }, new class extends TestConfigurationService { - onDidChangeConfiguration = emitter.event; - getValue() { + override onDidChangeConfiguration = emitter.event; + override getValue() { return { enableTelemetry: enableTelemetry } as any; diff --git a/src/vs/platform/telemetry/test/common/telemetryLogAppender.test.ts b/src/vs/platform/telemetry/test/common/telemetryLogAppender.test.ts index ff2be7d5cd5784..5ed128e01f32d6 100644 --- a/src/vs/platform/telemetry/test/common/telemetryLogAppender.test.ts +++ b/src/vs/platform/telemetry/test/common/telemetryLogAppender.test.ts @@ -53,7 +53,7 @@ class TestTelemetryLogger extends AbstractLogger implements ILogger { } } - dispose(): void { } + override dispose(): void { } flush(): void { } } diff --git a/src/vs/platform/telemetry/test/electron-browser/appInsightsAppender.test.ts b/src/vs/platform/telemetry/test/electron-browser/appInsightsAppender.test.ts index 07789a3aefcceb..77c201e4bd2e60 100644 --- a/src/vs/platform/telemetry/test/electron-browser/appInsightsAppender.test.ts +++ b/src/vs/platform/telemetry/test/electron-browser/appInsightsAppender.test.ts @@ -7,8 +7,8 @@ import { AppInsightsAppender } from 'vs/platform/telemetry/node/appInsightsAppen import { TelemetryClient, Contracts } from 'applicationinsights'; class AppInsightsMock extends TelemetryClient { - public config: any; - public channel: any; + public override config: any; + public override channel: any; public events: Contracts.EventTelemetry[] = []; public IsTrackingPageView: boolean = false; public exceptions: any[] = []; @@ -17,11 +17,11 @@ class AppInsightsMock extends TelemetryClient { super('testKey'); } - public trackEvent(event: any) { + public override trackEvent(event: any) { this.events.push(event); } - public flush(options: any): void { + public override flush(options: any): void { // called on dispose } } diff --git a/src/vs/platform/terminal/node/ptyHostService.ts b/src/vs/platform/terminal/node/ptyHostService.ts index a37d86d3377a55..507586b21aad9e 100644 --- a/src/vs/platform/terminal/node/ptyHostService.ts +++ b/src/vs/platform/terminal/node/ptyHostService.ts @@ -137,7 +137,7 @@ export class PtyHostService extends Disposable implements IPtyService { return [client, proxy]; } - dispose() { + override dispose() { this._isDisposed = true; super.dispose(); } diff --git a/src/vs/platform/terminal/node/terminalProcess.ts b/src/vs/platform/terminal/node/terminalProcess.ts index bd875a24807351..a35c7305d30a84 100644 --- a/src/vs/platform/terminal/node/terminalProcess.ts +++ b/src/vs/platform/terminal/node/terminalProcess.ts @@ -232,7 +232,7 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess this._sendProcessId(ptyProcess.pid); } - public dispose(): void { + public override dispose(): void { this._isDisposed = true; if (this._titleInterval) { clearInterval(this._titleInterval); @@ -494,7 +494,7 @@ class DelayedResizer extends Disposable { }); } - dispose(): void { + override dispose(): void { super.dispose(); clearTimeout(this._timeout); } diff --git a/src/vs/platform/terminal/node/windowsShellHelper.ts b/src/vs/platform/terminal/node/windowsShellHelper.ts index 829afecba2753b..1fed411ed95f60 100644 --- a/src/vs/platform/terminal/node/windowsShellHelper.ts +++ b/src/vs/platform/terminal/node/windowsShellHelper.ts @@ -112,7 +112,7 @@ export class WindowsShellHelper extends Disposable implements IWindowsShellHelpe return this.traverseTree(tree.children[favouriteChild]); } - public dispose(): void { + public override dispose(): void { this._isDisposed = true; super.dispose(); } diff --git a/src/vs/platform/undoRedo/test/common/undoRedoService.test.ts b/src/vs/platform/undoRedo/test/common/undoRedoService.test.ts index 49f4944544b5d9..e4c8cc957df1ae 100644 --- a/src/vs/platform/undoRedo/test/common/undoRedoService.test.ts +++ b/src/vs/platform/undoRedo/test/common/undoRedoService.test.ts @@ -133,7 +133,7 @@ suite('UndoRedoService', () => { const resource1 = URI.file('test1.txt'); const resource2 = URI.file('test2.txt'); const service = createUndoRedoService(new class extends mock() { - async show() { + async override show() { return { choice: 0 // confirm! }; diff --git a/src/vs/platform/update/electron-main/updateService.darwin.ts b/src/vs/platform/update/electron-main/updateService.darwin.ts index b876e8814dd48c..b21f4e8650e63d 100644 --- a/src/vs/platform/update/electron-main/updateService.darwin.ts +++ b/src/vs/platform/update/electron-main/updateService.darwin.ts @@ -40,7 +40,7 @@ export class DarwinUpdateService extends AbstractUpdateService { super(lifecycleMainService, configurationService, environmentMainService, requestService, logService, productService); } - initialize(): void { + override initialize(): void { super.initialize(); this.onRawError(this.onError, this, this.disposables); this.onRawUpdateAvailable(this.onUpdateAvailable, this, this.disposables); @@ -110,7 +110,7 @@ export class DarwinUpdateService extends AbstractUpdateService { this.setState(State.Idle(UpdateType.Archive)); } - protected doQuitAndInstall(): void { + protected override doQuitAndInstall(): void { this.logService.trace('update#quitAndInstall(): running raw#quitAndInstall()'); electron.autoUpdater.quitAndInstall(); } diff --git a/src/vs/platform/update/electron-main/updateService.linux.ts b/src/vs/platform/update/electron-main/updateService.linux.ts index 7387636bfe735e..d6472f634b3108 100644 --- a/src/vs/platform/update/electron-main/updateService.linux.ts +++ b/src/vs/platform/update/electron-main/updateService.linux.ts @@ -62,7 +62,7 @@ export class LinuxUpdateService extends AbstractUpdateService { }); } - protected async doDownloadUpdate(state: AvailableForDownload): Promise { + protected async override doDownloadUpdate(state: AvailableForDownload): Promise { // Use the download URL if available as we don't currently detect the package type that was // installed and the website download page is more useful than the tarball generally. if (this.productService.downloadUrl && this.productService.downloadUrl.length > 0) { diff --git a/src/vs/platform/update/electron-main/updateService.snap.ts b/src/vs/platform/update/electron-main/updateService.snap.ts index e0d6010d06a80e..ed4f008351eea4 100644 --- a/src/vs/platform/update/electron-main/updateService.snap.ts +++ b/src/vs/platform/update/electron-main/updateService.snap.ts @@ -175,7 +175,7 @@ export class SnapUpdateService extends AbstractUpdateService2 { }); } - protected doQuitAndInstall(): void { + protected override doQuitAndInstall(): void { this.logService.trace('update#quitAndInstall(): running raw#quitAndInstall()'); // Allow 3 seconds for VS Code to close diff --git a/src/vs/platform/update/electron-main/updateService.win32.ts b/src/vs/platform/update/electron-main/updateService.win32.ts index 62d82342b36e6e..ef9c65054073ba 100644 --- a/src/vs/platform/update/electron-main/updateService.win32.ts +++ b/src/vs/platform/update/electron-main/updateService.win32.ts @@ -73,7 +73,7 @@ export class Win32UpdateService extends AbstractUpdateService { super(lifecycleMainService, configurationService, environmentMainService, requestService, logService, productService); } - initialize(): void { + override initialize(): void { super.initialize(); if (getUpdateType() === UpdateType.Setup) { @@ -177,7 +177,7 @@ export class Win32UpdateService extends AbstractUpdateService { }); } - protected async doDownloadUpdate(state: AvailableForDownload): Promise { + protected async override doDownloadUpdate(state: AvailableForDownload): Promise { if (state.update.url) { this.nativeHostMainService.openExternal(undefined, state.update.url); } @@ -206,7 +206,7 @@ export class Win32UpdateService extends AbstractUpdateService { await Promise.all(promises); } - protected async doApplyUpdate(): Promise { + protected async override doApplyUpdate(): Promise { if (this.state.type !== StateType.Downloaded && this.state.type !== StateType.Downloading) { return Promise.resolve(undefined); } @@ -242,7 +242,7 @@ export class Win32UpdateService extends AbstractUpdateService { .then(() => this.setState(State.Ready(update))); } - protected doQuitAndInstall(): void { + protected override doQuitAndInstall(): void { if (this.state.type !== StateType.Ready || !this.availableUpdate) { return; } @@ -259,7 +259,7 @@ export class Win32UpdateService extends AbstractUpdateService { } } - protected getUpdateType(): UpdateType { + protected override getUpdateType(): UpdateType { return getUpdateType(); } } diff --git a/src/vs/platform/userDataSync/common/extensionsSync.ts b/src/vs/platform/userDataSync/common/extensionsSync.ts index 3f96579bf34795..09e1cae5fe3d52 100644 --- a/src/vs/platform/userDataSync/common/extensionsSync.ts +++ b/src/vs/platform/userDataSync/common/extensionsSync.ts @@ -95,7 +95,7 @@ export class ExtensionsSynchroniser extends AbstractSynchroniser implements IUse /* Version 5: Introduce extension state */ protected readonly version: number = 5; - protected isEnabled(): boolean { return super.isEnabled() && this.extensionGalleryService.isEnabled(); } + protected override isEnabled(): boolean { return super.isEnabled() && this.extensionGalleryService.isEnabled(); } private readonly previewResource: URI = this.extUri.joinPath(this.syncPreviewFolder, 'extensions.json'); private readonly localResource: URI = this.previewResource.with({ scheme: USER_DATA_SYNC_SCHEME, authority: 'local' }); private readonly remoteResource: URI = this.previewResource.with({ scheme: USER_DATA_SYNC_SCHEME, authority: 'remote' }); @@ -292,7 +292,7 @@ export class ExtensionsSynchroniser extends AbstractSynchroniser implements IUse return [{ resource: this.extUri.joinPath(uri, 'extensions.json'), comparableResource: ExtensionsSynchroniser.EXTENSIONS_DATA_URI }]; } - async resolveContent(uri: URI): Promise { + async override resolveContent(uri: URI): Promise { if (this.extUri.isEqual(uri, ExtensionsSynchroniser.EXTENSIONS_DATA_URI)) { const installedExtensions = await this.extensionManagementService.getInstalled(); const ignoredExtensions = this.ignoredExtensionsManagementService.getIgnoredExtensions(installedExtensions); diff --git a/src/vs/platform/userDataSync/common/globalStateSync.ts b/src/vs/platform/userDataSync/common/globalStateSync.ts index 2e58f17ae955a3..a3a284efab60a7 100644 --- a/src/vs/platform/userDataSync/common/globalStateSync.ts +++ b/src/vs/platform/userDataSync/common/globalStateSync.ts @@ -230,7 +230,7 @@ export class GlobalStateSynchroniser extends AbstractSynchroniser implements IUs return [{ resource: this.extUri.joinPath(uri, 'globalState.json'), comparableResource: GlobalStateSynchroniser.GLOBAL_STATE_DATA_URI }]; } - async resolveContent(uri: URI): Promise { + async override resolveContent(uri: URI): Promise { if (this.extUri.isEqual(uri, GlobalStateSynchroniser.GLOBAL_STATE_DATA_URI)) { const localGlobalState = await this.getLocalGlobalState(); return formatAndStringify(localGlobalState); diff --git a/src/vs/platform/userDataSync/common/keybindingsSync.ts b/src/vs/platform/userDataSync/common/keybindingsSync.ts index 7f93636705bcf8..5e7e71d979a992 100644 --- a/src/vs/platform/userDataSync/common/keybindingsSync.ts +++ b/src/vs/platform/userDataSync/common/keybindingsSync.ts @@ -258,7 +258,7 @@ export class KeybindingsSynchroniser extends AbstractJsonFileSynchroniser implem return [{ resource: this.extUri.joinPath(uri, 'keybindings.json'), comparableResource }]; } - async resolveContent(uri: URI): Promise { + async override resolveContent(uri: URI): Promise { if (this.extUri.isEqual(this.remoteResource, uri) || this.extUri.isEqual(this.localResource, uri) || this.extUri.isEqual(this.acceptedResource, uri)) { return this.resolvePreviewContent(uri); } diff --git a/src/vs/platform/userDataSync/common/settingsSync.ts b/src/vs/platform/userDataSync/common/settingsSync.ts index d4e31ee05b7c3b..245d4cff8fdc5a 100644 --- a/src/vs/platform/userDataSync/common/settingsSync.ts +++ b/src/vs/platform/userDataSync/common/settingsSync.ts @@ -247,7 +247,7 @@ export class SettingsSynchroniser extends AbstractJsonFileSynchroniser implement return [{ resource: this.extUri.joinPath(uri, 'settings.json'), comparableResource }]; } - async resolveContent(uri: URI): Promise { + async override resolveContent(uri: URI): Promise { if (this.extUri.isEqual(this.remoteResource, uri) || this.extUri.isEqual(this.localResource, uri) || this.extUri.isEqual(this.acceptedResource, uri)) { return this.resolvePreviewContent(uri); } @@ -271,7 +271,7 @@ export class SettingsSynchroniser extends AbstractJsonFileSynchroniser implement return null; } - protected async resolvePreviewContent(resource: URI): Promise { + protected async override resolvePreviewContent(resource: URI): Promise { let content = await super.resolvePreviewContent(resource); if (content) { const formatUtils = await this.getFormattingOptions(); diff --git a/src/vs/platform/userDataSync/common/snippetsSync.ts b/src/vs/platform/userDataSync/common/snippetsSync.ts index 3068afb6c6b261..0f4c7841bbe381 100644 --- a/src/vs/platform/userDataSync/common/snippetsSync.ts +++ b/src/vs/platform/userDataSync/common/snippetsSync.ts @@ -355,7 +355,7 @@ export class SnippetsSynchroniser extends AbstractSynchroniser implements IUserD return []; } - async resolveContent(uri: URI): Promise { + async override resolveContent(uri: URI): Promise { if (this.extUri.isEqualOrParent(uri, this.syncPreviewFolder.with({ scheme: USER_DATA_SYNC_SCHEME, authority: 'remote' })) || this.extUri.isEqualOrParent(uri, this.syncPreviewFolder.with({ scheme: USER_DATA_SYNC_SCHEME, authority: 'local' })) || this.extUri.isEqualOrParent(uri, this.syncPreviewFolder.with({ scheme: USER_DATA_SYNC_SCHEME, authority: 'accepted' }))) { diff --git a/src/vs/platform/userDataSync/common/userDataSyncService.ts b/src/vs/platform/userDataSync/common/userDataSyncService.ts index b059b81ee4014b..c8f729409d4e10 100644 --- a/src/vs/platform/userDataSync/common/userDataSyncService.ts +++ b/src/vs/platform/userDataSync/common/userDataSyncService.ts @@ -727,7 +727,7 @@ class ManualSyncTask extends Disposable implements IManualSyncTask { this.synchronizingResources = []; } - dispose(): void { + override dispose(): void { this.reset(); this.isDisposed = true; } diff --git a/src/vs/platform/userDataSync/common/userDataSyncServiceIpc.ts b/src/vs/platform/userDataSync/common/userDataSyncServiceIpc.ts index ee55c0be9aa1ae..92304d39bf2d96 100644 --- a/src/vs/platform/userDataSync/common/userDataSyncServiceIpc.ts +++ b/src/vs/platform/userDataSync/common/userDataSyncServiceIpc.ts @@ -356,7 +356,7 @@ class ManualSyncTaskChannelClient extends Disposable implements IManualSyncTask private _disposed = false; isDiposed() { return this._disposed; } - dispose(): void { + override dispose(): void { this._disposed = true; this.channel.call('dispose'); } diff --git a/src/vs/platform/userDataSync/test/common/synchronizer.test.ts b/src/vs/platform/userDataSync/test/common/synchronizer.test.ts index 06d57e78906df9..4a942e65db8e7a 100644 --- a/src/vs/platform/userDataSync/test/common/synchronizer.test.ts +++ b/src/vs/platform/userDataSync/test/common/synchronizer.test.ts @@ -28,20 +28,20 @@ class TestSynchroniser extends AbstractSynchroniser { onDoSyncCall: Emitter = this._register(new Emitter()); failWhenGettingLatestRemoteUserData: boolean = false; - readonly resource: SyncResource = SyncResource.Settings; + override readonly resource: SyncResource = SyncResource.Settings; protected readonly version: number = 1; private cancelled: boolean = false; readonly localResource = joinPath(this.environmentService.userRoamingDataHome, 'testResource.json'); - protected getLatestRemoteUserData(manifest: IUserDataManifest | null, lastSyncUserData: IRemoteUserData | null): Promise { + protected override getLatestRemoteUserData(manifest: IUserDataManifest | null, lastSyncUserData: IRemoteUserData | null): Promise { if (this.failWhenGettingLatestRemoteUserData) { throw new Error(); } return super.getLatestRemoteUserData(manifest, lastSyncUserData); } - protected async doSync(remoteUserData: IRemoteUserData, lastSyncUserData: IRemoteUserData | null, apply: boolean): Promise { + protected async override doSync(remoteUserData: IRemoteUserData, lastSyncUserData: IRemoteUserData | null, apply: boolean): Promise { this.cancelled = false; this.onDoSyncCall.fire(); await this.syncBarrier.wait(); @@ -145,18 +145,18 @@ class TestSynchroniser extends AbstractSynchroniser { await this.updateLastSyncUserData(remoteUserData); } - async stop(): Promise { + async override stop(): Promise { this.cancelled = true; this.syncBarrier.open(); super.stop(); } - async triggerLocalChange(): Promise { + async override triggerLocalChange(): Promise { super.triggerLocalChange(); } onDidTriggerLocalChangeCall: Emitter = this._register(new Emitter()); - protected async doTriggerLocalChange(): Promise { + protected async override doTriggerLocalChange(): Promise { await super.doTriggerLocalChange(); this.onDidTriggerLocalChangeCall.fire(); } diff --git a/src/vs/platform/userDataSync/test/common/userDataAutoSyncService.test.ts b/src/vs/platform/userDataSync/test/common/userDataAutoSyncService.test.ts index ce033acd6f14c4..a015b118d754aa 100644 --- a/src/vs/platform/userDataSync/test/common/userDataAutoSyncService.test.ts +++ b/src/vs/platform/userDataSync/test/common/userDataAutoSyncService.test.ts @@ -16,8 +16,8 @@ import { joinPath } from 'vs/base/common/resources'; import { IUserDataSyncMachinesService } from 'vs/platform/userDataSync/common/userDataSyncMachines'; class TestUserDataAutoSyncService extends UserDataAutoSyncService { - protected startAutoSync(): boolean { return false; } - protected getSyncTriggerDelayTime(): number { return 50; } + protected override startAutoSync(): boolean { return false; } + protected override getSyncTriggerDelayTime(): number { return 50; } sync(): Promise { return this.triggerSync(['sync'], false, false); diff --git a/src/vs/platform/webview/electron-main/webviewProtocolProvider.ts b/src/vs/platform/webview/electron-main/webviewProtocolProvider.ts index c25169b9f5dda4..56dca62a5e7ead 100644 --- a/src/vs/platform/webview/electron-main/webviewProtocolProvider.ts +++ b/src/vs/platform/webview/electron-main/webviewProtocolProvider.ts @@ -77,7 +77,7 @@ export class WebviewProtocolProvider extends Disposable { return new class extends Readable { private listening = false; - _read(size?: number): void { + override _read(size?: number): void { if (!this.listening) { this.listening = true; @@ -108,7 +108,7 @@ export class WebviewProtocolProvider extends Disposable { stream.resume(); } - _destroy(error: Error | null, callback: (error: Error | null) => void): void { + override _destroy(error: Error | null, callback: (error: Error | null) => void): void { stream.destroy(); callback(null); diff --git a/src/vs/platform/workspaces/test/electron-main/workspacesManagementMainService.test.ts b/src/vs/platform/workspaces/test/electron-main/workspacesManagementMainService.test.ts index 5f1eb19f6fba3e..1b524310e9c1f1 100644 --- a/src/vs/platform/workspaces/test/electron-main/workspacesManagementMainService.test.ts +++ b/src/vs/platform/workspaces/test/electron-main/workspacesManagementMainService.test.ts @@ -102,7 +102,7 @@ flakySuite('WorkspacesManagementMainService', () => { super(parseArgs(process.argv, OPTIONS), productService); } - get untitledWorkspacesHome(): URI { + override get untitledWorkspacesHome(): URI { return URI.file(untitledWorkspacesHomePath); } }; diff --git a/src/vs/workbench/api/browser/mainThreadCLICommands.ts b/src/vs/workbench/api/browser/mainThreadCLICommands.ts index 0976a8ab5d3e9a..0277dd5bb146d4 100644 --- a/src/vs/workbench/api/browser/mainThreadCLICommands.ts +++ b/src/vs/workbench/api/browser/mainThreadCLICommands.ts @@ -95,11 +95,11 @@ class RemoteExtensionCLIManagementService extends ExtensionManagementCLIService this._extensionKindController = new ExtensionKindController(productService, configurationService); } - protected get location(): string | undefined { + protected override get location(): string | undefined { return this._location; } - protected validateExtensionKind(manifest: IExtensionManifest, output: CLIOutput): boolean { + protected override validateExtensionKind(manifest: IExtensionManifest, output: CLIOutput): boolean { if (!this._extensionKindController.canExecuteOnWorkspace(manifest)) { output.log(localize('cannot be installed', "Cannot install the '{0}' extension because it is declared to not run in this setup.", getExtensionId(manifest.publisher, manifest.name))); return false; diff --git a/src/vs/workbench/api/browser/mainThreadComments.ts b/src/vs/workbench/api/browser/mainThreadComments.ts index 64b607f7c585a8..c866d7f7fcbc11 100644 --- a/src/vs/workbench/api/browser/mainThreadComments.ts +++ b/src/vs/workbench/api/browser/mainThreadComments.ts @@ -535,7 +535,7 @@ export class MainThreadComments extends Disposable implements MainThreadComments this._commentService.updateComments(providerId, event); } - dispose(): void { + override dispose(): void { super.dispose(); this._workspaceProviders.forEach(value => dispose(value)); this._workspaceProviders.clear(); diff --git a/src/vs/workbench/api/browser/mainThreadCustomEditors.ts b/src/vs/workbench/api/browser/mainThreadCustomEditors.ts index fec3341bc3235e..24cc045670ee02 100644 --- a/src/vs/workbench/api/browser/mainThreadCustomEditors.ts +++ b/src/vs/workbench/api/browser/mainThreadCustomEditors.ts @@ -92,7 +92,7 @@ export class MainThreadCustomEditors extends Disposable implements extHostProtoc })); } - dispose() { + override dispose() { super.dispose(); dispose(this._editorProviders.values()); @@ -345,7 +345,7 @@ class MainThreadCustomEditorModel extends Disposable implements ICustomEditorMod return this._editorResource; } - dispose() { + override dispose() { this.#isDisposed = true; if (this._editable) { diff --git a/src/vs/workbench/api/browser/mainThreadDocuments.ts b/src/vs/workbench/api/browser/mainThreadDocuments.ts index 1ac417c8acba6d..eda90f2c22c564 100644 --- a/src/vs/workbench/api/browser/mainThreadDocuments.ts +++ b/src/vs/workbench/api/browser/mainThreadDocuments.ts @@ -169,7 +169,7 @@ export class MainThreadDocuments extends Disposable implements MainThreadDocumen this._modelTrackers = Object.create(null); } - public dispose(): void { + public override dispose(): void { Object.keys(this._modelTrackers).forEach((modelUrl) => { this._modelTrackers[modelUrl].dispose(); }); diff --git a/src/vs/workbench/api/browser/mainThreadTesting.ts b/src/vs/workbench/api/browser/mainThreadTesting.ts index 59469907848057..1681a58d8e3d4c 100644 --- a/src/vs/workbench/api/browser/mainThreadTesting.ts +++ b/src/vs/workbench/api/browser/mainThreadTesting.ts @@ -152,7 +152,7 @@ export class MainThreadTesting extends Disposable implements MainThreadTestingSh return result.id; } - public dispose() { + public override dispose() { super.dispose(); for (const subscription of this.testSubscriptions.values()) { subscription.dispose(); diff --git a/src/vs/workbench/api/browser/mainThreadTreeViews.ts b/src/vs/workbench/api/browser/mainThreadTreeViews.ts index 40b6794bfae8b4..b70ff475447fbd 100644 --- a/src/vs/workbench/api/browser/mainThreadTreeViews.ts +++ b/src/vs/workbench/api/browser/mainThreadTreeViews.ts @@ -147,7 +147,7 @@ export class MainThreadTreeViews extends Disposable implements MainThreadTreeVie return viewDescriptor ? viewDescriptor.treeView : null; } - dispose(): void { + override dispose(): void { this._dataProviders.forEach((dataProvider, treeViewId) => { const treeView = this.getTreeView(treeViewId); if (treeView) { diff --git a/src/vs/workbench/api/browser/mainThreadUriOpeners.ts b/src/vs/workbench/api/browser/mainThreadUriOpeners.ts index ee05a2d6627d20..daaeb1e5dd231b 100644 --- a/src/vs/workbench/api/browser/mainThreadUriOpeners.ts +++ b/src/vs/workbench/api/browser/mainThreadUriOpeners.ts @@ -128,7 +128,7 @@ export class MainThreadUriOpeners extends Disposable implements MainThreadUriOpe this._contributedExternalUriOpenersStore.delete(id); } - dispose(): void { + override dispose(): void { super.dispose(); this._registeredOpeners.clear(); } diff --git a/src/vs/workbench/api/browser/mainThreadWebviewPanels.ts b/src/vs/workbench/api/browser/mainThreadWebviewPanels.ts index 38dd25cadc7aff..22bfaff30a5da6 100644 --- a/src/vs/workbench/api/browser/mainThreadWebviewPanels.ts +++ b/src/vs/workbench/api/browser/mainThreadWebviewPanels.ts @@ -123,7 +123,7 @@ export class MainThreadWebviewPanels extends Disposable implements extHostProtoc })); } - dispose() { + override dispose() { super.dispose(); dispose(this._editorProviders.values()); diff --git a/src/vs/workbench/api/browser/mainThreadWebviewViews.ts b/src/vs/workbench/api/browser/mainThreadWebviewViews.ts index d2d670a6089395..eb767e2744e3fe 100644 --- a/src/vs/workbench/api/browser/mainThreadWebviewViews.ts +++ b/src/vs/workbench/api/browser/mainThreadWebviewViews.ts @@ -28,7 +28,7 @@ export class MainThreadWebviewsViews extends Disposable implements extHostProtoc this._proxy = context.getProxy(extHostProtocol.ExtHostContext.ExtHostWebviewViews); } - dispose() { + override dispose() { super.dispose(); dispose(this._webviewViewProviders.values()); diff --git a/src/vs/workbench/api/common/extHostDiagnostics.ts b/src/vs/workbench/api/common/extHostDiagnostics.ts index ef990862c81a4b..1114e309d858e2 100644 --- a/src/vs/workbench/api/common/extHostDiagnostics.ts +++ b/src/vs/workbench/api/common/extHostDiagnostics.ts @@ -288,7 +288,7 @@ export class ExtHostDiagnostics implements ExtHostDiagnosticsShape { super(name!, owner, ExtHostDiagnostics._maxDiagnosticsPerFile, loggingProxy, _onDidChangeDiagnostics); _collections.set(owner, this); } - dispose() { + override dispose() { super.dispose(); _collections.delete(owner); } diff --git a/src/vs/workbench/api/common/extHostDocumentData.ts b/src/vs/workbench/api/common/extHostDocumentData.ts index 0cd5c8378fc797..d244a16b8aa32a 100644 --- a/src/vs/workbench/api/common/extHostDocumentData.ts +++ b/src/vs/workbench/api/common/extHostDocumentData.ts @@ -42,7 +42,7 @@ export class ExtHostDocumentData extends MirrorTextModel { super(uri, lines, eol, versionId); } - dispose(): void { + override dispose(): void { // we don't really dispose documents but let // extensions still read from them. some // operations, live saving, will now error tho diff --git a/src/vs/workbench/api/common/extHostNotebook.ts b/src/vs/workbench/api/common/extHostNotebook.ts index 61546ab9f15ec0..f156c720cf0e31 100644 --- a/src/vs/workbench/api/common/extHostNotebook.ts +++ b/src/vs/workbench/api/common/extHostNotebook.ts @@ -1007,7 +1007,7 @@ export class NotebookCellStatusBarItemInternal extends Disposable { this.update(); } - dispose(): void { + override dispose(): void { this.hide(); this._isDisposed = true; this._internalCommandRegistration.dispose(); diff --git a/src/vs/workbench/api/common/extHostNotebookDocument.ts b/src/vs/workbench/api/common/extHostNotebookDocument.ts index c2023c7d05ba67..03e5d87d56a2ce 100644 --- a/src/vs/workbench/api/common/extHostNotebookDocument.ts +++ b/src/vs/workbench/api/common/extHostNotebookDocument.ts @@ -160,7 +160,7 @@ export class ExtHostNotebookDocument extends Disposable { super(); } - dispose() { + override dispose() { this._disposed = true; super.dispose(); dispose(this._cellDisposableMapping.values()); diff --git a/src/vs/workbench/api/common/extHostOutput.ts b/src/vs/workbench/api/common/extHostOutput.ts index a8bc2ddd474ce8..1b7a2d4c8afa89 100644 --- a/src/vs/workbench/api/common/extHostOutput.ts +++ b/src/vs/workbench/api/common/extHostOutput.ts @@ -73,7 +73,7 @@ export abstract class AbstractExtHostOutputChannel extends Disposable implements } } - dispose(): void { + override dispose(): void { super.dispose(); if (!this._disposed) { @@ -90,7 +90,7 @@ export class ExtHostPushOutputChannel extends AbstractExtHostOutputChannel { super(name, false, undefined, proxy); } - append(value: string): void { + override append(value: string): void { super.append(value); this._id.then(id => this._proxy.$append(id, value)); this._onDidAppend.fire(); @@ -103,7 +103,7 @@ class ExtHostLogFileOutputChannel extends AbstractExtHostOutputChannel { super(name, true, file, proxy); } - append(value: string): void { + override append(value: string): void { throw new Error('Not supported'); } } diff --git a/src/vs/workbench/api/common/extHostTesting.ts b/src/vs/workbench/api/common/extHostTesting.ts index 6a266956786b71..d75657c2d4b4b5 100644 --- a/src/vs/workbench/api/common/extHostTesting.ts +++ b/src/vs/workbench/api/common/extHostTesting.ts @@ -486,14 +486,14 @@ class MirroredChangeCollector extends IncrementalChangeCollector extends Disposable { this.nodes.clear(); } - dispose() { + override dispose() { this._refreshCancellationSource.dispose(); this.clearAll(); diff --git a/src/vs/workbench/api/common/extHostTypes.ts b/src/vs/workbench/api/common/extHostTypes.ts index 0a807063cc7c43..2eb5b2e8973712 100644 --- a/src/vs/workbench/api/common/extHostTypes.ts +++ b/src/vs/workbench/api/common/extHostTypes.ts @@ -419,7 +419,7 @@ export class Selection extends Range { return this._anchor === this._end; } - toJSON() { + override toJSON() { return { start: this.start, end: this.end, diff --git a/src/vs/workbench/api/common/extHostWebviewPanels.ts b/src/vs/workbench/api/common/extHostWebviewPanels.ts index ace45ef742b58f..9622f8799cc01b 100644 --- a/src/vs/workbench/api/common/extHostWebviewPanels.ts +++ b/src/vs/workbench/api/common/extHostWebviewPanels.ts @@ -60,7 +60,7 @@ class ExtHostWebviewPanel extends Disposable implements vscode.WebviewPanel { this.#webview = webview; } - public dispose() { + public override dispose() { if (this.#isDisposed) { return; } diff --git a/src/vs/workbench/api/common/extHostWebviewView.ts b/src/vs/workbench/api/common/extHostWebviewView.ts index 6f28d51b938718..d91a5d30d2c224 100644 --- a/src/vs/workbench/api/common/extHostWebviewView.ts +++ b/src/vs/workbench/api/common/extHostWebviewView.ts @@ -43,7 +43,7 @@ class ExtHostWebviewView extends Disposable implements vscode.WebviewView { this.#isVisible = isVisible; } - public dispose() { + public override dispose() { if (this.#isDisposed) { return; } diff --git a/src/vs/workbench/api/node/extHostDebugService.ts b/src/vs/workbench/api/node/extHostDebugService.ts index c8c7f4cd50c1da..6f50c8cad05b65 100644 --- a/src/vs/workbench/api/node/extHostDebugService.ts +++ b/src/vs/workbench/api/node/extHostDebugService.ts @@ -27,7 +27,7 @@ import { createCancelablePromise, firstParallel } from 'vs/base/common/async'; export class ExtHostDebugService extends ExtHostDebugServiceBase { - readonly _serviceBrand: undefined; + override readonly _serviceBrand: undefined; private _integratedTerminalInstances = new DebugTerminalCollection(); private _terminalDisposedListener: IDisposable | undefined; @@ -43,7 +43,7 @@ export class ExtHostDebugService extends ExtHostDebugServiceBase { super(extHostRpcService, workspaceService, extensionService, editorsService, configurationService); } - protected createDebugAdapter(adapter: IAdapterDescriptor, session: ExtHostDebugSession): AbstractDebugAdapter | undefined { + protected override createDebugAdapter(adapter: IAdapterDescriptor, session: ExtHostDebugSession): AbstractDebugAdapter | undefined { switch (adapter.type) { case 'server': return new SocketDebugAdapter(adapter); @@ -55,7 +55,7 @@ export class ExtHostDebugService extends ExtHostDebugServiceBase { return super.createDebugAdapter(adapter, session); } - protected daExecutableFromPackage(session: ExtHostDebugSession, extensionRegistry: ExtensionDescriptionRegistry): DebugAdapterExecutable | undefined { + protected override daExecutableFromPackage(session: ExtHostDebugSession, extensionRegistry: ExtensionDescriptionRegistry): DebugAdapterExecutable | undefined { const dae = ExecutableDebugAdapter.platformAdapterExecutable(extensionRegistry.getAllExtensionDescriptions(), session.type); if (dae) { return new DebugAdapterExecutable(dae.command, dae.args, dae.options); @@ -63,11 +63,11 @@ export class ExtHostDebugService extends ExtHostDebugServiceBase { return undefined; } - protected createSignService(): ISignService | undefined { + protected override createSignService(): ISignService | undefined { return new SignService(); } - public async $runInTerminal(args: DebugProtocol.RunInTerminalRequestArguments, sessionId: string): Promise { + public async override $runInTerminal(args: DebugProtocol.RunInTerminalRequestArguments, sessionId: string): Promise { if (args.kind === 'integrated') { diff --git a/src/vs/workbench/api/node/extHostOutputService.ts b/src/vs/workbench/api/node/extHostOutputService.ts index 51b92b3d367d51..518c90b4b732c6 100644 --- a/src/vs/workbench/api/node/extHostOutputService.ts +++ b/src/vs/workbench/api/node/extHostOutputService.ts @@ -47,23 +47,23 @@ export class ExtHostOutputChannelBackedByFile extends AbstractExtHostOutputChann this._appender = appender; } - append(value: string): void { + override append(value: string): void { super.append(value); this._appender.append(value); this._onDidAppend.fire(); } - update(): void { + override update(): void { this._appender.flush(); super.update(); } - show(columnOrPreserveFocus?: vscode.ViewColumn | boolean, preserveFocus?: boolean): void { + override show(columnOrPreserveFocus?: vscode.ViewColumn | boolean, preserveFocus?: boolean): void { this._appender.flush(); super.show(columnOrPreserveFocus, preserveFocus); } - clear(): void { + override clear(): void { this._appender.flush(); super.clear(); } @@ -85,7 +85,7 @@ export class ExtHostOutputService2 extends ExtHostOutputService { this._logsLocation = initData.logsLocation; } - $setVisibleChannel(channelId: string): void { + override $setVisibleChannel(channelId: string): void { if (channelId) { const channel = this._channels.get(channelId); if (channel) { @@ -94,7 +94,7 @@ export class ExtHostOutputService2 extends ExtHostOutputService { } } - createOutputChannel(name: string): vscode.OutputChannel { + override createOutputChannel(name: string): vscode.OutputChannel { name = name.trim(); if (!name) { throw new Error('illegal argument `name`. must not be falsy'); diff --git a/src/vs/workbench/api/node/extHostSearch.ts b/src/vs/workbench/api/node/extHostSearch.ts index 0dba1956d5865a..be31f4ad1e0c6c 100644 --- a/src/vs/workbench/api/node/extHostSearch.ts +++ b/src/vs/workbench/api/node/extHostSearch.ts @@ -59,7 +59,7 @@ export class NativeExtHostSearch extends ExtHostSearch { }); } - $provideFileSearchResults(handle: number, session: number, rawQuery: IRawFileQuery, token: vscode.CancellationToken): Promise { + override $provideFileSearchResults(handle: number, session: number, rawQuery: IRawFileQuery, token: vscode.CancellationToken): Promise { const query = reviveQuery(rawQuery); if (handle === this._internalFileSearchHandle) { return this.doInternalFileSearch(handle, session, query, token); @@ -91,7 +91,7 @@ export class NativeExtHostSearch extends ExtHostSearch { return >this._internalFileSearchProvider.doFileSearch(rawQuery, onResult, token); } - $clearCache(cacheKey: string): Promise { + override $clearCache(cacheKey: string): Promise { if (this._internalFileSearchProvider) { this._internalFileSearchProvider.clearCache(cacheKey); } @@ -99,7 +99,7 @@ export class NativeExtHostSearch extends ExtHostSearch { return super.$clearCache(cacheKey); } - protected createTextSearchManager(query: ITextQuery, provider: vscode.TextSearchProvider): TextSearchManager { + protected override createTextSearchManager(query: ITextQuery, provider: vscode.TextSearchProvider): TextSearchManager { return new NativeTextSearchManager(query, provider); } } diff --git a/src/vs/workbench/browser/actions/layoutActions.ts b/src/vs/workbench/browser/actions/layoutActions.ts index 75fb709ed6c9c0..029690a20bb150 100644 --- a/src/vs/workbench/browser/actions/layoutActions.ts +++ b/src/vs/workbench/browser/actions/layoutActions.ts @@ -139,7 +139,7 @@ export class ToggleSidebarPositionAction extends Action { super(id, label); } - run(): Promise { + override run(): Promise { const position = this.layoutService.getSideBarPosition(); const newPositionValue = (position === Position.LEFT) ? 'right' : 'left'; @@ -244,7 +244,7 @@ export class ToggleEditorVisibilityAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.layoutService.toggleMaximizedPanel(); } } @@ -339,7 +339,7 @@ export class ToggleStatusbarVisibilityAction extends Action { super(id, label); } - run(): Promise { + override run(): Promise { const visibility = this.layoutService.isVisible(Parts.STATUSBAR_PART); const newVisibilityValue = !visibility; @@ -376,7 +376,7 @@ class ToggleTabsVisibilityAction extends Action { super(id, label); } - run(): Promise { + override run(): Promise { const visibility = this.configurationService.getValue(ToggleTabsVisibilityAction.tabsVisibleKey); const newVisibilityValue = !visibility; @@ -405,7 +405,7 @@ class ToggleZenMode extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.layoutService.toggleZenMode(); } } @@ -448,7 +448,7 @@ export class ToggleMenuBarAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.layoutService.toggleMenuBar(); } } @@ -482,7 +482,7 @@ export class ResetViewLocationsAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.viewDescriptorService.reset(); } } @@ -585,7 +585,7 @@ export class MoveViewAction extends Action { }); } - async run(): Promise { + async override run(): Promise { const focusedViewId = FocusedViewContext.getValue(this.contextKeyService); let viewId: string; @@ -624,7 +624,7 @@ export class MoveFocusedViewAction extends Action { super(id, label); } - async run(viewId: string): Promise { + async override run(viewId: string): Promise { const focusedViewId = viewId || FocusedViewContext.getValue(this.contextKeyService); if (focusedViewId === undefined || focusedViewId.trim() === '') { @@ -744,7 +744,7 @@ export class ResetFocusedViewLocationAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const focusedViewId = FocusedViewContext.getValue(this.contextKeyService); let viewDescriptor: IViewDescriptor | null = null; diff --git a/src/vs/workbench/browser/actions/navigationActions.ts b/src/vs/workbench/browser/actions/navigationActions.ts index 6796c4d69c345b..b0b581435611ac 100644 --- a/src/vs/workbench/browser/actions/navigationActions.ts +++ b/src/vs/workbench/browser/actions/navigationActions.ts @@ -32,7 +32,7 @@ abstract class BaseNavigationAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const isEditorFocus = this.layoutService.hasFocus(Parts.EDITOR_PART); const isPanelFocus = this.layoutService.hasFocus(Parts.PANEL_PART); const isSidebarFocus = this.layoutService.hasFocus(Parts.SIDEBAR_PART); @@ -234,7 +234,7 @@ export class FocusNextPart extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { focusNextOrPreviousPart(this.layoutService, this.editorService, true); } } @@ -252,7 +252,7 @@ export class FocusPreviousPart extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { focusNextOrPreviousPart(this.layoutService, this.editorService, false); } } diff --git a/src/vs/workbench/browser/actions/windowActions.ts b/src/vs/workbench/browser/actions/windowActions.ts index 389e9c794fec2b..85249494a70606 100644 --- a/src/vs/workbench/browser/actions/windowActions.ts +++ b/src/vs/workbench/browser/actions/windowActions.ts @@ -78,7 +78,7 @@ abstract class BaseOpenRecentAction extends Action { protected abstract isQuickNavigate(): boolean; - async run(): Promise { + async override run(): Promise { const recentlyOpened = await this.workspacesService.getRecentlyOpened(); const dirtyWorkspacesAndFolders = await this.workspacesService.getDirtyWorkspaces(); @@ -286,7 +286,7 @@ class ToggleFullScreenAction extends Action { super(id, label); } - run(): Promise { + override run(): Promise { return this.hostService.toggleFullScreen(); } } @@ -304,7 +304,7 @@ export class ReloadWindowAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { await this.hostService.reload(); } } @@ -322,7 +322,7 @@ class ShowAboutDialogAction extends Action { super(id, label); } - run(): Promise { + override run(): Promise { return this.dialogService.about(); } } @@ -340,7 +340,7 @@ export class NewWindowAction extends Action { super(id, label); } - run(): Promise { + override run(): Promise { return this.hostService.openWindow({ remoteAuthority: null }); } } diff --git a/src/vs/workbench/browser/actions/workspaceActions.ts b/src/vs/workbench/browser/actions/workspaceActions.ts index ba19ed1be61d13..13e2f1bb1b2207 100644 --- a/src/vs/workbench/browser/actions/workspaceActions.ts +++ b/src/vs/workbench/browser/actions/workspaceActions.ts @@ -39,7 +39,7 @@ export class OpenFileAction extends Action { super(id, label); } - run(event?: unknown, data?: ITelemetryData): Promise { + override run(event?: unknown, data?: ITelemetryData): Promise { return this.dialogService.pickFileAndOpen({ forceNewWindow: false, telemetryExtraData: data }); } } @@ -57,7 +57,7 @@ export class OpenFolderAction extends Action { super(id, label); } - run(event?: unknown, data?: ITelemetryData): Promise { + override run(event?: unknown, data?: ITelemetryData): Promise { return this.dialogService.pickFolderAndOpen({ forceNewWindow: false, telemetryExtraData: data }); } } @@ -75,7 +75,7 @@ export class OpenFileFolderAction extends Action { super(id, label); } - run(event?: unknown, data?: ITelemetryData): Promise { + override run(event?: unknown, data?: ITelemetryData): Promise { return this.dialogService.pickFileFolderAndOpen({ forceNewWindow: false, telemetryExtraData: data }); } } @@ -93,7 +93,7 @@ export class OpenWorkspaceAction extends Action { super(id, label); } - run(event?: unknown, data?: ITelemetryData): Promise { + override run(event?: unknown, data?: ITelemetryData): Promise { return this.dialogService.pickWorkspaceAndOpen({ telemetryExtraData: data }); } } @@ -114,7 +114,7 @@ export class CloseWorkspaceAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { if (this.contextService.getWorkbenchState() === WorkbenchState.EMPTY) { this.notificationService.info(localize('noWorkspaceOrFolderOpened', "There is currently no workspace or folder opened in this instance to close.")); return; @@ -140,7 +140,7 @@ export class OpenWorkspaceConfigFileAction extends Action { this.enabled = !!this.workspaceContextService.getWorkspace().configuration; } - async run(): Promise { + async override run(): Promise { const configuration = this.workspaceContextService.getWorkspace().configuration; if (configuration) { await this.editorService.openEditor({ resource: configuration, options: { pinned: true } }); @@ -161,7 +161,7 @@ export class AddRootFolderAction extends Action { super(id, label); } - run(): Promise { + override run(): Promise { return this.commandService.executeCommand(ADD_ROOT_FOLDER_COMMAND_ID); } } @@ -181,7 +181,7 @@ export class GlobalRemoveRootFolderAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const state = this.contextService.getWorkbenchState(); // Workspace / Folder @@ -209,7 +209,7 @@ export class SaveWorkspaceAsAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const configPathUri = await this.workspaceEditingService.pickNewWorkspacePath(); if (configPathUri && hasWorkspaceFileExtension(configPathUri)) { switch (this.contextService.getWorkbenchState()) { @@ -241,7 +241,7 @@ export class DuplicateWorkspaceInNewWindowAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const folders = this.workspaceContextService.getWorkspace().folders; const remoteAuthority = this.environmentService.remoteAuthority; diff --git a/src/vs/workbench/browser/codeeditor.ts b/src/vs/workbench/browser/codeeditor.ts index f7d116f6b92208..239435c2bb6ab3 100644 --- a/src/vs/workbench/browser/codeeditor.ts +++ b/src/vs/workbench/browser/codeeditor.ts @@ -122,7 +122,7 @@ export class RangeHighlightDecorations extends Disposable { return (isWholeLine ? RangeHighlightDecorations._WHOLE_LINE_RANGE_HIGHLIGHT : RangeHighlightDecorations._RANGE_HIGHLIGHT); } - dispose() { + override dispose() { super.dispose(); if (this.editor?.getModel()) { @@ -201,7 +201,7 @@ export class FloatingClickWidget extends Widget implements IOverlayWidget { this.editor.addOverlayWidget(this); } - dispose(): void { + override dispose(): void { this.editor.removeOverlayWidget(this); super.dispose(); @@ -292,7 +292,7 @@ export class OpenWorkspaceButtonContribution extends Disposable implements IEdit this.openWorkspaceButton = undefined; } - dispose(): void { + override dispose(): void { this.disposeOpenWorkspaceWidgetRenderer(); super.dispose(); diff --git a/src/vs/workbench/browser/composite.ts b/src/vs/workbench/browser/composite.ts index a6c58ee4afe8cb..f8c500dd2f846a 100644 --- a/src/vs/workbench/browser/composite.ts +++ b/src/vs/workbench/browser/composite.ts @@ -118,7 +118,7 @@ export abstract class Composite extends Component implements IComposite { this.parent = parent; } - updateStyles(): void { + override updateStyles(): void { super.updateStyles(); } diff --git a/src/vs/workbench/browser/labels.ts b/src/vs/workbench/browser/labels.ts index 5bafb730a978de..a578568782bef3 100644 --- a/src/vs/workbench/browser/labels.ts +++ b/src/vs/workbench/browser/labels.ts @@ -227,7 +227,7 @@ export class ResourceLabels extends Disposable { this.labels = []; } - dispose(): void { + override dispose(): void { super.dispose(); this.clear(); @@ -580,7 +580,7 @@ class ResourceLabelWidget extends IconLabel { return true; } - dispose(): void { + override dispose(): void { super.dispose(); this.label = undefined; diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index 99bdc1713de9b0..6a9d936ec5e916 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -1770,7 +1770,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi return result; } - dispose(): void { + override dispose(): void { super.dispose(); this.disposed = true; diff --git a/src/vs/workbench/browser/panecomposite.ts b/src/vs/workbench/browser/panecomposite.ts index 38e33e2bee8e0e..861f46ddd05338 100644 --- a/src/vs/workbench/browser/panecomposite.ts +++ b/src/vs/workbench/browser/panecomposite.ts @@ -36,13 +36,13 @@ export abstract class PaneComposite extends Composite implements IPaneComposite super(id, telemetryService, themeService, storageService); } - create(parent: HTMLElement): void { + override create(parent: HTMLElement): void { this.viewPaneContainer = this._register(this.createViewPaneContainer(parent)); this._register(this.viewPaneContainer.onTitleAreaUpdate(() => this.updateTitleArea())); this.viewPaneContainer.create(parent); } - setVisible(visible: boolean): void { + override setVisible(visible: boolean): void { super.setVisible(visible); this.viewPaneContainer?.setVisible(visible); } @@ -63,15 +63,15 @@ export abstract class PaneComposite extends Composite implements IPaneComposite return this.viewPaneContainer; } - getActionsContext(): unknown { + override getActionsContext(): unknown { return this.getViewPaneContainer()?.getActionsContext(); } - getContextMenuActions(): ReadonlyArray { + override getContextMenuActions(): ReadonlyArray { return this.viewPaneContainer?.menuActions?.getContextMenuActions() ?? []; } - getActions(): ReadonlyArray { + override getActions(): ReadonlyArray { const result = []; if (this.viewPaneContainer?.menuActions) { result.push(...this.viewPaneContainer.menuActions.getPrimaryActions()); @@ -82,7 +82,7 @@ export abstract class PaneComposite extends Composite implements IPaneComposite return result; } - getSecondaryActions(): ReadonlyArray { + override getSecondaryActions(): ReadonlyArray { if (!this.viewPaneContainer?.menuActions) { return []; } @@ -116,19 +116,19 @@ export abstract class PaneComposite extends Composite implements IPaneComposite return menuActions.length ? menuActions : viewPaneActions; } - getActionViewItem(action: IAction): IActionViewItem | undefined { + override getActionViewItem(action: IAction): IActionViewItem | undefined { return this.viewPaneContainer?.getActionViewItem(action); } - getTitle(): string { + override getTitle(): string { return this.viewPaneContainer?.getTitle() ?? ''; } - saveState(): void { + override saveState(): void { super.saveState(); } - focus(): void { + override focus(): void { this.viewPaneContainer?.focus(); } diff --git a/src/vs/workbench/browser/panel.ts b/src/vs/workbench/browser/panel.ts index ab678781a3c5fc..06e4a72f5e3c40 100644 --- a/src/vs/workbench/browser/panel.ts +++ b/src/vs/workbench/browser/panel.ts @@ -37,15 +37,15 @@ export abstract class Panel extends PaneComposite implements IPanel { this._register(this.panelActions.onDidChange(() => this.updateTitleArea())); } - getActions(): ReadonlyArray { + override getActions(): ReadonlyArray { return [...super.getActions(), ...this.panelActions.getPrimaryActions()]; } - getSecondaryActions(): ReadonlyArray { + override getSecondaryActions(): ReadonlyArray { return this.mergeSecondaryActions(super.getSecondaryActions(), this.panelActions.getSecondaryActions()); } - getContextMenuActions(): ReadonlyArray { + override getContextMenuActions(): ReadonlyArray { return this.mergeSecondaryActions(super.getContextMenuActions(), this.panelActions.getContextMenuActions()); } diff --git a/src/vs/workbench/browser/part.ts b/src/vs/workbench/browser/part.ts index 79e163565df876..fd89c569033ff4 100644 --- a/src/vs/workbench/browser/part.ts +++ b/src/vs/workbench/browser/part.ts @@ -52,7 +52,7 @@ export abstract class Part extends Component implements ISerializableView { layoutService.registerPart(this); } - protected onThemeChange(theme: IColorTheme): void { + protected override onThemeChange(theme: IColorTheme): void { // only call if our create() method has been called if (this.parent) { @@ -60,7 +60,7 @@ export abstract class Part extends Component implements ISerializableView { } } - updateStyles(): void { + override updateStyles(): void { super.updateStyles(); } diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts index ceaf21509231fb..2100c07702bd77 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts @@ -56,7 +56,7 @@ export class ViewContainerActivityAction extends ActivityAction { this.activity = activity; } - async run(event: unknown): Promise { + async override run(event: unknown): Promise { if (event instanceof MouseEvent && event.button === 2) { return; // do not run on right click } @@ -121,7 +121,7 @@ class MenuActivityActionViewItem extends ActivityActionViewItem { super(action, { draggable: false, colors, icon: true, hasPopup: true }, themeService); } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { super.render(container); // Context menus are triggered on mouse down so that an item can be picked @@ -203,7 +203,7 @@ export class AccountsActivityActionViewItem extends MenuActivityActionViewItem { super(MenuId.AccountsContext, action, contextMenuActionsProvider, colors, themeService, menuService, contextMenuService, contextKeyService, configurationService, environmentService); } - protected async resolveMainMenuActions(accountsMenu: IMenu, disposables: DisposableStore): Promise { + protected async override resolveMainMenuActions(accountsMenu: IMenu, disposables: DisposableStore): Promise { await super.resolveMainMenuActions(accountsMenu, disposables); const otherCommands = accountsMenu.getActions(); @@ -279,7 +279,7 @@ export class AccountsActivityActionViewItem extends MenuActivityActionViewItem { return menus; } - protected async resolveContextMenuActions(disposables: DisposableStore): Promise { + protected async override resolveContextMenuActions(disposables: DisposableStore): Promise { const actions = await super.resolveContextMenuActions(disposables); actions.unshift(...[ diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index f9ee130df8c161..911623ec1b07d7 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -447,7 +447,7 @@ export class ActivitybarPart extends Part implements IActivityBarService { this.registerKeyboardNavigationListeners(); } - createContentArea(parent: HTMLElement): HTMLElement { + override createContentArea(parent: HTMLElement): HTMLElement { this.element = parent; this.content = document.createElement('div'); @@ -765,7 +765,7 @@ export class ActivitybarPart extends Part implements IActivityBarService { this.compositeBar.focus(); } - updateStyles(): void { + override updateStyles(): void { super.updateStyles(); const container = assertIsDefined(this.getContainer()); @@ -790,7 +790,7 @@ export class ActivitybarPart extends Part implements IActivityBarService { }; } - layout(width: number, height: number): void { + override layout(width: number, height: number): void { if (!this.layoutService.isVisible(Parts.ACTIVITYBAR_PART)) { return; } diff --git a/src/vs/workbench/browser/parts/compositeBarActions.ts b/src/vs/workbench/browser/parts/compositeBarActions.ts index 9920e31749a79c..44c66a7bf78ac7 100644 --- a/src/vs/workbench/browser/parts/compositeBarActions.ts +++ b/src/vs/workbench/browser/parts/compositeBarActions.ts @@ -101,7 +101,7 @@ export class ActivityAction extends Action { this._onDidChangeBadge.fire(this); } - dispose(): void { + override dispose(): void { this._onDidChangeActivity.dispose(); this._onDidChangeBadge.dispose(); @@ -195,7 +195,7 @@ export class ActivityActionViewItem extends BaseActionViewItem { } } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { super.render(container); this.container = container; @@ -326,7 +326,7 @@ export class ActivityActionViewItem extends BaseActionViewItem { this.updateTitle(title); } - protected updateLabel(): void { + protected override updateLabel(): void { this.label.className = 'action-label'; if (this.activity.cssClass) { @@ -352,7 +352,7 @@ export class ActivityActionViewItem extends BaseActionViewItem { }); } - dispose(): void { + override dispose(): void { super.dispose(); if (this.mouseUpTimeout) { @@ -375,7 +375,7 @@ export class CompositeOverflowActivityAction extends ActivityAction { }); } - async run(): Promise { + async override run(): Promise { this.showMenu(); } } @@ -434,7 +434,7 @@ export class CompositeOverflowActivityActionViewItem extends ActivityActionViewI }); } - dispose(): void { + override dispose(): void { super.dispose(); if (this.actions) { @@ -451,7 +451,7 @@ class ManageExtensionAction extends Action { super('activitybar.manage.extension', localize('manageExtension', "Manage Extension")); } - run(id: string): Promise { + override run(id: string): Promise { return this.commandService.executeCommand('_extensions.manage', id); } } @@ -497,7 +497,7 @@ export class CompositeActionViewItem extends ActivityActionViewItem { })); } - protected get activity(): IActivity { + protected override get activity(): IActivity { if (!this.compositeActivity) { this.compositeActivity = { ...this.compositeActivityAction.activity, @@ -517,7 +517,7 @@ export class CompositeActionViewItem extends ActivityActionViewItem { return keybinding ? localize('titleKeybinding', "{0} ({1})", name, keybinding.getLabel()) : name; } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { super.render(container); this.updateChecked(); @@ -652,7 +652,7 @@ export class CompositeActionViewItem extends ActivityActionViewItem { }); } - protected updateChecked(): void { + protected override updateChecked(): void { if (this.getAction().checked) { this.container.classList.add('checked'); this.container.setAttribute('aria-label', this.container.title); @@ -667,7 +667,7 @@ export class CompositeActionViewItem extends ActivityActionViewItem { this.updateStyles(); } - protected updateEnabled(): void { + protected override updateEnabled(): void { if (!this.element) { return; } @@ -679,7 +679,7 @@ export class CompositeActionViewItem extends ActivityActionViewItem { } } - dispose(): void { + override dispose(): void { super.dispose(); this.label.remove(); } @@ -696,7 +696,7 @@ export class ToggleCompositePinnedAction extends Action { this.checked = !!this.activity && this.compositeBar.isPinned(this.activity.id); } - async run(context: string): Promise { + async override run(context: string): Promise { const id = this.activity ? this.activity.id : context; if (this.compositeBar.isPinned(id)) { diff --git a/src/vs/workbench/browser/parts/compositePart.ts b/src/vs/workbench/browser/parts/compositePart.ts index f735e427e6c292..9e27444ba5fcc0 100644 --- a/src/vs/workbench/browser/parts/compositePart.ts +++ b/src/vs/workbench/browser/parts/compositePart.ts @@ -374,7 +374,7 @@ export abstract class CompositePart extends Part { return composite; } - createTitleArea(parent: HTMLElement): HTMLElement { + override createTitleArea(parent: HTMLElement): HTMLElement { // Title Area Container const titleArea = append(parent, $('.composite')); @@ -421,7 +421,7 @@ export abstract class CompositePart extends Part { }; } - updateStyles(): void { + override updateStyles(): void { super.updateStyles(); // Forward to title label @@ -449,7 +449,7 @@ export abstract class CompositePart extends Part { return null; } - createContentArea(parent: HTMLElement): HTMLElement { + override createContentArea(parent: HTMLElement): HTMLElement { const contentContainer = append(parent, $('.content')); this.progressBar = this._register(new ProgressBar(contentContainer)); @@ -469,7 +469,7 @@ export abstract class CompositePart extends Part { return AnchorAlignment.RIGHT; } - layout(width: number, height: number): void { + override layout(width: number, height: number): void { super.layout(width, height); // Layout contents @@ -498,7 +498,7 @@ export abstract class CompositePart extends Part { return true; } - dispose(): void { + override dispose(): void { this.mapCompositeToCompositeContainer.clear(); this.mapActionsBindingToComposite.clear(); diff --git a/src/vs/workbench/browser/parts/editor/binaryEditor.ts b/src/vs/workbench/browser/parts/editor/binaryEditor.ts index 53a93906739ca0..8bc795a28a12cd 100644 --- a/src/vs/workbench/browser/parts/editor/binaryEditor.ts +++ b/src/vs/workbench/browser/parts/editor/binaryEditor.ts @@ -57,7 +57,7 @@ export abstract class BaseBinaryResourceEditor extends EditorPane { this.callbacks = callbacks; } - getTitle(): string { + override getTitle(): string { return this.input ? this.input.getName() : localize('binaryEditor', "Binary Viewer"); } @@ -74,7 +74,7 @@ export abstract class BaseBinaryResourceEditor extends EditorPane { parent.appendChild(this.scrollbar.getDomNode()); } - async setInput(input: EditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { + async override setInput(input: EditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { await super.setInput(input, options, context, token); const model = await input.resolve(); @@ -118,7 +118,7 @@ export abstract class BaseBinaryResourceEditor extends EditorPane { return this.metadata; } - clearInput(): void { + override clearInput(): void { // Clear Meta this.handleMetadataChanged(undefined); @@ -144,13 +144,13 @@ export abstract class BaseBinaryResourceEditor extends EditorPane { } } - focus(): void { + override focus(): void { const binaryContainer = assertIsDefined(this.binaryContainer); binaryContainer.focus(); } - dispose(): void { + override dispose(): void { if (this.binaryContainer) { this.binaryContainer.remove(); } diff --git a/src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts b/src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts index 507251c3fe8678..f0957c16ec5b18 100644 --- a/src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts +++ b/src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts @@ -54,7 +54,7 @@ class OutlineItem extends BreadcrumbsItem { super(); } - dispose(): void { + override dispose(): void { this._disposables.dispose(); } @@ -114,7 +114,7 @@ class FileItem extends BreadcrumbsItem { super(); } - dispose(): void { + override dispose(): void { this._disposables.dispose(); } diff --git a/src/vs/workbench/browser/parts/editor/editorActions.ts b/src/vs/workbench/browser/parts/editor/editorActions.ts index 44cc84d8fa0ccb..3e6ee6df94893f 100644 --- a/src/vs/workbench/browser/parts/editor/editorActions.ts +++ b/src/vs/workbench/browser/parts/editor/editorActions.ts @@ -36,7 +36,7 @@ export class ExecuteCommandAction extends Action { super(id, label); } - run(): Promise { + override run(): Promise { return this.commandService.executeCommand(this.commandId, this.commandArgs); } } @@ -70,7 +70,7 @@ export class BaseSplitEditorAction extends Action { })); } - async run(context?: IEditorIdentifier): Promise { + async override run(context?: IEditorIdentifier): Promise { splitEditor(this.editorGroupService, this.direction, context); } } @@ -104,7 +104,7 @@ export class SplitEditorOrthogonalAction extends BaseSplitEditorAction { super(id, label, editorGroupService, configurationService); } - protected getDirection(): GroupDirection { + protected override getDirection(): GroupDirection { const direction = preferredSideBySideGroupDirection(this.configurationService); return direction === GroupDirection.RIGHT ? GroupDirection.DOWN : GroupDirection.RIGHT; @@ -180,7 +180,7 @@ export class JoinTwoGroupsAction extends Action { super(id, label); } - async run(context?: IEditorIdentifier): Promise { + async override run(context?: IEditorIdentifier): Promise { let sourceGroup: IEditorGroup | undefined; if (context && typeof context.groupId === 'number') { sourceGroup = this.editorGroupService.getGroup(context.groupId); @@ -215,7 +215,7 @@ export class JoinAllGroupsAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.editorGroupService.mergeAllGroups(); } } @@ -233,7 +233,7 @@ export class NavigateBetweenGroupsAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const nextGroup = this.editorGroupService.findGroup({ location: GroupLocation.NEXT }, this.editorGroupService.activeGroup, true); nextGroup.focus(); } @@ -252,7 +252,7 @@ export class FocusActiveGroupAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.editorGroupService.activeGroup.focus(); } } @@ -268,7 +268,7 @@ export abstract class BaseFocusGroupAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const group = this.editorGroupService.findGroup(this.scope, this.editorGroupService.activeGroup, true); if (group) { group.focus(); @@ -401,7 +401,7 @@ export class CloseEditorAction extends Action { super(id, label, Codicon.close.classNames); } - run(context?: IEditorCommandsContext): Promise { + override run(context?: IEditorCommandsContext): Promise { return this.commandService.executeCommand(CLOSE_EDITOR_COMMAND_ID, undefined, context); } } @@ -419,7 +419,7 @@ export class UnpinEditorAction extends Action { super(id, label, Codicon.pinned.classNames); } - run(context?: IEditorCommandsContext): Promise { + override run(context?: IEditorCommandsContext): Promise { return this.commandService.executeCommand(UNPIN_EDITOR_COMMAND_ID, undefined, context); } } @@ -437,7 +437,7 @@ export class CloseOneEditorAction extends Action { super(id, label, Codicon.close.classNames); } - async run(context?: IEditorCommandsContext): Promise { + async override run(context?: IEditorCommandsContext): Promise { let group: IEditorGroup | undefined; let editorIndex: number | undefined; if (context) { @@ -480,7 +480,7 @@ export class RevertAndCloseEditorAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const activeEditorPane = this.editorService.activeEditorPane; if (activeEditorPane) { const editor = activeEditorPane.input; @@ -515,7 +515,7 @@ export class CloseLeftEditorsInGroupAction extends Action { super(id, label); } - async run(context?: IEditorIdentifier): Promise { + async override run(context?: IEditorIdentifier): Promise { const { group, editor } = this.getTarget(context); if (group && editor) { return group.closeEditors({ direction: CloseDirection.LEFT, except: editor, excludeSticky: true }); @@ -561,7 +561,7 @@ abstract class BaseCloseAllAction extends Action { return groupsToClose; } - async run(): Promise { + async override run(): Promise { // Just close all if there are no dirty editors if (!this.workingCopyService.hasDirty) { @@ -714,7 +714,7 @@ export class CloseEditorsInOtherGroupsAction extends Action { super(id, label); } - async run(context?: IEditorIdentifier): Promise { + async override run(context?: IEditorIdentifier): Promise { const groupToSkip = context ? this.editorGroupService.getGroup(context.groupId) : this.editorGroupService.activeGroup; await Promise.all(this.editorGroupService.getGroups(GroupsOrder.MOST_RECENTLY_ACTIVE).map(async group => { if (groupToSkip && group.id === groupToSkip.id) { @@ -740,7 +740,7 @@ export class CloseEditorInAllGroupsAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const activeEditor = this.editorService.activeEditor; if (activeEditor) { await Promise.all(this.editorGroupService.getGroups(GroupsOrder.MOST_RECENTLY_ACTIVE).map(group => group.closeEditor(activeEditor))); @@ -760,7 +760,7 @@ class BaseMoveCopyGroupAction extends Action { super(id, label); } - async run(context?: IEditorIdentifier): Promise { + async override run(context?: IEditorIdentifier): Promise { let sourceGroup: IEditorGroup | undefined; if (context && typeof context.groupId === 'number') { sourceGroup = this.editorGroupService.getGroup(context.groupId); @@ -958,7 +958,7 @@ export class MinimizeOtherGroupsAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.editorGroupService.arrangeGroups(GroupsArrangement.MINIMIZE_OTHERS); } } @@ -972,7 +972,7 @@ export class ResetGroupSizesAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.editorGroupService.arrangeGroups(GroupsArrangement.EVEN); } } @@ -986,7 +986,7 @@ export class ToggleGroupSizesAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.editorGroupService.arrangeGroups(GroupsArrangement.TOGGLE); } } @@ -1006,7 +1006,7 @@ export class MaximizeGroupAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { if (this.editorService.activeEditor) { this.editorGroupService.arrangeGroups(GroupsArrangement.MINIMIZE_OTHERS); this.layoutService.setSideBarHidden(true); @@ -1025,7 +1025,7 @@ export abstract class BaseNavigateEditorAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const result = this.navigate(); if (!result) { return; @@ -1214,7 +1214,7 @@ export class NavigateForwardAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.historyService.forward(); } } @@ -1228,7 +1228,7 @@ export class NavigateBackwardsAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.historyService.back(); } } @@ -1242,7 +1242,7 @@ export class NavigateToLastEditLocationAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.historyService.openLastEditLocation(); } } @@ -1256,7 +1256,7 @@ export class NavigateLastAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.historyService.last(); } } @@ -1274,7 +1274,7 @@ export class ReopenClosedEditorAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.historyService.reopenLastClosedEditor(); } } @@ -1293,7 +1293,7 @@ export class ClearRecentFilesAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { // Clear global recently opened this.workspacesService.clearRecentlyOpened(); @@ -1316,7 +1316,7 @@ export class ShowEditorsInActiveGroupByMostRecentlyUsedAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.quickInputService.quickAccess.show(ActiveGroupEditorsByMostRecentlyUsedQuickAccess.PREFIX); } } @@ -1334,7 +1334,7 @@ export class ShowAllEditorsByAppearanceAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.quickInputService.quickAccess.show(AllEditorsByAppearanceQuickAccess.PREFIX); } } @@ -1352,7 +1352,7 @@ export class ShowAllEditorsByMostRecentlyUsedAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.quickInputService.quickAccess.show(AllEditorsByMostRecentlyUsedQuickAccess.PREFIX); } } @@ -1370,7 +1370,7 @@ export class BaseQuickAccessEditorAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const keybindings = this.keybindingService.lookupKeybindings(this.id); this.quickInputService.quickAccess.show(this.prefix, { @@ -1455,7 +1455,7 @@ export class QuickAccessPreviousEditorFromHistoryAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const keybindings = this.keybindingService.lookupKeybindings(this.id); // Enforce to activate the first item in quick access if @@ -1482,7 +1482,7 @@ export class OpenNextRecentlyUsedEditorAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.historyService.openNextRecentlyUsedEditor(); } } @@ -1500,7 +1500,7 @@ export class OpenPreviousRecentlyUsedEditorAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.historyService.openPreviouslyUsedEditor(); } } @@ -1519,7 +1519,7 @@ export class OpenNextRecentlyUsedEditorInGroupAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.historyService.openNextRecentlyUsedEditor(this.editorGroupsService.activeGroup.id); } } @@ -1538,7 +1538,7 @@ export class OpenPreviousRecentlyUsedEditorInGroupAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.historyService.openPreviouslyUsedEditor(this.editorGroupsService.activeGroup.id); } } @@ -1556,7 +1556,7 @@ export class ClearEditorHistoryAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { // Editor history this.historyService.clear(); @@ -1826,7 +1826,7 @@ export class BaseCreateEditorGroupAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.editorGroupService.addGroup(this.editorGroupService.activeGroup, this.direction, { activate: true }); } } @@ -1900,7 +1900,7 @@ export class ReopenResourcesAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const activeInput = this.editorService.activeEditor; if (!activeInput) { return; @@ -1930,7 +1930,7 @@ export class ToggleEditorTypeAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const activeEditorPane = this.editorService.activeEditorPane; if (!activeEditorPane) { return; diff --git a/src/vs/workbench/browser/parts/editor/editorDropTarget.ts b/src/vs/workbench/browser/parts/editor/editorDropTarget.ts index 9023c27d152add..11a5df1b69c50a 100644 --- a/src/vs/workbench/browser/parts/editor/editorDropTarget.ts +++ b/src/vs/workbench/browser/parts/editor/editorDropTarget.ts @@ -97,7 +97,7 @@ class DropOverlay extends Themable { this.updateStyles(); } - protected updateStyles(): void { + protected override updateStyles(): void { const overlay = assertIsDefined(this.overlay); // Overlay drop background @@ -543,7 +543,7 @@ class DropOverlay extends Themable { return element === this.container || element === this.overlay; } - dispose(): void { + override dispose(): void { super.dispose(); this._disposed = true; @@ -652,7 +652,7 @@ export class EditorDropTarget extends Themable { this.container.classList.toggle('dragged-over', isDraggedOver); } - dispose(): void { + override dispose(): void { super.dispose(); this.disposeOverlay(); diff --git a/src/vs/workbench/browser/parts/editor/editorGroupView.ts b/src/vs/workbench/browser/parts/editor/editorGroupView.ts index 542896a70ba399..14efe3da40b61b 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupView.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupView.ts @@ -298,7 +298,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView { const groupId = this._group.id; const containerToolbar = this._register(new ActionBar(toolbarContainer, { ariaLabel: localize('ariaLabelGroupActions', "Editor group actions"), actionRunner: this._register(new class extends ActionRunner { - async run(action: IAction) { + async override run(action: IAction) { await action.run(groupId); } }) @@ -1690,7 +1690,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView { //#region Themable - protected updateStyles(): void { + protected override updateStyles(): void { const isEmpty = this.isEmpty; // Container @@ -1759,7 +1759,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView { //#endregion - dispose(): void { + override dispose(): void { this._disposed = true; this._onWillDispose.fire(); diff --git a/src/vs/workbench/browser/parts/editor/editorPane.ts b/src/vs/workbench/browser/parts/editor/editorPane.ts index a9ae87d96bae2d..081a0a8ae31d12 100644 --- a/src/vs/workbench/browser/parts/editor/editorPane.ts +++ b/src/vs/workbench/browser/parts/editor/editorPane.ts @@ -76,7 +76,7 @@ export abstract class EditorPane extends Composite implements IEditorPane { super(id, telemetryService, themeService, storageService); } - create(parent: HTMLElement): void { + override create(parent: HTMLElement): void { super.create(parent); // Create Editor @@ -133,7 +133,7 @@ export abstract class EditorPane extends Composite implements IEditorPane { this._options = options; } - setVisible(visible: boolean, group?: IEditorGroup): void { + override setVisible(visible: boolean, group?: IEditorGroup): void { super.setVisible(visible); // Propagate to Editor @@ -163,7 +163,7 @@ export abstract class EditorPane extends Composite implements IEditorPane { return editorMemento; } - protected saveState(): void { + protected override saveState(): void { // Save all editor memento for this editor type for (const [, editorMemento] of EditorPane.EDITOR_MEMENTOS) { @@ -175,7 +175,7 @@ export abstract class EditorPane extends Composite implements IEditorPane { super.saveState(); } - dispose(): void { + override dispose(): void { this._input = undefined; this._options = undefined; diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index 398f9a19213149..e174d6f84209b8 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -801,14 +801,14 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro readonly snap = true; - get onDidChange(): Event { return Event.any(this.centeredLayoutWidget.onDidChange, this.onDidSetGridWidget.event); } + override get onDidChange(): Event { return Event.any(this.centeredLayoutWidget.onDidChange, this.onDidSetGridWidget.event); } readonly priority: LayoutPriority = LayoutPriority.High; private get gridSeparatorBorder(): Color { return this.theme.getColor(EDITOR_GROUP_BORDER) || this.theme.getColor(contrastBorder) || Color.transparent; } - updateStyles(): void { + override updateStyles(): void { const container = assertIsDefined(this.container); container.style.backgroundColor = this.getColor(editorBackground) || ''; @@ -817,7 +817,7 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro this.centeredLayoutWidget.styles(separatorBorderStyle); } - createContentArea(parent: HTMLElement, options?: IEditorPartCreationOptions): HTMLElement { + override createContentArea(parent: HTMLElement, options?: IEditorPartCreationOptions): HTMLElement { // Container this.element = parent; @@ -1068,7 +1068,7 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro this.centeredLayoutWidget.boundarySashes = sashes; } - layout(width: number, height: number): void { + override layout(width: number, height: number): void { // Layout contents const contentAreaSize = super.layoutContents(width, height).contentSize; @@ -1087,7 +1087,7 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro this._onDidLayout.fire(dimension); } - protected saveState(): void { + protected override saveState(): void { // Persist grid UI state if (this.gridWidget) { @@ -1123,7 +1123,7 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro }; } - dispose(): void { + override dispose(): void { // Forward to all groups this.groupViews.forEach(group => group.dispose()); diff --git a/src/vs/workbench/browser/parts/editor/editorQuickAccess.ts b/src/vs/workbench/browser/parts/editor/editorQuickAccess.ts index ca4c7f6f0eec19..c2ffbde257e4b3 100644 --- a/src/vs/workbench/browser/parts/editor/editorQuickAccess.ts +++ b/src/vs/workbench/browser/parts/editor/editorQuickAccess.ts @@ -59,7 +59,7 @@ export abstract class BaseEditorQuickAccessProvider extends PickerQuickAccessPro ); } - provide(picker: IQuickPick, token: CancellationToken): IDisposable { + override provide(picker: IQuickPick, token: CancellationToken): IDisposable { // Reset the pick state for this run this.pickState.reset(!!picker.quickNavigate); diff --git a/src/vs/workbench/browser/parts/editor/editorStatus.ts b/src/vs/workbench/browser/parts/editor/editorStatus.ts index 18928433921848..29be8642716c4a 100644 --- a/src/vs/workbench/browser/parts/editor/editorStatus.ts +++ b/src/vs/workbench/browser/parts/editor/editorStatus.ts @@ -1044,7 +1044,7 @@ export class ShowLanguageExtensionsAction extends Action { this.enabled = galleryService.isEnabled(); } - async run(): Promise { + async override run(): Promise { await this.commandService.executeCommand('workbench.extensions.action.showExtensionsForLanguage', this.fileExtension); } } @@ -1069,7 +1069,7 @@ export class ChangeModeAction extends Action { super(actionId, actionLabel); } - async run(event: unknown, data?: ITelemetryData): Promise { + async override run(event: unknown, data?: ITelemetryData): Promise { const activeTextEditorControl = getCodeEditor(this.editorService.activeTextEditorControl); if (!activeTextEditorControl) { await this.quickInputService.pick([{ label: localize('noEditor', "No text editor active at this time") }]); @@ -1263,7 +1263,7 @@ export class ChangeEOLAction extends Action { super(actionId, actionLabel); } - async run(): Promise { + async override run(): Promise { const activeTextEditorControl = getCodeEditor(this.editorService.activeTextEditorControl); if (!activeTextEditorControl) { await this.quickInputService.pick([{ label: localize('noEditor', "No text editor active at this time") }]); @@ -1316,7 +1316,7 @@ export class ChangeEncodingAction extends Action { super(actionId, actionLabel); } - async run(): Promise { + async override run(): Promise { const activeTextEditorControl = getCodeEditor(this.editorService.activeTextEditorControl); if (!activeTextEditorControl) { await this.quickInputService.pick([{ label: localize('noEditor', "No text editor active at this time") }]); diff --git a/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts index 0a4b11ef706c7c..1ee028532b3cd1 100644 --- a/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts @@ -321,7 +321,7 @@ export class NoTabsTitleControl extends TitleControl { } } - protected prepareEditorActions(editorActions: IToolbarActions): { primaryEditorActions: IAction[], secondaryEditorActions: IAction[] } { + protected override prepareEditorActions(editorActions: IToolbarActions): { primaryEditorActions: IAction[], secondaryEditorActions: IAction[] } { const isGroupActive = this.accessor.activeGroup === this.group; // Group active: show all actions diff --git a/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts b/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts index dcfda946663541..b7225fae9f589f 100644 --- a/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts +++ b/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts @@ -34,15 +34,15 @@ export class SideBySideEditor extends EditorPane { private get maximumSecondaryHeight() { return this.secondaryEditorPane ? this.secondaryEditorPane.maximumHeight : Number.POSITIVE_INFINITY; } // these setters need to exist because this extends from EditorPane - set minimumWidth(value: number) { /* noop */ } - set maximumWidth(value: number) { /* noop */ } - set minimumHeight(value: number) { /* noop */ } - set maximumHeight(value: number) { /* noop */ } + override set minimumWidth(value: number) { /* noop */ } + override set maximumWidth(value: number) { /* noop */ } + override set minimumHeight(value: number) { /* noop */ } + override set maximumHeight(value: number) { /* noop */ } - get minimumWidth() { return this.minimumPrimaryWidth + this.minimumSecondaryWidth; } - get maximumWidth() { return this.maximumPrimaryWidth + this.maximumSecondaryWidth; } - get minimumHeight() { return this.minimumPrimaryHeight + this.minimumSecondaryHeight; } - get maximumHeight() { return this.maximumPrimaryHeight + this.maximumSecondaryHeight; } + override get minimumWidth() { return this.minimumPrimaryWidth + this.minimumSecondaryWidth; } + override get maximumWidth() { return this.maximumPrimaryWidth + this.maximumSecondaryWidth; } + override get minimumHeight() { return this.minimumPrimaryHeight + this.minimumSecondaryHeight; } + override get maximumHeight() { return this.maximumPrimaryHeight + this.maximumSecondaryHeight; } protected primaryEditorPane?: EditorPane; protected secondaryEditorPane?: EditorPane; @@ -56,7 +56,7 @@ export class SideBySideEditor extends EditorPane { private onDidCreateEditors = this._register(new Emitter<{ width: number; height: number; } | undefined>()); private _onDidChangeSizeConstraints = this._register(new Relay<{ width: number; height: number; } | undefined>()); - readonly onDidChangeSizeConstraints = Event.any(this.onDidCreateEditors.event, this._onDidChangeSizeConstraints.event); + override readonly onDidChangeSizeConstraints = Event.any(this.onDidCreateEditors.event, this._onDidChangeSizeConstraints.event); constructor( @ITelemetryService telemetryService: ITelemetryService, @@ -94,20 +94,20 @@ export class SideBySideEditor extends EditorPane { this.updateStyles(); } - async setInput(newInput: EditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { + async override setInput(newInput: EditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { const oldInput = this.input as SideBySideEditorInput; await super.setInput(newInput, options, context, token); return this.updateInput(oldInput, (newInput as SideBySideEditorInput), options, context, token); } - setOptions(options: EditorOptions | undefined): void { + override setOptions(options: EditorOptions | undefined): void { if (this.primaryEditorPane) { this.primaryEditorPane.setOptions(options); } } - protected setEditorVisible(visible: boolean, group: IEditorGroup | undefined): void { + protected override setEditorVisible(visible: boolean, group: IEditorGroup | undefined): void { if (this.primaryEditorPane) { this.primaryEditorPane.setVisible(visible, group); } @@ -119,7 +119,7 @@ export class SideBySideEditor extends EditorPane { super.setEditorVisible(visible, group); } - clearInput(): void { + override clearInput(): void { if (this.primaryEditorPane) { this.primaryEditorPane.clearInput(); } @@ -133,7 +133,7 @@ export class SideBySideEditor extends EditorPane { super.clearInput(); } - focus(): void { + override focus(): void { if (this.primaryEditorPane) { this.primaryEditorPane.focus(); } @@ -146,7 +146,7 @@ export class SideBySideEditor extends EditorPane { splitview.layout(dimension.width); } - getControl(): IEditorControl | undefined { + override getControl(): IEditorControl | undefined { if (this.primaryEditorPane) { return this.primaryEditorPane.getControl(); } @@ -218,7 +218,7 @@ export class SideBySideEditor extends EditorPane { ); } - updateStyles(): void { + override updateStyles(): void { super.updateStyles(); if (this.primaryEditorContainer) { @@ -246,7 +246,7 @@ export class SideBySideEditor extends EditorPane { } } - dispose(): void { + override dispose(): void { this.disposeEditors(); super.dispose(); diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index cafe5117d3abb1..72cc9654835566 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -378,7 +378,7 @@ export class TabsTitleControl extends TitleControl { this.layout(this.dimensions); } - protected updateEditorActionsToolbar(): void { + protected override updateEditorActionsToolbar(): void { super.updateEditorActionsToolbar(); // Changing the actions in the toolbar can have an impact on the size of the @@ -1771,7 +1771,7 @@ export class TabsTitleControl extends TitleControl { return !isCopy || source === this.group.id; } - dispose(): void { + override dispose(): void { super.dispose(); this.tabDisposables = dispose(this.tabDisposables); diff --git a/src/vs/workbench/browser/parts/editor/textDiffEditor.ts b/src/vs/workbench/browser/parts/editor/textDiffEditor.ts index 54eca9b3349343..bcff2181c38ac6 100644 --- a/src/vs/workbench/browser/parts/editor/textDiffEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textDiffEditor.ts @@ -43,7 +43,7 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditorPan private diffNavigator: DiffNavigator | undefined; private readonly diffNavigatorDisposables = this._register(new DisposableStore()); - get scopedContextKeyService(): IContextKeyService | undefined { + override get scopedContextKeyService(): IContextKeyService | undefined { const control = this.getControl(); if (!control) { return undefined; @@ -86,7 +86,7 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditorPan } } - protected onWillCloseEditorInGroup(editor: IEditorInput): void { + protected override onWillCloseEditorInGroup(editor: IEditorInput): void { // React to editors closing to preserve or clear view state. This needs to happen // in the onWillCloseEditor because at that time the editor has not yet @@ -94,7 +94,7 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditorPan this.doSaveOrClearTextDiffEditorViewState(editor); } - getTitle(): string { + override getTitle(): string { if (this.input) { return this.input.getName(); } @@ -102,11 +102,11 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditorPan return localize('textDiffEditor', "Text Diff Editor"); } - createEditorControl(parent: HTMLElement, configuration: ICodeEditorOptions): IDiffEditor { + override createEditorControl(parent: HTMLElement, configuration: ICodeEditorOptions): IDiffEditor { return this.instantiationService.createInstance(DiffEditorWidget, parent, configuration, {}); } - async setInput(input: EditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { + async override setInput(input: EditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { // Dispose previous diff navigator this.diffNavigatorDisposables.clear(); @@ -231,7 +231,7 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditorPan return false; } - protected computeConfiguration(configuration: IEditorConfiguration): ICodeEditorOptions { + protected override computeConfiguration(configuration: IEditorConfiguration): ICodeEditorOptions { const editorConfiguration = super.computeConfiguration(configuration); // Handle diff editor specially by merging in diffEditor configuration @@ -252,7 +252,7 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditorPan return editorConfiguration; } - protected getConfigurationOverrides(): ICodeEditorOptions { + protected override getConfigurationOverrides(): ICodeEditorOptions { const options: IDiffEditorOptions = super.getConfigurationOverrides(); options.readOnly = this.input instanceof DiffEditorInput && this.input.modifiedInput.isReadonly(); @@ -274,7 +274,7 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditorPan return (error).textFileOperationResult === TextFileOperationResult.FILE_IS_BINARY; } - clearInput(): void { + override clearInput(): void { // Dispose previous diff navigator this.diffNavigatorDisposables.clear(); @@ -296,15 +296,15 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditorPan return this.diffNavigator; } - getControl(): IDiffEditor | undefined { + override getControl(): IDiffEditor | undefined { return super.getControl() as IDiffEditor | undefined; } - protected loadTextEditorViewState(resource: URI): IDiffEditorViewState { + protected override loadTextEditorViewState(resource: URI): IDiffEditorViewState { return super.loadTextEditorViewState(resource) as IDiffEditorViewState; // overridden for text diff editor support } - protected saveState(): void { + protected override saveState(): void { // Update/clear editor view State this.doSaveOrClearTextDiffEditorViewState(this.input); @@ -333,7 +333,7 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditorPan } } - protected retrieveTextEditorViewState(resource: URI): IDiffEditorViewState | null { + protected override retrieveTextEditorViewState(resource: URI): IDiffEditorViewState | null { return this.retrieveTextDiffEditorViewState(resource); // overridden for text diff editor support } diff --git a/src/vs/workbench/browser/parts/editor/textEditor.ts b/src/vs/workbench/browser/parts/editor/textEditor.ts index 7ec16141d6807d..44553e4cde9bec 100644 --- a/src/vs/workbench/browser/parts/editor/textEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textEditor.ts @@ -52,7 +52,7 @@ export abstract class BaseTextEditor extends EditorPane implements ITextEditorPa protected get instantiationService(): IInstantiationService { return this._instantiationService; } protected set instantiationService(value: IInstantiationService) { this._instantiationService = value; } - get scopedContextKeyService(): IContextKeyService | undefined { + override get scopedContextKeyService(): IContextKeyService | undefined { return isCodeEditor(this.editorControl) ? this.editorControl.invokeWithinContext(accessor => accessor.get(IContextKeyService)) : undefined; } @@ -158,7 +158,7 @@ export abstract class BaseTextEditor extends EditorPane implements ITextEditorPa return this.instantiationService.createInstance(CodeEditorWidget, parent, configuration, {}); } - async setInput(input: EditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { + async override setInput(input: EditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { await super.setInput(input, options, context, token); // Update editor options after having set the input. We do this because there can be @@ -170,7 +170,7 @@ export abstract class BaseTextEditor extends EditorPane implements ITextEditorPa editorContainer.setAttribute('aria-label', this.computeAriaLabel()); } - setOptions(options: EditorOptions | undefined): void { + override setOptions(options: EditorOptions | undefined): void { const textOptions = options as TextEditorOptions; if (textOptions && isFunction(textOptions.apply)) { const textEditor = assertIsDefined(this.getControl()); @@ -178,7 +178,7 @@ export abstract class BaseTextEditor extends EditorPane implements ITextEditorPa } } - protected setEditorVisible(visible: boolean, group: IEditorGroup | undefined): void { + protected override setEditorVisible(visible: boolean, group: IEditorGroup | undefined): void { // Pass on to Editor const editorControl = assertIsDefined(this.editorControl); @@ -206,7 +206,7 @@ export abstract class BaseTextEditor extends EditorPane implements ITextEditorPa // Subclasses can override } - focus(): void { + override focus(): void { // Pass on to Editor const editorControl = assertIsDefined(this.editorControl); @@ -220,7 +220,7 @@ export abstract class BaseTextEditor extends EditorPane implements ITextEditorPa editorControl.layout(dimension); } - getControl(): IEditor | undefined { + override getControl(): IEditor | undefined { return this.editorControl; } @@ -338,7 +338,7 @@ export abstract class BaseTextEditor extends EditorPane implements ITextEditorPa return undefined; } - dispose(): void { + override dispose(): void { this.lastAppliedEditorOptions = undefined; super.dispose(); diff --git a/src/vs/workbench/browser/parts/editor/textResourceEditor.ts b/src/vs/workbench/browser/parts/editor/textResourceEditor.ts index 63135239171d67..f5663239d8aaaf 100644 --- a/src/vs/workbench/browser/parts/editor/textResourceEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textResourceEditor.ts @@ -45,7 +45,7 @@ export class AbstractTextResourceEditor extends BaseTextEditor { super(id, telemetryService, instantiationService, storageService, textResourceConfigurationService, themeService, editorService, editorGroupService); } - getTitle(): string | undefined { + override getTitle(): string | undefined { if (this.input) { return this.input.getName(); } @@ -53,7 +53,7 @@ export class AbstractTextResourceEditor extends BaseTextEditor { return localize('textEditor', "Text Editor"); } - async setInput(input: EditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { + async override setInput(input: EditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { // Remember view settings if input changes this.saveTextResourceEditorViewState(this.input); @@ -119,7 +119,7 @@ export class AbstractTextResourceEditor extends BaseTextEditor { } } - clearInput(): void { + override clearInput(): void { // Keep editor view state in settings to restore when coming back this.saveTextResourceEditorViewState(this.input); @@ -133,7 +133,7 @@ export class AbstractTextResourceEditor extends BaseTextEditor { super.clearInput(); } - protected saveState(): void { + protected override saveState(): void { // Save View State (only for untitled) if (this.input instanceof UntitledTextEditorInput) { @@ -180,7 +180,7 @@ export class TextResourceEditor extends AbstractTextResourceEditor { super(TextResourceEditor.ID, telemetryService, instantiationService, storageService, textResourceConfigurationService, themeService, editorGroupService, editorService); } - protected createEditorControl(parent: HTMLElement, configuration: IEditorOptions): IEditor { + protected override createEditorControl(parent: HTMLElement, configuration: IEditorOptions): IEditor { const control = super.createEditorControl(parent, configuration); // Install a listener for paste to update this editors diff --git a/src/vs/workbench/browser/parts/editor/titleControl.ts b/src/vs/workbench/browser/parts/editor/titleControl.ts index 45af0d3b87f6e7..ba961779f197e2 100644 --- a/src/vs/workbench/browser/parts/editor/titleControl.ts +++ b/src/vs/workbench/browser/parts/editor/titleControl.ts @@ -392,7 +392,7 @@ export abstract class TitleControl extends Themable { abstract getHeight(): IEditorGroupTitleHeight; - dispose(): void { + override dispose(): void { dispose(this.breadcrumbsControl); this.breadcrumbsControl = undefined; diff --git a/src/vs/workbench/browser/parts/notifications/notificationsActions.ts b/src/vs/workbench/browser/parts/notifications/notificationsActions.ts index 71c7ad75cd3b65..8079a5b819befd 100644 --- a/src/vs/workbench/browser/parts/notifications/notificationsActions.ts +++ b/src/vs/workbench/browser/parts/notifications/notificationsActions.ts @@ -37,7 +37,7 @@ export class ClearNotificationAction extends Action { super(id, label, ThemeIcon.asClassName(clearIcon)); } - async run(notification: INotificationViewItem): Promise { + async override run(notification: INotificationViewItem): Promise { this.commandService.executeCommand(CLEAR_NOTIFICATION, notification); } } @@ -55,7 +55,7 @@ export class ClearAllNotificationsAction extends Action { super(id, label, ThemeIcon.asClassName(clearAllIcon)); } - async run(): Promise { + async override run(): Promise { this.commandService.executeCommand(CLEAR_ALL_NOTIFICATIONS); } } @@ -73,7 +73,7 @@ export class HideNotificationsCenterAction extends Action { super(id, label, ThemeIcon.asClassName(hideIcon)); } - async run(): Promise { + async override run(): Promise { this.commandService.executeCommand(HIDE_NOTIFICATIONS_CENTER); } } @@ -91,7 +91,7 @@ export class ExpandNotificationAction extends Action { super(id, label, ThemeIcon.asClassName(expandIcon)); } - async run(notification: INotificationViewItem): Promise { + async override run(notification: INotificationViewItem): Promise { this.commandService.executeCommand(EXPAND_NOTIFICATION, notification); } } @@ -109,7 +109,7 @@ export class CollapseNotificationAction extends Action { super(id, label, ThemeIcon.asClassName(collapseIcon)); } - async run(notification: INotificationViewItem): Promise { + async override run(notification: INotificationViewItem): Promise { this.commandService.executeCommand(COLLAPSE_NOTIFICATION, notification); } } @@ -141,7 +141,7 @@ export class CopyNotificationMessageAction extends Action { super(id, label); } - run(notification: INotificationViewItem): Promise { + override run(notification: INotificationViewItem): Promise { return this.clipboardService.writeText(notification.message.raw); } } @@ -166,7 +166,7 @@ export class NotificationActionRunner extends ActionRunner { super(); } - protected async runAction(action: IAction, context: INotificationViewItem | undefined): Promise { + protected async override runAction(action: IAction, context: INotificationViewItem | undefined): Promise { this.telemetryService.publicLog2('workbenchActionExecuted', { id: action.id, from: 'message' }); if (context) { // If the context is not present it is a "global" notification action. Will be captured by other events diff --git a/src/vs/workbench/browser/parts/notifications/notificationsCenter.ts b/src/vs/workbench/browser/parts/notifications/notificationsCenter.ts index 199584343bcbbf..2c1d47f2a9360c 100644 --- a/src/vs/workbench/browser/parts/notifications/notificationsCenter.ts +++ b/src/vs/workbench/browser/parts/notifications/notificationsCenter.ts @@ -248,7 +248,7 @@ export class NotificationsCenter extends Themable implements INotificationsCente } } - protected updateStyles(): void { + protected override updateStyles(): void { if (this.notificationsCenterContainer && this.notificationsCenterHeader) { const widgetShadowColor = this.getColor(widgetShadow); this.notificationsCenterContainer.style.boxShadow = widgetShadowColor ? `0 0 8px 2px ${widgetShadowColor}` : ''; diff --git a/src/vs/workbench/browser/parts/notifications/notificationsList.ts b/src/vs/workbench/browser/parts/notifications/notificationsList.ts index b1e8112ea08e55..ec27091c6afc1a 100644 --- a/src/vs/workbench/browser/parts/notifications/notificationsList.ts +++ b/src/vs/workbench/browser/parts/notifications/notificationsList.ts @@ -246,7 +246,7 @@ export class NotificationsList extends Themable { return isAncestor(document.activeElement, this.listContainer); } - protected updateStyles(): void { + protected override updateStyles(): void { if (this.listContainer) { const foreground = this.getColor(NOTIFICATIONS_FOREGROUND); this.listContainer.style.color = foreground ? foreground : ''; @@ -271,7 +271,7 @@ export class NotificationsList extends Themable { } } - dispose(): void { + override dispose(): void { this.hide(); super.dispose(); diff --git a/src/vs/workbench/browser/parts/notifications/notificationsToasts.ts b/src/vs/workbench/browser/parts/notifications/notificationsToasts.ts index 52cb176c57730c..8e82335367f989 100644 --- a/src/vs/workbench/browser/parts/notifications/notificationsToasts.ts +++ b/src/vs/workbench/browser/parts/notifications/notificationsToasts.ts @@ -476,7 +476,7 @@ export class NotificationsToasts extends Themable implements INotificationsToast } } - protected updateStyles(): void { + protected override updateStyles(): void { this.mapNotificationToToast.forEach(({ toast }) => { const backgroundColor = this.getColor(NOTIFICATIONS_BACKGROUND); toast.style.background = backgroundColor ? backgroundColor : ''; diff --git a/src/vs/workbench/browser/parts/notifications/notificationsViewer.ts b/src/vs/workbench/browser/parts/notifications/notificationsViewer.ts index 3255a708ce57dd..e5c0c3767a094d 100644 --- a/src/vs/workbench/browser/parts/notifications/notificationsViewer.ts +++ b/src/vs/workbench/browser/parts/notifications/notificationsViewer.ts @@ -444,7 +444,7 @@ export class NotificationTemplateRenderer extends Disposable { if (notification.expanded && isNonEmptyArray(primaryActions)) { const that = this; const actionRunner: IActionRunner = new class extends ActionRunner { - protected async runAction(action: IAction): Promise { + protected async override runAction(action: IAction): Promise { // Run action that.actionRunner.run(action, notification); diff --git a/src/vs/workbench/browser/parts/panel/panelActions.ts b/src/vs/workbench/browser/parts/panel/panelActions.ts index 0d447ee9d3d160..c26cc115eb1292 100644 --- a/src/vs/workbench/browser/parts/panel/panelActions.ts +++ b/src/vs/workbench/browser/parts/panel/panelActions.ts @@ -38,7 +38,7 @@ export class TogglePanelAction extends Action { super(id, name, layoutService.isVisible(Parts.PANEL_PART) ? 'panel expanded' : 'panel'); } - async run(): Promise { + async override run(): Promise { this.layoutService.setPanelHidden(this.layoutService.isVisible(Parts.PANEL_PART)); } } @@ -57,7 +57,7 @@ class FocusPanelAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { // Show panel if (!this.layoutService.isVisible(Parts.PANEL_PART)) { @@ -113,7 +113,7 @@ export class SetPanelPositionAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const position = positionByActionId.get(this.id); this.layoutService.setPanelPosition(position === undefined ? Position.BOTTOM : position); } @@ -128,7 +128,7 @@ export class PanelActivityAction extends ActivityAction { super(activity); } - async run(): Promise { + async override run(): Promise { await this.panelService.openPanel(this.activity.id, true); this.activate(); } @@ -169,7 +169,7 @@ export class SwitchPanelViewAction extends Action { super(id, name); } - async run(offset: number): Promise { + async override run(offset: number): Promise { const pinnedPanels = this.panelService.getPinnedPanels(); const activePanel = this.panelService.getActivePanel(); if (!activePanel) { @@ -201,7 +201,7 @@ export class PreviousPanelViewAction extends SwitchPanelViewAction { super(id, name, panelService); } - run(): Promise { + override run(): Promise { return super.run(-1); } } @@ -219,7 +219,7 @@ export class NextPanelViewAction extends SwitchPanelViewAction { super(id, name, panelService); } - run(): Promise { + override run(): Promise { return super.run(1); } } diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index c2cf7ea3b9ef3a..27672e5895df77 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -415,7 +415,7 @@ export class PanelPart extends CompositePart implements IPanelService { this.layoutEmptyMessage(); } - create(parent: HTMLElement): void { + override create(parent: HTMLElement): void { this.element = parent; super.create(parent); @@ -468,7 +468,7 @@ export class PanelPart extends CompositePart implements IPanelService { })); } - updateStyles(): void { + override updateStyles(): void { super.updateStyles(); const container = assertIsDefined(this.getContainer()); @@ -562,7 +562,7 @@ export class PanelPart extends CompositePart implements IPanelService { this.hideActiveComposite(); } - protected createTitleLabel(parent: HTMLElement): ICompositeTitleLabel { + protected override createTitleLabel(parent: HTMLElement): ICompositeTitleLabel { const titleArea = this.compositeBar.create(parent); titleArea.classList.add('panel-switcher-container'); @@ -579,7 +579,7 @@ export class PanelPart extends CompositePart implements IPanelService { }; } - layout(width: number, height: number): void { + override layout(width: number, height: number): void { if (!this.layoutService.isVisible(Parts.PANEL_PART)) { return; } @@ -646,7 +646,7 @@ export class PanelPart extends CompositePart implements IPanelService { return compositeActions; } - protected removeComposite(compositeId: string): boolean { + protected override removeComposite(compositeId: string): boolean { if (super.removeComposite(compositeId)) { this.compositeBar.removeComposite(compositeId); const compositeActions = this.compositeActions.get(compositeId); diff --git a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts index ed77ad7b15714d..b08f327c670672 100644 --- a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts +++ b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts @@ -155,7 +155,7 @@ export class SidebarPart extends CompositePart implements IViewletServi })); } - create(parent: HTMLElement): void { + override create(parent: HTMLElement): void { this.element = parent; super.create(parent); @@ -165,7 +165,7 @@ export class SidebarPart extends CompositePart implements IViewletServi this._register(focusTracker.onDidBlur(() => this.sideBarFocusContextKey.set(false))); } - createTitleArea(parent: HTMLElement): HTMLElement { + override createTitleArea(parent: HTMLElement): HTMLElement { const titleArea = super.createTitleArea(parent); this._register(addDisposableListener(titleArea, EventType.CONTEXT_MENU, e => { @@ -183,7 +183,7 @@ export class SidebarPart extends CompositePart implements IViewletServi return titleArea; } - updateStyles(): void { + override updateStyles(): void { super.updateStyles(); // Part container @@ -203,7 +203,7 @@ export class SidebarPart extends CompositePart implements IViewletServi container.style.outlineColor = this.getColor(SIDE_BAR_DRAG_AND_DROP_BACKGROUND) ?? ''; } - layout(width: number, height: number): void { + override layout(width: number, height: number): void { if (!this.layoutService.isVisible(Parts.SIDEBAR_PART)) { return; } @@ -275,7 +275,7 @@ export class SidebarPart extends CompositePart implements IViewletServi return this.openComposite(id, focus) as Viewlet; } - protected getTitleAreaDropDownAnchorAlignment(): AnchorAlignment { + protected override getTitleAreaDropDownAnchorAlignment(): AnchorAlignment { return this.layoutService.getSideBarPosition() === SideBarPosition.LEFT ? AnchorAlignment.LEFT : AnchorAlignment.RIGHT; } diff --git a/src/vs/workbench/browser/parts/titlebar/menubarControl.ts b/src/vs/workbench/browser/parts/titlebar/menubarControl.ts index 701440fb360061..2804a0edaab671 100644 --- a/src/vs/workbench/browser/parts/titlebar/menubarControl.ts +++ b/src/vs/workbench/browser/parts/titlebar/menubarControl.ts @@ -740,7 +740,7 @@ export class CustomMenubarControl extends MenubarControl { }; } - protected onDidChangeWindowFocus(hasFocus: boolean): void { + protected override onDidChangeWindowFocus(hasFocus: boolean): void { if (!this.visible) { return; } @@ -759,7 +759,7 @@ export class CustomMenubarControl extends MenubarControl { } } - protected onUpdateStateChange(): void { + protected override onUpdateStateChange(): void { if (!this.visible) { return; } @@ -767,7 +767,7 @@ export class CustomMenubarControl extends MenubarControl { super.onUpdateStateChange(); } - protected onDidChangeRecentlyOpened(): void { + protected override onDidChangeRecentlyOpened(): void { if (!this.visible) { return; } @@ -775,7 +775,7 @@ export class CustomMenubarControl extends MenubarControl { super.onDidChangeRecentlyOpened(); } - protected onUpdateKeybindings(): void { + protected override onUpdateKeybindings(): void { if (!this.visible) { return; } @@ -783,7 +783,7 @@ export class CustomMenubarControl extends MenubarControl { super.onUpdateKeybindings(); } - protected registerListeners(): void { + protected override registerListeners(): void { super.registerListeners(); this._register(addDisposableListener(window, EventType.RESIZE, () => { diff --git a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts index 94f766ad69d741..4e4aa403fb5038 100644 --- a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts +++ b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts @@ -341,7 +341,7 @@ export class TitlebarPart extends Part implements ITitleService { this._register(this.customMenubar.onVisibilityChange(e => this.onMenubarVisibilityChanged(e))); } - createContentArea(parent: HTMLElement): HTMLElement { + override createContentArea(parent: HTMLElement): HTMLElement { this.element = parent; // App Icon (Native Windows/Linux and Web) @@ -413,7 +413,7 @@ export class TitlebarPart extends Part implements ITitleService { return this.element; } - updateStyles(): void { + override updateStyles(): void { super.updateStyles(); // Part container @@ -514,7 +514,7 @@ export class TitlebarPart extends Part implements ITitleService { } } - layout(width: number, height: number): void { + override layout(width: number, height: number): void { this.updateLayout(new Dimension(width, height)); super.layoutContents(width, height); diff --git a/src/vs/workbench/browser/parts/views/treeView.ts b/src/vs/workbench/browser/parts/views/treeView.ts index a43e5f33edf459..a63ee1b199302d 100644 --- a/src/vs/workbench/browser/parts/views/treeView.ts +++ b/src/vs/workbench/browser/parts/views/treeView.ts @@ -90,26 +90,26 @@ export class TreeViewPane extends ViewPane { this.updateTreeVisibility(); } - focus(): void { + override focus(): void { super.focus(); this.treeView.focus(); } - renderBody(container: HTMLElement): void { + override renderBody(container: HTMLElement): void { super.renderBody(container); this.renderTreeView(container); } - shouldShowWelcome(): boolean { + override shouldShowWelcome(): boolean { return ((this.treeView.dataProvider === undefined) || !!this.treeView.dataProvider.isTreeEmpty) && (this.treeView.message === undefined); } - layoutBody(height: number, width: number): void { + override layoutBody(height: number, width: number): void { super.layoutBody(height, width); this.layoutTreeView(height, width); } - getOptimalWidth(): number { + override getOptimalWidth(): number { return this.treeView.getOptimalWidth(); } @@ -1078,7 +1078,7 @@ class MultipleSelectionActionRunner extends ActionRunner { })); } - async runAction(action: IAction, context: TreeViewItemHandleArg): Promise { + async override runAction(action: IAction, context: TreeViewItemHandleArg): Promise { const selection = this.getSelectedResources(); let selectionHandleArgs: TreeViewItemHandleArg[] | undefined = undefined; let actionInSelected: boolean = false; @@ -1165,7 +1165,7 @@ export class CustomTreeView extends TreeView { super(id, title, themeService, instantiationService, commandService, configurationService, progressService, contextMenuService, keybindingService, notificationService, viewDescriptorService, hoverService, contextKeyService); } - setVisibility(isVisible: boolean): void { + override setVisibility(isVisible: boolean): void { super.setVisibility(isVisible); if (this.visible) { this.activate(); diff --git a/src/vs/workbench/browser/parts/views/viewPane.ts b/src/vs/workbench/browser/parts/views/viewPane.ts index 98a9e161bf9502..fcc554591f9a45 100644 --- a/src/vs/workbench/browser/parts/views/viewPane.ts +++ b/src/vs/workbench/browser/parts/views/viewPane.ts @@ -233,11 +233,11 @@ export abstract class ViewPane extends Pane implements IView { this.viewWelcomeController = new ViewWelcomeController(this.id, contextKeyService); } - get headerVisible(): boolean { + override get headerVisible(): boolean { return super.headerVisible; } - set headerVisible(visible: boolean) { + override set headerVisible(visible: boolean) { super.headerVisible = visible; this.element.classList.toggle('merged-header', !visible); } @@ -260,7 +260,7 @@ export abstract class ViewPane extends Pane implements IView { return this._isVisible && this.isExpanded(); } - setExpanded(expanded: boolean): boolean { + override setExpanded(expanded: boolean): boolean { const changed = super.setExpanded(expanded); if (changed) { this._onDidChangeBodyVisibility.fire(expanded); @@ -272,7 +272,7 @@ export abstract class ViewPane extends Pane implements IView { return changed; } - render(): void { + override render(): void { super.render(); const focusTracker = trackFocus(this.element); @@ -316,7 +316,7 @@ export abstract class ViewPane extends Pane implements IView { return expanded ? viewPaneContainerExpandedIcon : viewPaneContainerCollapsedIcon; } - style(styles: IPaneStyles): void { + override style(styles: IPaneStyles): void { super.style(styles); const icon = this.getIcon(); diff --git a/src/vs/workbench/browser/parts/views/viewPaneContainer.ts b/src/vs/workbench/browser/parts/views/viewPaneContainer.ts index 32db51de439637..61ba8767f473af 100644 --- a/src/vs/workbench/browser/parts/views/viewPaneContainer.ts +++ b/src/vs/workbench/browser/parts/views/viewPaneContainer.ts @@ -134,7 +134,7 @@ class ViewPaneDropOverlay extends Themable { this.updateStyles(); } - protected updateStyles(): void { + protected override updateStyles(): void { // Overlay drop background this.overlay.style.backgroundColor = this.getColor(this.location === ViewContainerLocation.Panel ? PANEL_SECTION_DRAG_AND_DROP_BACKGROUND : SIDE_BAR_DRAG_AND_DROP_BACKGROUND) || ''; @@ -287,7 +287,7 @@ class ViewPaneDropOverlay extends Themable { return element === this.container || element === this.overlay; } - dispose(): void { + override dispose(): void { super.dispose(); this._disposed = true; @@ -720,7 +720,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer { return sizes; } - saveState(): void { + override saveState(): void { this.panes.forEach((view) => view.saveState()); this.storageService.store(this.visibleViewsStorageId, this.length, StorageScope.WORKSPACE, StorageTarget.USER); } @@ -1064,7 +1064,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer { return true; } - dispose(): void { + override dispose(): void { super.dispose(); this.paneItems.forEach(i => i.disposable.dispose()); if (this.paneview) { diff --git a/src/vs/workbench/browser/parts/views/viewsViewlet.ts b/src/vs/workbench/browser/parts/views/viewsViewlet.ts index 00b65ec2d31e3b..c6e641414728b8 100644 --- a/src/vs/workbench/browser/parts/views/viewsViewlet.ts +++ b/src/vs/workbench/browser/parts/views/viewsViewlet.ts @@ -121,7 +121,7 @@ export abstract class FilterViewPaneContainer extends ViewPaneContainer { return views; } - onDidAddViewDescriptors(added: IAddedViewDescriptorRef[]): ViewPane[] { + override onDidAddViewDescriptors(added: IAddedViewDescriptorRef[]): ViewPane[] { const panes: ViewPane[] = super.onDidAddViewDescriptors(added); for (let i = 0; i < added.length; i++) { if (this.constantViewDescriptors.has(added[i].viewDescriptor.id)) { diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index ed529fdd054823..619d21a159eac6 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -614,7 +614,7 @@ export abstract class EditorInput extends Disposable implements IEditorInput { return this.disposed; } - dispose(): void { + override dispose(): void { if (!this.disposed) { this.disposed = true; this._onWillDispose.fire(); @@ -804,7 +804,7 @@ export class SideBySideEditorInput extends EditorInput { return SideBySideEditorInput.ID; } - getName(): string { + override getName(): string { if (!this.name) { return localize('sideBySideLabels', "{0} - {1}", this._secondary.getName(), this._primary.getName()); } @@ -812,45 +812,45 @@ export class SideBySideEditorInput extends EditorInput { return this.name; } - getDescription(): string | undefined { + override getDescription(): string | undefined { return this.description; } - isReadonly(): boolean { + override isReadonly(): boolean { return this.primary.isReadonly(); } - isUntitled(): boolean { + override isUntitled(): boolean { return this.primary.isUntitled(); } - isDirty(): boolean { + override isDirty(): boolean { return this.primary.isDirty(); } - isSaving(): boolean { + override isSaving(): boolean { return this.primary.isSaving(); } - save(group: GroupIdentifier, options?: ISaveOptions): Promise { + override save(group: GroupIdentifier, options?: ISaveOptions): Promise { return this.primary.save(group, options); } - saveAs(group: GroupIdentifier, options?: ISaveOptions): Promise { + override saveAs(group: GroupIdentifier, options?: ISaveOptions): Promise { return this.primary.saveAs(group, options); } - revert(group: GroupIdentifier, options?: IRevertOptions): Promise { + override revert(group: GroupIdentifier, options?: IRevertOptions): Promise { return this.primary.revert(group, options); } - getTelemetryDescriptor(): { [key: string]: unknown } { + override getTelemetryDescriptor(): { [key: string]: unknown } { const descriptor = this.primary.getTelemetryDescriptor(); return Object.assign(descriptor, super.getTelemetryDescriptor()); } - matches(otherInput: unknown): boolean { + override matches(otherInput: unknown): boolean { if (otherInput === this) { return true; } @@ -904,7 +904,7 @@ export class EditorModel extends Disposable implements IEditorModel { /** * Subclasses should implement to free resources that have been claimed through loading. */ - dispose(): void { + override dispose(): void { this.disposed = true; this._onWillDispose.fire(); @@ -1122,7 +1122,7 @@ export class TextEditorOptions extends EditorOptions implements ITextEditorOptio /** * Overwrites option values from the provided bag. */ - overwrite(options: ITextEditorOptions): TextEditorOptions { + override overwrite(options: ITextEditorOptions): TextEditorOptions { super.overwrite(options); if (options.selection) { @@ -1245,7 +1245,7 @@ export class EditorCommandsContextActionRunner extends ActionRunner { super(); } - run(action: IAction): Promise { + override run(action: IAction): Promise { return super.run(action, this.context); } } diff --git a/src/vs/workbench/common/editor/binaryEditorModel.ts b/src/vs/workbench/common/editor/binaryEditorModel.ts index a426062a9aeda5..d635b70a141188 100644 --- a/src/vs/workbench/common/editor/binaryEditorModel.ts +++ b/src/vs/workbench/common/editor/binaryEditorModel.ts @@ -56,7 +56,7 @@ export class BinaryEditorModel extends EditorModel { return this.etag; } - async resolve(): Promise { + async override resolve(): Promise { // Make sure to resolve up to date stat for file resources if (this.fileService.canHandleResource(this.resource)) { diff --git a/src/vs/workbench/common/editor/diffEditorInput.ts b/src/vs/workbench/common/editor/diffEditorInput.ts index 1b0eed959ae44e..1c5506e8cd0a5f 100644 --- a/src/vs/workbench/common/editor/diffEditorInput.ts +++ b/src/vs/workbench/common/editor/diffEditorInput.ts @@ -37,11 +37,11 @@ export class DiffEditorInput extends SideBySideEditorInput { super(name, description, originalInput, modifiedInput); } - getTypeId(): string { + override getTypeId(): string { return DiffEditorInput.ID; } - getName(): string { + override getName(): string { if (!this.name) { // Craft a name from original and modified input that includes the @@ -58,7 +58,7 @@ export class DiffEditorInput extends SideBySideEditorInput { return this.name; } - getDescription(verbosity: Verbosity = Verbosity.MEDIUM): string | undefined { + override getDescription(verbosity: Verbosity = Verbosity.MEDIUM): string | undefined { if (typeof this.description !== 'string') { // Pass the description of the modified side in case both original @@ -88,7 +88,7 @@ export class DiffEditorInput extends SideBySideEditorInput { return undefined; } - async resolve(): Promise { + async override resolve(): Promise { // Create Model - we never reuse our cached model if refresh is true because we cannot // decide for the inputs within if the cached model can be reused or not. There may be @@ -104,7 +104,7 @@ export class DiffEditorInput extends SideBySideEditorInput { return this.cachedModel; } - getPreferredEditorId(candidates: string[]): string { + override getPreferredEditorId(candidates: string[]): string { return this.forceOpenAsBinary ? BINARY_DIFF_EDITOR_ID : TEXT_DIFF_EDITOR_ID; } @@ -125,7 +125,7 @@ export class DiffEditorInput extends SideBySideEditorInput { return new DiffEditorModel(withNullAsUndefined(originalEditorModel), withNullAsUndefined(modifiedEditorModel)); } - matches(otherInput: unknown): boolean { + override matches(otherInput: unknown): boolean { if (!super.matches(otherInput)) { return false; } @@ -133,7 +133,7 @@ export class DiffEditorInput extends SideBySideEditorInput { return otherInput instanceof DiffEditorInput && otherInput.forceOpenAsBinary === this.forceOpenAsBinary; } - dispose(): void { + override dispose(): void { // Free the diff editor model but do not propagate the dispose() call to the two inputs // We never created the two inputs (original and modified) so we can not dispose diff --git a/src/vs/workbench/common/editor/diffEditorModel.ts b/src/vs/workbench/common/editor/diffEditorModel.ts index ff95f51a8c9641..3f4d4f1543c30b 100644 --- a/src/vs/workbench/common/editor/diffEditorModel.ts +++ b/src/vs/workbench/common/editor/diffEditorModel.ts @@ -25,18 +25,18 @@ export class DiffEditorModel extends EditorModel { this._modifiedModel = modifiedModel; } - async resolve(): Promise { + async override resolve(): Promise { await Promise.all([ this._originalModel?.resolve(), this._modifiedModel?.resolve() ]); } - isResolved(): boolean { + override isResolved(): boolean { return !!(this.originalModel?.isResolved() && this.modifiedModel?.isResolved()); } - dispose(): void { + override dispose(): void { // Do not propagate the dispose() call to the two models inside. We never created the two models // (original and modified) so we can not dispose them without sideeffects. Rather rely on the diff --git a/src/vs/workbench/common/editor/resourceEditorInput.ts b/src/vs/workbench/common/editor/resourceEditorInput.ts index 0167182c2e8c9f..c8ce69c50945e6 100644 --- a/src/vs/workbench/common/editor/resourceEditorInput.ts +++ b/src/vs/workbench/common/editor/resourceEditorInput.ts @@ -48,7 +48,7 @@ export class ResourceEditorInput extends AbstractTextResourceEditorInput impleme return ResourceEditorInput.ID; } - getName(): string { + override getName(): string { return this.name || super.getName(); } @@ -60,7 +60,7 @@ export class ResourceEditorInput extends AbstractTextResourceEditorInput impleme } } - getDescription(): string | undefined { + override getDescription(): string | undefined { return this.description; } @@ -84,7 +84,7 @@ export class ResourceEditorInput extends AbstractTextResourceEditorInput impleme this.preferredMode = mode; } - async resolve(): Promise { + async override resolve(): Promise { if (!this.modelReference) { this.modelReference = this.textModelResolverService.createModelReference(this.resource); } @@ -110,7 +110,7 @@ export class ResourceEditorInput extends AbstractTextResourceEditorInput impleme return model; } - matches(otherInput: unknown): boolean { + override matches(otherInput: unknown): boolean { if (otherInput === this) { return true; } @@ -122,7 +122,7 @@ export class ResourceEditorInput extends AbstractTextResourceEditorInput impleme return false; } - dispose(): void { + override dispose(): void { if (this.modelReference) { this.modelReference.then(ref => ref.dispose()); this.modelReference = undefined; diff --git a/src/vs/workbench/common/editor/resourceEditorModel.ts b/src/vs/workbench/common/editor/resourceEditorModel.ts index 56f7aefe250f9c..661bbe6496f349 100644 --- a/src/vs/workbench/common/editor/resourceEditorModel.ts +++ b/src/vs/workbench/common/editor/resourceEditorModel.ts @@ -21,7 +21,7 @@ export class ResourceEditorModel extends BaseTextEditorModel { super(modelService, modeService, resource); } - dispose(): void { + override dispose(): void { // force this class to dispose the underlying model if (this.textEditorModelHandle) { diff --git a/src/vs/workbench/common/editor/textDiffEditorModel.ts b/src/vs/workbench/common/editor/textDiffEditorModel.ts index daf1e7e01e191e..436b556ed3731f 100644 --- a/src/vs/workbench/common/editor/textDiffEditorModel.ts +++ b/src/vs/workbench/common/editor/textDiffEditorModel.ts @@ -13,11 +13,11 @@ import { DiffEditorModel } from 'vs/workbench/common/editor/diffEditorModel'; */ export class TextDiffEditorModel extends DiffEditorModel { - protected readonly _originalModel: BaseTextEditorModel | undefined; - get originalModel(): BaseTextEditorModel | undefined { return this._originalModel; } + protected override readonly _originalModel: BaseTextEditorModel | undefined; + override get originalModel(): BaseTextEditorModel | undefined { return this._originalModel; } - protected readonly _modifiedModel: BaseTextEditorModel | undefined; - get modifiedModel(): BaseTextEditorModel | undefined { return this._modifiedModel; } + protected override readonly _modifiedModel: BaseTextEditorModel | undefined; + override get modifiedModel(): BaseTextEditorModel | undefined { return this._modifiedModel; } private _textDiffEditorModel: IDiffEditorModel | undefined = undefined; get textDiffEditorModel(): IDiffEditorModel | undefined { return this._textDiffEditorModel; } @@ -31,7 +31,7 @@ export class TextDiffEditorModel extends DiffEditorModel { this.updateTextDiffEditorModel(); } - async resolve(): Promise { + async override resolve(): Promise { await super.resolve(); this.updateTextDiffEditorModel(); @@ -56,7 +56,7 @@ export class TextDiffEditorModel extends DiffEditorModel { } } - isResolved(): boolean { + override isResolved(): boolean { return !!this._textDiffEditorModel; } @@ -64,7 +64,7 @@ export class TextDiffEditorModel extends DiffEditorModel { return !!this.modifiedModel && this.modifiedModel.isReadonly(); } - dispose(): void { + override dispose(): void { // Free the diff editor model but do not propagate the dispose() call to the two models // inside. We never created the two models (original and modified) so we can not dispose diff --git a/src/vs/workbench/common/editor/textEditorModel.ts b/src/vs/workbench/common/editor/textEditorModel.ts index 3225ea5a9bb000..8ff1fcee7786e0 100644 --- a/src/vs/workbench/common/editor/textEditorModel.ts +++ b/src/vs/workbench/common/editor/textEditorModel.ts @@ -167,11 +167,11 @@ export class BaseTextEditorModel extends EditorModel implements ITextEditorModel return this.textEditorModel.createSnapshot(true /* preserve BOM */); } - isResolved(): this is IResolvedTextEditorModel { + override isResolved(): this is IResolvedTextEditorModel { return !!this.textEditorModelHandle; } - dispose(): void { + override dispose(): void { this.modelDisposeListener.dispose(); // dispose this first because it will trigger another dispose() otherwise if (this.textEditorModelHandle && this.createdEditorModel) { diff --git a/src/vs/workbench/common/editor/textResourceEditorInput.ts b/src/vs/workbench/common/editor/textResourceEditorInput.ts index f8b47aac4d14b8..296d3a01261aa7 100644 --- a/src/vs/workbench/common/editor/textResourceEditorInput.ts +++ b/src/vs/workbench/common/editor/textResourceEditorInput.ts @@ -77,7 +77,7 @@ export abstract class AbstractTextResourceEditorInput extends EditorInput implem } private _name: string | undefined = undefined; - getName(): string { + override getName(): string { if (typeof this._name !== 'string') { this._name = this.labelService.getUriBasenameLabel(this._preferredResource); } @@ -85,7 +85,7 @@ export abstract class AbstractTextResourceEditorInput extends EditorInput implem return this._name; } - getDescription(verbosity: Verbosity = Verbosity.MEDIUM): string | undefined { + override getDescription(verbosity: Verbosity = Verbosity.MEDIUM): string | undefined { switch (verbosity) { case Verbosity.SHORT: return this.shortDescription; @@ -151,7 +151,7 @@ export abstract class AbstractTextResourceEditorInput extends EditorInput implem return this._longTitle; } - getTitle(verbosity: Verbosity): string { + override getTitle(verbosity: Verbosity): string { switch (verbosity) { case Verbosity.SHORT: return this.shortTitle; @@ -163,14 +163,14 @@ export abstract class AbstractTextResourceEditorInput extends EditorInput implem } } - isUntitled(): boolean { + override isUntitled(): boolean { // any file: is never untitled as it can be saved // untitled: is untitled by definition // any other: is untitled because it cannot be saved, as such we expect a "Save As" dialog return !this.fileService.canHandleResource(this.resource); } - isReadonly(): boolean { + override isReadonly(): boolean { if (this.isUntitled()) { return false; // untitled is never readonly } @@ -178,7 +178,7 @@ export abstract class AbstractTextResourceEditorInput extends EditorInput implem return this.fileService.hasCapability(this.resource, FileSystemProviderCapabilities.Readonly); } - isSaving(): boolean { + override isSaving(): boolean { if (this.isUntitled()) { return false; // untitled is never saving automatically } @@ -190,7 +190,7 @@ export abstract class AbstractTextResourceEditorInput extends EditorInput implem return false; } - save(group: GroupIdentifier, options?: ITextFileSaveOptions): Promise { + override save(group: GroupIdentifier, options?: ITextFileSaveOptions): Promise { // If this is neither an `untitled` resource, nor a resource // we can handle with the file service, we can only "Save As..." @@ -202,7 +202,7 @@ export abstract class AbstractTextResourceEditorInput extends EditorInput implem return this.doSave(options, false); } - saveAs(group: GroupIdentifier, options?: ITextFileSaveOptions): Promise { + override saveAs(group: GroupIdentifier, options?: ITextFileSaveOptions): Promise { return this.doSave(options, true); } @@ -233,7 +233,7 @@ export abstract class AbstractTextResourceEditorInput extends EditorInput implem return this; } - async revert(group: GroupIdentifier, options?: IRevertOptions): Promise { + async override revert(group: GroupIdentifier, options?: IRevertOptions): Promise { await this.textFileService.revert(this.resource, options); } } diff --git a/src/vs/workbench/contrib/backup/test/browser/backupRestorer.test.ts b/src/vs/workbench/contrib/backup/test/browser/backupRestorer.test.ts index 7d5e6e28dd3d20..a2821b27da6849 100644 --- a/src/vs/workbench/contrib/backup/test/browser/backupRestorer.test.ts +++ b/src/vs/workbench/contrib/backup/test/browser/backupRestorer.test.ts @@ -22,7 +22,7 @@ import { DisposableStore } from 'vs/base/common/lifecycle'; suite('BackupRestorer', () => { class TestBackupRestorer extends BackupRestorer { - async doRestoreBackups(): Promise { + async override doRestoreBackups(): Promise { return super.doRestoreBackups(); } } diff --git a/src/vs/workbench/contrib/backup/test/browser/backupTracker.test.ts b/src/vs/workbench/contrib/backup/test/browser/backupTracker.test.ts index 9ecdb9bcda076f..a5cd04afe6c034 100644 --- a/src/vs/workbench/contrib/backup/test/browser/backupTracker.test.ts +++ b/src/vs/workbench/contrib/backup/test/browser/backupTracker.test.ts @@ -41,7 +41,7 @@ suite('BackupTracker (browser)', function () { super(backupFileService, filesConfigurationService, workingCopyService, lifecycleService, logService); } - protected getBackupScheduleDelay(): number { + protected override getBackupScheduleDelay(): number { return 10; // Reduce timeout for tests } } @@ -114,7 +114,7 @@ suite('BackupTracker (browser)', function () { accessor.workingCopyService.registerWorkingCopy(this); } - async backup(token: CancellationToken): Promise { + async override backup(token: CancellationToken): Promise { await timeout(this.backupDelay); return {}; diff --git a/src/vs/workbench/contrib/backup/test/electron-browser/backupTracker.test.ts b/src/vs/workbench/contrib/backup/test/electron-browser/backupTracker.test.ts index 27602496a68fc7..6f4d5d91251258 100644 --- a/src/vs/workbench/contrib/backup/test/electron-browser/backupTracker.test.ts +++ b/src/vs/workbench/contrib/backup/test/electron-browser/backupTracker.test.ts @@ -63,11 +63,11 @@ flakySuite('BackupTracker (native)', function () { super(backupFileService, filesConfigurationService, workingCopyService, lifecycleService, fileDialogService, dialogService, contextService, nativeHostService, logService, editorService, environmentService, progressService); } - protected getBackupScheduleDelay(): number { + protected override getBackupScheduleDelay(): number { return 10; // Reduce timeout for tests } - dispose() { + override dispose() { super.dispose(); for (const [_, disposable] of this.pendingBackups) { diff --git a/src/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.ts b/src/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.ts index 90b8704ba0518c..b7c76933f5e0ac 100644 --- a/src/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.ts +++ b/src/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.ts @@ -109,11 +109,11 @@ class EditorEditTask extends ModelEditTask { this._editor = editor; } - getBeforeCursorState(): Selection[] | null { + override getBeforeCursorState(): Selection[] | null { return this._editor.getSelections(); } - apply(): void { + override apply(): void { if (this._edits.length > 0) { this._edits = this._edits.sort((a, b) => Range.compareRangesUsingStarts(a.range, b.range)); this._editor.executeEdits('', this._edits); diff --git a/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane.ts b/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane.ts index 8a4997a7c99876..6cf35182be624c 100644 --- a/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane.ts +++ b/src/vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane.ts @@ -100,12 +100,12 @@ export class BulkEditPane extends ViewPane { this._ctxHasCheckedChanges = BulkEditPane.ctxHasCheckedChanges.bindTo(_contextKeyService); } - dispose(): void { + override dispose(): void { this._tree.dispose(); this._disposables.dispose(); } - protected renderBody(parent: HTMLElement): void { + protected override renderBody(parent: HTMLElement): void { super.renderBody(parent); const resourceLabels = this._instaService.createInstance( @@ -154,7 +154,7 @@ export class BulkEditPane extends ViewPane { this._setState(State.Message); } - protected layoutBody(height: number, width: number): void { + protected override layoutBody(height: number, width: number): void { super.layoutBody(height, width); this._tree.layout(height, width); } diff --git a/src/vs/workbench/contrib/bulkEdit/test/browser/bulkEditPreview.test.ts b/src/vs/workbench/contrib/bulkEdit/test/browser/bulkEditPreview.test.ts index 2bab33cfc5c8da..dd30a11bf77cf4 100644 --- a/src/vs/workbench/contrib/bulkEdit/test/browser/bulkEditPreview.test.ts +++ b/src/vs/workbench/contrib/bulkEdit/test/browser/bulkEditPreview.test.ts @@ -24,17 +24,17 @@ suite('BulkEditPreview', function () { setup(function () { const fileService: IFileService = new class extends mock() { - onDidFilesChange = Event.None; - async exists() { + override onDidFilesChange = Event.None; + async override exists() { return true; } }; const modelService: IModelService = new class extends mock() { - getModel() { + override getModel() { return null; } - getModels() { + override getModels() { return []; } }; diff --git a/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.ts b/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.ts index fbf12cd12a2d50..96f6d8628af691 100644 --- a/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.ts +++ b/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.ts @@ -101,7 +101,7 @@ export class CallHierarchyTreePeekWidget extends peekView.PeekViewWidget { this._disposables.add(this._previewDisposable); } - dispose(): void { + override dispose(): void { LayoutInfo.store(this._layoutInfo, this._storageService); this._splitView.dispose(); this._tree.dispose(); @@ -124,7 +124,7 @@ export class CallHierarchyTreePeekWidget extends peekView.PeekViewWidget { }); } - protected _fillHead(container: HTMLElement): void { + protected override _fillHead(container: HTMLElement): void { super._fillHead(container, true); const menu = this._menuService.createMenu(CallHierarchyTreePeekWidget.TitleMenu, this._contextKeyService); @@ -410,13 +410,13 @@ export class CallHierarchyTreePeekWidget extends peekView.PeekViewWidget { } } - protected _onWidth(width: number) { + protected override _onWidth(width: number) { if (this._dim) { this._doLayoutBody(this._dim.height, width); } } - protected _doLayoutBody(height: number, width: number): void { + protected override _doLayoutBody(height: number, width: number): void { if (this._dim.height !== height || this._dim.width !== width) { super._doLayoutBody(height, width); this._dim = new Dimension(width, height); diff --git a/src/vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.ts b/src/vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.ts index 4f6b7ff0d6f35e..7522b2f638743d 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.ts @@ -143,7 +143,7 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { this._editor.addOverlayWidget(this); } - public dispose(): void { + public override dispose(): void { this._editor.removeOverlayWidget(this); super.dispose(); } diff --git a/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.ts b/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.ts index 0f7a8480b326b2..2362766c7417d9 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.ts @@ -98,7 +98,7 @@ class DiffEditorHelperContribution extends Disposable implements IDiffEditorCont } } - dispose(): void { + override dispose(): void { super.dispose(); } } diff --git a/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindReplaceWidget.ts b/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindReplaceWidget.ts index cb7b1e97b5cf08..9615ad74773a2e 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindReplaceWidget.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindReplaceWidget.ts @@ -321,7 +321,7 @@ export abstract class SimpleFindReplaceWidget extends Widget { } - dispose() { + override dispose() { super.dispose(); if (this._domNode && this._domNode.parentElement) { diff --git a/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.ts b/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.ts index 6226e8fb848f0e..dc1c0e064cbbb6 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.ts @@ -187,7 +187,7 @@ export abstract class SimpleFindWidget extends Widget { this._findInput.style(inputStyles); } - dispose() { + override dispose() { super.dispose(); if (this._domNode && this._domNode.parentElement) { diff --git a/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.ts b/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.ts index 97a0010dfbdfb2..3fd351fc49e185 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.ts @@ -71,7 +71,7 @@ class InspectEditorTokensController extends Disposable implements IEditorContrib this._register(this._editor.onKeyUp((e) => e.keyCode === KeyCode.Escape && this.stop())); } - public dispose(): void { + public override dispose(): void { this.stop(); super.dispose(); } @@ -214,7 +214,7 @@ class InspectEditorTokensWidget extends Disposable implements IContentWidget { this._editor.addContentWidget(this); } - public dispose(): void { + public override dispose(): void { this._isDisposed = true; this._editor.removeContentWidget(this); this._currentRequestCancellationTokenSource.cancel(); diff --git a/src/vs/workbench/contrib/codeEditor/browser/inspectKeybindings.ts b/src/vs/workbench/contrib/codeEditor/browser/inspectKeybindings.ts index d33ec461d47bd6..f5e0bb1571f60e 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/inspectKeybindings.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/inspectKeybindings.ts @@ -47,7 +47,7 @@ class InspectKeyMapJSON extends Action { super(id, label); } - public run(): Promise { + public override run(): Promise { return this._editorService.openEditor({ contents: this._keybindingService._dumpDebugInfoJSON(), options: { pinned: true } }); } } diff --git a/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.ts b/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.ts index 99417655a68d60..73843d65ff63dd 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.ts @@ -41,7 +41,7 @@ export class GotoLineQuickAccessProvider extends AbstractGotoLineQuickAccessProv return this.editorService.activeTextEditorControl; } - protected gotoLocation(context: IQuickAccessTextEditorContext, options: { range: IRange, keyMods: IKeyMods, forceSideBySide?: boolean, preserveFocus?: boolean }): void { + protected override gotoLocation(context: IQuickAccessTextEditorContext, options: { range: IRange, keyMods: IKeyMods, forceSideBySide?: boolean, preserveFocus?: boolean }): void { // Check for sideBySide use if ((options.keyMods.alt || (this.configuration.openEditorPinned && options.keyMods.ctrlCmd) || options.forceSideBySide) && this.editorService.activeEditor) { diff --git a/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.ts b/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.ts index d3216f61a9b6fa..7766be44b3a0b5 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.ts @@ -67,7 +67,7 @@ export class GotoSymbolQuickAccessProvider extends AbstractGotoSymbolQuickAccess return this.editorService.activeTextEditorControl; } - protected gotoLocation(context: IQuickAccessTextEditorContext, options: { range: IRange, keyMods: IKeyMods, forceSideBySide?: boolean, preserveFocus?: boolean }): void { + protected override gotoLocation(context: IQuickAccessTextEditorContext, options: { range: IRange, keyMods: IKeyMods, forceSideBySide?: boolean, preserveFocus?: boolean }): void { // Check for sideBySide use if ((options.keyMods.alt || (this.configuration.openEditorPinned && options.keyMods.ctrlCmd) || options.forceSideBySide) && this.editorService.activeEditor) { @@ -110,17 +110,17 @@ export class GotoSymbolQuickAccessProvider extends AbstractGotoSymbolQuickAccess return this.doGetSymbolPicks(this.getDocumentSymbols(model, token), prepareQuery(filter), options, token); } - addDecorations(editor: IEditor, range: IRange): void { + override addDecorations(editor: IEditor, range: IRange): void { super.addDecorations(editor, range); } - clearDecorations(editor: IEditor): void { + override clearDecorations(editor: IEditor): void { super.clearDecorations(editor); } //#endregion - protected provideWithoutTextEditor(picker: IQuickPick): IDisposable { + protected override provideWithoutTextEditor(picker: IQuickPick): IDisposable { if (this.canPickWithOutlineService()) { return this.doGetOutlinePicks(picker); } diff --git a/src/vs/workbench/contrib/codeEditor/browser/toggleColumnSelection.ts b/src/vs/workbench/contrib/codeEditor/browser/toggleColumnSelection.ts index 858bf7be6fdb67..30f6dd38b5c1cf 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/toggleColumnSelection.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/toggleColumnSelection.ts @@ -39,7 +39,7 @@ export class ToggleColumnSelectionAction extends Action { return this._codeEditorService.getActiveCodeEditor(); } - public async run(): Promise { + public async override run(): Promise { const oldValue = this._configurationService.getValue('editor.columnSelection'); const codeEditor = this._getCodeEditor(); await this._configurationService.updateValue('editor.columnSelection', !oldValue); diff --git a/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.ts b/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.ts index fbd79e0004dd12..1da1c3be2d5828 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.ts @@ -23,7 +23,7 @@ export class ToggleMinimapAction extends Action { super(id, label); } - public run(): Promise { + public override run(): Promise { const newValue = !this._configurationService.getValue('editor.minimap.enabled'); return this._configurationService.updateValue('editor.minimap.enabled', newValue); } diff --git a/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.ts b/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.ts index 36a63179bf710e..d271522e107467 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.ts @@ -29,7 +29,7 @@ export class ToggleMultiCursorModifierAction extends Action { super(id, label); } - public run(): Promise { + public override run(): Promise { const editorConf = this.configurationService.getValue<{ multiCursorModifier: 'ctrlCmd' | 'alt' }>('editor'); const newValue: 'ctrlCmd' | 'alt' = (editorConf.multiCursorModifier === 'ctrlCmd' ? 'alt' : 'ctrlCmd'); diff --git a/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.ts b/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.ts index d530f1a875eaca..ecf2968c5c19ea 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.ts @@ -24,7 +24,7 @@ export class ToggleRenderControlCharacterAction extends Action { super(id, label); } - public run(): Promise { + public override run(): Promise { let newRenderControlCharacters = !this._configurationService.getValue('editor.renderControlCharacters'); return this._configurationService.updateValue('editor.renderControlCharacters', newRenderControlCharacters); } diff --git a/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.ts b/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.ts index 5a5174b899f461..e9835e215b6e35 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.ts @@ -24,7 +24,7 @@ export class ToggleRenderWhitespaceAction extends Action { super(id, label); } - public run(): Promise { + public override run(): Promise { const renderWhitespace = this._configurationService.getValue('editor.renderWhitespace'); let newRenderWhitespace: string; diff --git a/src/vs/workbench/contrib/codeEditor/electron-sandbox/selectionClipboard.ts b/src/vs/workbench/contrib/codeEditor/electron-sandbox/selectionClipboard.ts index 015984db6ab1da..4441bbf615792d 100644 --- a/src/vs/workbench/contrib/codeEditor/electron-sandbox/selectionClipboard.ts +++ b/src/vs/workbench/contrib/codeEditor/electron-sandbox/selectionClipboard.ts @@ -84,7 +84,7 @@ export class SelectionClipboard extends Disposable implements IEditorContributio } } - public dispose(): void { + public override dispose(): void { super.dispose(); } } diff --git a/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts b/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts index 1d4e0e38028f35..50be61d541d88e 100644 --- a/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts +++ b/src/vs/workbench/contrib/comments/browser/commentThreadWidget.ts @@ -180,7 +180,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget return undefined; } - protected revealLine(lineNumber: number) { + protected override revealLine(lineNumber: number) { // we don't do anything here as we always do the reveal ourselves. } @@ -397,11 +397,11 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget this.setFocusedComment(this._focusedComment); } - protected _onWidth(widthInPixel: number): void { + protected override _onWidth(widthInPixel: number): void { this._commentReplyComponent?.editor.layout({ height: 5 * 18, width: widthInPixel - 54 /* margin 20px * 10 + scrollbar 14px*/ }); } - protected _doLayout(heightInPixel: number, widthInPixel: number): void { + protected override _doLayout(heightInPixel: number, widthInPixel: number): void { this._commentReplyComponent?.editor.layout({ height: 5 * 18, width: widthInPixel - 54 /* margin 20px * 10 + scrollbar 14px*/ }); } @@ -953,13 +953,13 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget this.setCommentEditorDecorations(); } - show(rangeOrPos: IRange | IPosition, heightInLines: number): void { + override show(rangeOrPos: IRange | IPosition, heightInLines: number): void { this._isExpanded = true; super.show(rangeOrPos, heightInLines); this._refresh(); } - hide() { + override hide() { if (this._isExpanded) { this._isExpanded = false; // Focus the container so that the comment editor will be blurred before it is hidden @@ -968,7 +968,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget super.hide(); } - dispose() { + override dispose() { super.dispose(); if (this._resizeObserver) { this._resizeObserver.disconnect(); diff --git a/src/vs/workbench/contrib/comments/browser/commentsView.ts b/src/vs/workbench/contrib/comments/browser/commentsView.ts index 9212343cea2320..8d3b040f9b8330 100644 --- a/src/vs/workbench/contrib/comments/browser/commentsView.ts +++ b/src/vs/workbench/contrib/comments/browser/commentsView.ts @@ -61,7 +61,7 @@ export class CommentsPanel extends ViewPane { this.hasCommentsContextKey = CONTEXT_KEY_HAS_COMMENTS.bindTo(contextKeyService); } - public renderBody(container: HTMLElement): void { + public override renderBody(container: HTMLElement): void { super.renderBody(container); container.classList.add('comments-panel'); @@ -89,7 +89,7 @@ export class CommentsPanel extends ViewPane { this.renderComments(); } - public focus(): void { + public override focus(): void { if (this.tree && this.tree.getHTMLElement() === document.activeElement) { return; } @@ -144,7 +144,7 @@ export class CommentsPanel extends ViewPane { } } - public layoutBody(height: number, width: number): void { + public override layoutBody(height: number, width: number): void { super.layoutBody(height, width); this.tree.layout(height, width); } diff --git a/src/vs/workbench/contrib/comments/browser/reactionsAction.ts b/src/vs/workbench/contrib/comments/browser/reactionsAction.ts index ef091f4dd7b3e2..28215b945929e1 100644 --- a/src/vs/workbench/contrib/comments/browser/reactionsAction.ts +++ b/src/vs/workbench/contrib/comments/browser/reactionsAction.ts @@ -17,7 +17,7 @@ export class ToggleReactionsAction extends Action { super(ToggleReactionsAction.ID, title || nls.localize('pickReactions', "Pick Reactions..."), 'toggle-reactions', true); this.toggleDropdownMenu = toggleDropdownMenu; } - run(): Promise { + override run(): Promise { this.toggleDropdownMenu(); return Promise.resolve(true); } @@ -32,7 +32,7 @@ export class ReactionActionViewItem extends ActionViewItem { constructor(action: ReactionAction) { super(null, action, {}); } - updateLabel(): void { + override updateLabel(): void { if (!this.label) { return; } diff --git a/src/vs/workbench/contrib/customEditor/browser/customEditorInput.ts b/src/vs/workbench/contrib/customEditor/browser/customEditorInput.ts index 32ebe180bdd498..a831d5c79c052e 100644 --- a/src/vs/workbench/contrib/customEditor/browser/customEditorInput.ts +++ b/src/vs/workbench/contrib/customEditor/browser/customEditorInput.ts @@ -60,7 +60,7 @@ export class CustomEditorInput extends LazilyResolvedWebviewEditorInput { private readonly _untitledDocumentData: VSBuffer | undefined; - get resource() { return this._editorResource; } + override get resource() { return this._editorResource; } private _modelRef?: IReference; @@ -85,20 +85,20 @@ export class CustomEditorInput extends LazilyResolvedWebviewEditorInput { this._untitledDocumentData = options.untitledDocumentData; } - public getTypeId(): string { + public override getTypeId(): string { return CustomEditorInput.typeId; } - public supportsSplitEditor() { + public override supportsSplitEditor() { return true; } - getName(): string { + override getName(): string { const name = basename(this.labelService.getUriLabel(this.resource)); return this.decorateLabel(name); } - matches(other: IEditorInput): boolean { + override matches(other: IEditorInput): boolean { return this === other || (other instanceof CustomEditorInput && this.viewType === other.viewType && isEqual(this.resource, other.resource)); @@ -119,7 +119,7 @@ export class CustomEditorInput extends LazilyResolvedWebviewEditorInput { return this.labelService.getUriLabel(this.resource); } - public getTitle(verbosity?: Verbosity): string { + public override getTitle(verbosity?: Verbosity): string { switch (verbosity) { case Verbosity.SHORT: return this.decorateLabel(this.shortTitle); @@ -144,22 +144,22 @@ export class CustomEditorInput extends LazilyResolvedWebviewEditorInput { }); } - public isReadonly(): boolean { + public override isReadonly(): boolean { return this._modelRef ? !this._modelRef.object.isEditable() : false; } - public isUntitled(): boolean { + public override isUntitled(): boolean { return this.resource.scheme === Schemas.untitled; } - public isDirty(): boolean { + public override isDirty(): boolean { if (!this._modelRef) { return !!this._defaultDirtyState; } return this._modelRef.object.isDirty(); } - public async save(groupId: GroupIdentifier, options?: ISaveOptions): Promise { + public async override save(groupId: GroupIdentifier, options?: ISaveOptions): Promise { if (!this._modelRef) { return undefined; } @@ -176,7 +176,7 @@ export class CustomEditorInput extends LazilyResolvedWebviewEditorInput { return this; } - public async saveAs(groupId: GroupIdentifier, options?: ISaveOptions): Promise { + public async override saveAs(groupId: GroupIdentifier, options?: ISaveOptions): Promise { if (!this._modelRef) { return undefined; } @@ -194,7 +194,7 @@ export class CustomEditorInput extends LazilyResolvedWebviewEditorInput { return this.rename(groupId, target)?.editor; } - public async revert(group: GroupIdentifier, options?: IRevertOptions): Promise { + public async override revert(group: GroupIdentifier, options?: IRevertOptions): Promise { if (this._modelRef) { return this._modelRef.object.revert(options); } @@ -202,7 +202,7 @@ export class CustomEditorInput extends LazilyResolvedWebviewEditorInput { this._onDidChangeDirty.fire(); } - public async resolve(): Promise { + public async override resolve(): Promise { await super.resolve(); if (this.isDisposed()) { @@ -222,7 +222,7 @@ export class CustomEditorInput extends LazilyResolvedWebviewEditorInput { return null; } - rename(group: GroupIdentifier, newResource: URI): { editor: IEditorInput } | undefined { + override rename(group: GroupIdentifier, newResource: URI): { editor: IEditorInput } | undefined { // See if we can keep using the same custom editor provider const editorInfo = this.customEditorService.getCustomEditor(this.viewType); if (editorInfo?.matches(newResource)) { @@ -266,7 +266,7 @@ export class CustomEditorInput extends LazilyResolvedWebviewEditorInput { this._moveHandler = handler; } - protected transfer(other: CustomEditorInput): CustomEditorInput | undefined { + protected override transfer(other: CustomEditorInput): CustomEditorInput | undefined { if (!super.transfer(other)) { return; } diff --git a/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.ts b/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.ts index 42297ad8f8c636..c143ab6857b4ff 100644 --- a/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.ts +++ b/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.ts @@ -55,7 +55,7 @@ export class CustomEditorInputSerializer extends WebviewEditorInputSerializer { super(webviewWorkbenchService); } - public serialize(input: CustomEditorInput): string | undefined { + public override serialize(input: CustomEditorInput): string | undefined { const dirty = input.isDirty(); const data: SerializedCustomEditor = { ...this.toJson(input), @@ -71,7 +71,7 @@ export class CustomEditorInputSerializer extends WebviewEditorInputSerializer { } } - protected fromJson(data: SerializedCustomEditor): DeserializedCustomEditor { + protected override fromJson(data: SerializedCustomEditor): DeserializedCustomEditor { return { ...super.fromJson(data), editorResource: URI.from(data.editorResource), @@ -79,7 +79,7 @@ export class CustomEditorInputSerializer extends WebviewEditorInputSerializer { }; } - public deserialize( + public override deserialize( _instantiationService: IInstantiationService, serializedEditorInput: string ): CustomEditorInput { diff --git a/src/vs/workbench/contrib/debug/browser/breakpointWidget.ts b/src/vs/workbench/contrib/debug/browser/breakpointWidget.ts index cc8b39633d1172..f075b354d17d81 100644 --- a/src/vs/workbench/contrib/debug/browser/breakpointWidget.ts +++ b/src/vs/workbench/contrib/debug/browser/breakpointWidget.ts @@ -166,7 +166,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi } } - show(rangeOrPos: IRange | IPosition): void { + override show(rangeOrPos: IRange | IPosition): void { const lineNum = this.input.getModel().getLineCount(); super.show(rangeOrPos, lineNum + 1); } @@ -203,7 +203,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi setTimeout(() => this.input.focus(), 150); } - protected _doLayout(heightInPixel: number, widthInPixel: number): void { + protected override _doLayout(heightInPixel: number, widthInPixel: number): void { this.heightInPx = heightInPixel; this.input.layout({ height: heightInPixel, width: widthInPixel - 113 }); this.centerInputVertically(); @@ -336,7 +336,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi this.dispose(); } - dispose(): void { + override dispose(): void { super.dispose(); this.input.dispose(); lifecycle.dispose(this.toDispose); diff --git a/src/vs/workbench/contrib/debug/browser/breakpointsView.ts b/src/vs/workbench/contrib/debug/browser/breakpointsView.ts index fb71bcf669dab9..e911124ca9557d 100644 --- a/src/vs/workbench/contrib/debug/browser/breakpointsView.ts +++ b/src/vs/workbench/contrib/debug/browser/breakpointsView.ts @@ -104,7 +104,7 @@ export class BreakpointsView extends ViewPane { this._register(this.debugService.getModel().onDidChangeBreakpoints(() => this.onBreakpointsChange())); } - renderBody(container: HTMLElement): void { + override renderBody(container: HTMLElement): void { super.renderBody(container); this.element.classList.add('debug-pane'); @@ -174,7 +174,7 @@ export class BreakpointsView extends ViewPane { })); } - focus(): void { + override focus(): void { super.focus(); if (this.list) { this.list.domFocus(); @@ -191,7 +191,7 @@ export class BreakpointsView extends ViewPane { return this._inputBoxData; } - protected layoutBody(height: number, width: number): void { + protected override layoutBody(height: number, width: number): void { if (this.ignoreLayout) { return; } diff --git a/src/vs/workbench/contrib/debug/browser/callStackView.ts b/src/vs/workbench/contrib/debug/browser/callStackView.ts index d81c47ae10fab8..f9512b5161a47f 100644 --- a/src/vs/workbench/contrib/debug/browser/callStackView.ts +++ b/src/vs/workbench/contrib/debug/browser/callStackView.ts @@ -203,7 +203,7 @@ export class CallStackView extends ViewPane { }, 50); } - protected renderHeaderTitle(container: HTMLElement): void { + protected override renderHeaderTitle(container: HTMLElement): void { const titleContainer = dom.append(container, $('.debug-call-stack-title')); super.renderHeaderTitle(titleContainer, this.options.title); @@ -212,7 +212,7 @@ export class CallStackView extends ViewPane { this.stateMessageLabel = dom.append(this.stateMessage, $('span.label')); } - renderBody(container: HTMLElement): void { + override renderBody(container: HTMLElement): void { super.renderBody(container); this.element.classList.add('debug-pane'); container.classList.add('debug-call-stack'); @@ -367,12 +367,12 @@ export class CallStackView extends ViewPane { })); } - layoutBody(height: number, width: number): void { + override layoutBody(height: number, width: number): void { super.layoutBody(height, width); this.tree.layout(height, width); } - focus(): void { + override focus(): void { this.tree.domFocus(); } diff --git a/src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts b/src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts index e5197132f80e5f..fb6c58472b76a1 100644 --- a/src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts +++ b/src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts @@ -67,7 +67,7 @@ export class StartDebugActionViewItem extends BaseActionViewItem { })); } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { this.container = container; container.classList.add('start-debug-action-item'); this.start = dom.append(container, $(ThemeIcon.asCSSSelector(debugStart))); @@ -142,15 +142,15 @@ export class StartDebugActionViewItem extends BaseActionViewItem { this.updateOptions(); } - setActionContext(context: any): void { + override setActionContext(context: any): void { this.context = context; } - isEnabled(): boolean { + override isEnabled(): boolean { return true; } - focus(fromRight?: boolean): void { + override focus(fromRight?: boolean): void { if (fromRight) { this.selectBox.focus(); } else { @@ -159,13 +159,13 @@ export class StartDebugActionViewItem extends BaseActionViewItem { } } - blur(): void { + override blur(): void { this.start.tabIndex = -1; this.selectBox.blur(); this.container.blur(); } - setFocusable(focusable: boolean): void { + override setFocusable(focusable: boolean): void { if (focusable) { this.start.tabIndex = 0; } else { @@ -174,7 +174,7 @@ export class StartDebugActionViewItem extends BaseActionViewItem { } } - dispose(): void { + override dispose(): void { this.toDispose = dispose(this.toDispose); } @@ -292,7 +292,7 @@ export class FocusSessionActionViewItem extends SelectActionViewItem { this.update(selectedSession); } - protected getActionContext(_: string, index: number): any { + protected override getActionContext(_: string, index: number): any { return this.getSessions()[index]; } diff --git a/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts b/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts index 73ad3d564d14d8..b3f7e65f111e32 100644 --- a/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts +++ b/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts @@ -685,7 +685,7 @@ class UserLaunch extends AbstractLaunch implements ILaunch { return nls.localize('user settings', "user settings"); } - get hidden(): boolean { + override get hidden(): boolean { return true; } diff --git a/src/vs/workbench/contrib/debug/browser/debugToolBar.ts b/src/vs/workbench/contrib/debug/browser/debugToolBar.ts index 49fc520816f6f8..eef15c3a7c0126 100644 --- a/src/vs/workbench/contrib/debug/browser/debugToolBar.ts +++ b/src/vs/workbench/contrib/debug/browser/debugToolBar.ts @@ -172,7 +172,7 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution { } } - protected updateStyles(): void { + protected override updateStyles(): void { super.updateStyles(); if (this.$el) { @@ -243,7 +243,7 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution { dom.hide(this.$el); } - dispose(): void { + override dispose(): void { super.dispose(); if (this.$el) { diff --git a/src/vs/workbench/contrib/debug/browser/debugViewlet.ts b/src/vs/workbench/contrib/debug/browser/debugViewlet.ts index d1c14273d551ee..deb151b168b43d 100644 --- a/src/vs/workbench/contrib/debug/browser/debugViewlet.ts +++ b/src/vs/workbench/contrib/debug/browser/debugViewlet.ts @@ -74,12 +74,12 @@ export class DebugViewPaneContainer extends ViewPaneContainer { })); } - create(parent: HTMLElement): void { + override create(parent: HTMLElement): void { super.create(parent); parent.classList.add('debug-viewlet'); } - focus(): void { + override focus(): void { super.focus(); if (this.startDebugActionViewItem) { @@ -89,7 +89,7 @@ export class DebugViewPaneContainer extends ViewPaneContainer { } } - getActionViewItem(action: IAction): IActionViewItem | undefined { + override getActionViewItem(action: IAction): IActionViewItem | undefined { if (action.id === DEBUG_START_COMMAND_ID) { this.startDebugActionViewItem = this.instantiationService.createInstance(StartDebugActionViewItem, null, action); return this.startDebugActionViewItem; @@ -120,7 +120,7 @@ export class DebugViewPaneContainer extends ViewPaneContainer { } } - addPanes(panes: { pane: ViewPane, size: number, index?: number }[]): void { + override addPanes(panes: { pane: ViewPane, size: number, index?: number }[]): void { super.addPanes(panes); for (const { pane: pane } of panes) { @@ -134,7 +134,7 @@ export class DebugViewPaneContainer extends ViewPaneContainer { } } - removePanes(panes: ViewPane[]): void { + override removePanes(panes: ViewPane[]): void { super.removePanes(panes); for (const pane of panes) { dispose(this.paneListeners.get(pane.id)); diff --git a/src/vs/workbench/contrib/debug/browser/exceptionWidget.ts b/src/vs/workbench/contrib/debug/browser/exceptionWidget.ts index 67a12c4892c0fa..430143af84cffe 100644 --- a/src/vs/workbench/contrib/debug/browser/exceptionWidget.ts +++ b/src/vs/workbench/contrib/debug/browser/exceptionWidget.ts @@ -57,7 +57,7 @@ export class ExceptionWidget extends ZoneWidget { }); // style() will trigger _applyStyles } - protected _applyStyles(): void { + protected override _applyStyles(): void { if (this.container) { this.container.style.backgroundColor = this.backgroundColor ? this.backgroundColor.toString() : ''; } @@ -105,7 +105,7 @@ export class ExceptionWidget extends ZoneWidget { container.setAttribute('aria-label', ariaLabel); } - protected _doLayout(_heightInPixel: number | undefined, _widthInPixel: number | undefined): void { + protected override _doLayout(_heightInPixel: number | undefined, _widthInPixel: number | undefined): void { // Reload the height with respect to the exception text content and relayout it to match the line count. this.container!.style.height = 'initial'; diff --git a/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.ts b/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.ts index 40e48c59c3eea2..6a2e78375f3d2c 100644 --- a/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.ts +++ b/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.ts @@ -86,7 +86,7 @@ class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient i } } - async openExtensionDevelopmentHostWindow(args: string[], _env: INullableProcessEnvironment | undefined, _debugRenderer: boolean): Promise { + async override openExtensionDevelopmentHostWindow(args: string[], _env: INullableProcessEnvironment | undefined, _debugRenderer: boolean): Promise { // Add environment parameters required for debug to work const environment = new Map(); diff --git a/src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts b/src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts index 6ebf580c295832..c9733a43bd3103 100644 --- a/src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts +++ b/src/vs/workbench/contrib/debug/browser/loadedScriptsView.ts @@ -271,23 +271,23 @@ class SessionTreeItem extends BaseTreeItem { this._session = session; } - getInternalId(): string { + override getInternalId(): string { return this._session.getId(); } - getSession(): IDebugSession { + override getSession(): IDebugSession { return this._session; } - getHoverLabel(): string | undefined { + override getHoverLabel(): string | undefined { return undefined; } - hasChildren(): boolean { + override hasChildren(): boolean { return true; } - protected compare(a: BaseTreeItem, b: BaseTreeItem): number { + protected override compare(a: BaseTreeItem, b: BaseTreeItem): number { const acat = this.category(a); const bcat = this.category(b); if (acat !== bcat) { @@ -439,7 +439,7 @@ export class LoadedScriptsView extends ViewPane { this.loadedScriptsItemType = CONTEXT_LOADED_SCRIPTS_ITEM_TYPE.bindTo(contextKeyService); } - renderBody(container: HTMLElement): void { + override renderBody(container: HTMLElement): void { super.renderBody(container); this.element.classList.add('debug-pane'); @@ -614,12 +614,12 @@ export class LoadedScriptsView extends ViewPane { this.debugService.getModel().getSessions().forEach(session => addSourcePathsToSession(session)); } - layoutBody(height: number, width: number): void { + override layoutBody(height: number, width: number): void { super.layoutBody(height, width); this.tree.layout(height, width); } - dispose(): void { + override dispose(): void { dispose(this.tree); dispose(this.treeLabels); super.dispose(); diff --git a/src/vs/workbench/contrib/debug/browser/repl.ts b/src/vs/workbench/contrib/debug/browser/repl.ts index 0bc759b8caf64b..d6a9949012df82 100644 --- a/src/vs/workbench/contrib/debug/browser/repl.ts +++ b/src/vs/workbench/contrib/debug/browser/repl.ts @@ -454,7 +454,7 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget { return removeAnsiEscapeCodes(text); } - protected layoutBody(height: number, width: number): void { + protected override layoutBody(height: number, width: number): void { super.layoutBody(height, width); this.dimension = new dom.Dimension(width, height); const replInputHeight = Math.min(this.replInput.getContentHeight(), height); @@ -480,11 +480,11 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget { return this.replInput; } - focus(): void { + override focus(): void { setTimeout(() => this.replInput.focus(), 0); } - getActionViewItem(action: IAction): IActionViewItem | undefined { + override getActionViewItem(action: IAction): IActionViewItem | undefined { if (action.id === selectReplCommandId) { const session = (this.tree ? this.tree.getInput() : undefined) ?? this.debugService.getViewModel().focusedSession; return this.instantiationService.createInstance(SelectReplActionViewItem, action, session); @@ -546,7 +546,7 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget { // --- Creation - protected renderBody(parent: HTMLElement): void { + protected override renderBody(parent: HTMLElement): void { super.renderBody(parent); this.container = dom.append(parent, $('.repl')); this.treeContainer = dom.append(this.container, $(`.repl-tree.${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`)); @@ -686,7 +686,7 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget { this.replInput.setDecorations(DECORATION_KEY, decorations); } - saveState(): void { + override saveState(): void { const replHistory = this.history.getHistory(); if (replHistory.length) { this.storageService.store(HISTORY_STORAGE_KEY, JSON.stringify(replHistory), StorageScope.WORKSPACE, StorageTarget.USER); @@ -705,7 +705,7 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget { super.saveState(); } - dispose(): void { + override dispose(): void { this.replInput.dispose(); if (this.replElementsChangeListener) { this.replElementsChangeListener.dispose(); @@ -790,11 +790,11 @@ registerEditorAction(FilterReplAction); class SelectReplActionViewItem extends FocusSessionActionViewItem { - protected getSessions(): ReadonlyArray { + protected override getSessions(): ReadonlyArray { return this.debugService.getModel().getSessions(true).filter(s => s.hasSeparateRepl() && !sessionsToIgnore.has(s)); } - protected mapFocusedSessionToSelected(focusedSession: IDebugSession): IDebugSession { + protected override mapFocusedSessionToSelected(focusedSession: IDebugSession): IDebugSession { while (focusedSession.parentSession && !focusedSession.hasSeparateRepl()) { focusedSession = focusedSession.parentSession; } diff --git a/src/vs/workbench/contrib/debug/browser/replFilter.ts b/src/vs/workbench/contrib/debug/browser/replFilter.ts index 15f2c7bed6166f..333230c37bc747 100644 --- a/src/vs/workbench/contrib/debug/browser/replFilter.ts +++ b/src/vs/workbench/contrib/debug/browser/replFilter.ts @@ -146,7 +146,7 @@ export class ReplFilterActionViewItem extends BaseActionViewItem { this._register(toDisposable(() => this.delayedFilterUpdate.cancel())); } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { this.container = container; this.container.classList.add('repl-panel-filter-container'); @@ -157,19 +157,19 @@ export class ReplFilterActionViewItem extends BaseActionViewItem { this.updateClass(); } - focus(): void { + override focus(): void { if (this.filterInputBox) { this.filterInputBox.focus(); } } - blur(): void { + override blur(): void { if (this.filterInputBox) { this.filterInputBox.blur(); } } - setFocusable(): void { + override setFocusable(): void { // noop input elements are focusable by default } @@ -177,7 +177,7 @@ export class ReplFilterActionViewItem extends BaseActionViewItem { return this.filterInputBox.getHistory(); } - get trapsArrowNavigation(): boolean { + override get trapsArrowNavigation(): boolean { return true; } diff --git a/src/vs/workbench/contrib/debug/browser/replViewer.ts b/src/vs/workbench/contrib/debug/browser/replViewer.ts index 937976c6395803..d393d97ca5f74d 100644 --- a/src/vs/workbench/contrib/debug/browser/replViewer.ts +++ b/src/vs/workbench/contrib/debug/browser/replViewer.ts @@ -294,7 +294,7 @@ export class ReplDelegate extends CachedListVirtualDelegate { super(); } - getHeight(element: IReplElement): number { + override getHeight(element: IReplElement): number { const config = this.configurationService.getValue('debug'); if (!config.console.wordWrap) { diff --git a/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.ts b/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.ts index 7db7fd1d4530a6..48207bde922c38 100644 --- a/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.ts +++ b/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.ts @@ -54,7 +54,7 @@ export class StatusBarColorProvider extends Themable implements IWorkbenchContri this._register(this.contextService.onDidChangeWorkbenchState(state => this.updateStyles())); } - protected updateStyles(): void { + protected override updateStyles(): void { super.updateStyles(); const container = assertIsDefined(this.layoutService.getContainer(Parts.STATUSBAR_PART)); diff --git a/src/vs/workbench/contrib/debug/browser/variablesView.ts b/src/vs/workbench/contrib/debug/browser/variablesView.ts index 537bf780c48910..19ee0ed8b943aa 100644 --- a/src/vs/workbench/contrib/debug/browser/variablesView.ts +++ b/src/vs/workbench/contrib/debug/browser/variablesView.ts @@ -113,7 +113,7 @@ export class VariablesView extends ViewPane { }, 400); } - renderBody(container: HTMLElement): void { + override renderBody(container: HTMLElement): void { super.renderBody(container); this.element.classList.add('debug-pane'); @@ -182,12 +182,12 @@ export class VariablesView extends ViewPane { })); } - layoutBody(width: number, height: number): void { + override layoutBody(width: number, height: number): void { super.layoutBody(height, width); this.tree.layout(width, height); } - focus(): void { + override focus(): void { this.tree.domFocus(); } diff --git a/src/vs/workbench/contrib/debug/browser/watchExpressionsView.ts b/src/vs/workbench/contrib/debug/browser/watchExpressionsView.ts index 23ee7babf2f7d2..d11740157ef060 100644 --- a/src/vs/workbench/contrib/debug/browser/watchExpressionsView.ts +++ b/src/vs/workbench/contrib/debug/browser/watchExpressionsView.ts @@ -75,7 +75,7 @@ export class WatchExpressionsView extends ViewPane { this.watchItemType = CONTEXT_WATCH_ITEM_TYPE.bindTo(contextKeyService); } - renderBody(container: HTMLElement): void { + override renderBody(container: HTMLElement): void { super.renderBody(container); this.element.classList.add('debug-pane'); @@ -163,12 +163,12 @@ export class WatchExpressionsView extends ViewPane { })); } - layoutBody(height: number, width: number): void { + override layoutBody(height: number, width: number): void { super.layoutBody(height, width); this.tree.layout(height, width); } - focus(): void { + override focus(): void { this.tree.domFocus(); } diff --git a/src/vs/workbench/contrib/debug/browser/welcomeView.ts b/src/vs/workbench/contrib/debug/browser/welcomeView.ts index e33671e73e888c..c418a45ff19f22 100644 --- a/src/vs/workbench/contrib/debug/browser/welcomeView.ts +++ b/src/vs/workbench/contrib/debug/browser/welcomeView.ts @@ -100,7 +100,7 @@ export class WelcomeView extends ViewPane { debugKeybindingLabel = debugKeybinding ? ` (${debugKeybinding.getLabel()})` : ''; } - shouldShowWelcome(): boolean { + override shouldShowWelcome(): boolean { return true; } } diff --git a/src/vs/workbench/contrib/debug/common/debugModel.ts b/src/vs/workbench/contrib/debug/common/debugModel.ts index a72057fba60e3b..44efdbcf49ef8b 100644 --- a/src/vs/workbench/contrib/debug/common/debugModel.ts +++ b/src/vs/workbench/contrib/debug/common/debugModel.ts @@ -208,7 +208,7 @@ export class Expression extends ExpressionContainer implements IExpression { this.available = await this.evaluateExpression(this.name, session, stackFrame, context); } - toString(): string { + override toString(): string { return `${this.name}\n${this.value}`; } } @@ -258,7 +258,7 @@ export class Variable extends ExpressionContainer implements IExpression { } } - toString(): string { + override toString(): string { return this.name ? `${this.name}: ${this.value}` : this.value; } @@ -287,7 +287,7 @@ export class Scope extends ExpressionContainer implements IScope { super(stackFrame.thread.session, stackFrame.thread.threadId, reference, `scope:${name}:${index}`, namedVariables, indexedVariables); } - toString(): string { + override toString(): string { return this.name; } @@ -310,7 +310,7 @@ export class ErrorScope extends Scope { super(stackFrame, index, message, 0, false); } - toString(): string { + override toString(): string { return this.name; } } @@ -700,7 +700,7 @@ export class Breakpoint extends BaseBreakpoint implements IBreakpoint { return this.verified && this.data && typeof this.data.line === 'number' ? this.data.line : this._lineNumber; } - get verified(): boolean { + override get verified(): boolean { if (this.data) { return this.data.verified && !this.textFileService.isDirty(this._uri); } @@ -716,7 +716,7 @@ export class Breakpoint extends BaseBreakpoint implements IBreakpoint { return this.verified && this.data && typeof this.data.column === 'number' ? this.data.column : this._column; } - get message(): string | undefined { + override get message(): string | undefined { if (this.textFileService.isDirty(this.uri)) { return nls.localize('breakpointDirtydHover', "Unverified breakpoint. File is modified, please restart debug session."); } @@ -761,14 +761,14 @@ export class Breakpoint extends BaseBreakpoint implements IBreakpoint { } - setSessionData(sessionId: string, data: IBreakpointSessionData | undefined): void { + override setSessionData(sessionId: string, data: IBreakpointSessionData | undefined): void { super.setSessionData(sessionId, data); if (!this._adapterData) { this._adapterData = this.adapterData; } } - toJSON(): any { + override toJSON(): any { const result = super.toJSON(); result.uri = this._uri; result.lineNumber = this._lineNumber; @@ -778,7 +778,7 @@ export class Breakpoint extends BaseBreakpoint implements IBreakpoint { return result; } - toString(): string { + override toString(): string { return `${resources.basenameOrAuthority(this.uri)} ${this.lineNumber}`; } @@ -814,7 +814,7 @@ export class FunctionBreakpoint extends BaseBreakpoint implements IFunctionBreak super(enabled, hitCondition, condition, logMessage, id); } - toJSON(): any { + override toJSON(): any { const result = super.toJSON(); result.name = this.name; @@ -829,7 +829,7 @@ export class FunctionBreakpoint extends BaseBreakpoint implements IFunctionBreak return this.data.supportsFunctionBreakpoints; } - toString(): string { + override toString(): string { return this.name; } } @@ -851,7 +851,7 @@ export class DataBreakpoint extends BaseBreakpoint implements IDataBreakpoint { super(enabled, hitCondition, condition, logMessage, id); } - toJSON(): any { + override toJSON(): any { const result = super.toJSON(); result.description = this.description; result.dataId = this.dataId; @@ -868,7 +868,7 @@ export class DataBreakpoint extends BaseBreakpoint implements IDataBreakpoint { return this.data.supportsDataBreakpoints; } - toString(): string { + override toString(): string { return this.description; } } @@ -898,7 +898,7 @@ export class ExceptionBreakpoint extends Enablement implements IExceptionBreakpo return result; } - toString(): string { + override toString(): string { return this.label; } } diff --git a/src/vs/workbench/contrib/debug/common/replModel.ts b/src/vs/workbench/contrib/debug/common/replModel.ts index 61fde3f58939b1..0c5f39e939429a 100644 --- a/src/vs/workbench/contrib/debug/common/replModel.ts +++ b/src/vs/workbench/contrib/debug/common/replModel.ts @@ -131,14 +131,14 @@ export class ReplEvaluationResult extends ExpressionContainer implements IReplEl super(undefined, undefined, 0, generateUuid()); } - async evaluateExpression(expression: string, session: IDebugSession | undefined, stackFrame: IStackFrame | undefined, context: string): Promise { + async override evaluateExpression(expression: string, session: IDebugSession | undefined, stackFrame: IStackFrame | undefined, context: string): Promise { const result = await super.evaluateExpression(expression, session, stackFrame, context); this._available = result; return result; } - toString(): string { + override toString(): string { return `${this.value}`; } } diff --git a/src/vs/workbench/contrib/debug/test/browser/callStack.test.ts b/src/vs/workbench/contrib/debug/test/browser/callStack.test.ts index 6fab5782eb85b9..e2eb1fb4f105e8 100644 --- a/src/vs/workbench/contrib/debug/test/browser/callStack.test.ts +++ b/src/vs/workbench/contrib/debug/test/browser/callStack.test.ts @@ -45,7 +45,7 @@ function createTwoStackFrames(session: DebugSession): { firstStackFrame: StackFr let firstStackFrame: StackFrame; let secondStackFrame: StackFrame; const thread = new class extends Thread { - public getCallStack(): StackFrame[] { + public override getCallStack(): StackFrame[] { return [firstStackFrame, secondStackFrame]; } }(session, 'mockthread', 1); @@ -375,7 +375,7 @@ suite('Debug - CallStack', () => { // Add the threads const session = new class extends DebugSession { - get state(): State { + override get state(): State { return State.Stopped; } }(generateUuid(), { resolved: { name: 'stoppedSession', type: 'node', request: 'launch' }, unresolved: undefined }, undefined!, model, undefined, undefined!, undefined!, undefined!, undefined!, undefined!, mockWorkspaceContextService, undefined!, undefined!, NullOpenerService, undefined!, undefined!, mockUriIdentityService, undefined!); diff --git a/src/vs/workbench/contrib/debug/test/browser/debugHover.test.ts b/src/vs/workbench/contrib/debug/test/browser/debugHover.test.ts index 2d9eaeb1a1253a..19b009efad2830 100644 --- a/src/vs/workbench/contrib/debug/test/browser/debugHover.test.ts +++ b/src/vs/workbench/contrib/debug/test/browser/debugHover.test.ts @@ -18,7 +18,7 @@ suite('Debug - Hover', () => { let stackFrame: StackFrame; const thread = new class extends Thread { - public getCallStack(): StackFrame[] { + public override getCallStack(): StackFrame[] { return [stackFrame]; } }(session, 'mockthread', 1); @@ -31,7 +31,7 @@ suite('Debug - Hover', () => { let scope: Scope; stackFrame = new class extends StackFrame { - getScopes(): Promise { + override getScopes(): Promise { return Promise.resolve([scope]); } }(thread, 1, firstSource, 'app.js', 'normal', { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 10 }, 1, true); @@ -40,13 +40,13 @@ suite('Debug - Hover', () => { let variableA: Variable; let variableB: Variable; scope = new class extends Scope { - getChildren(): Promise { + override getChildren(): Promise { return Promise.resolve([variableA]); } }(stackFrame, 1, 'local', 1, false, 10, 10); variableA = new class extends Variable { - getChildren(): Promise { + override getChildren(): Promise { return Promise.resolve([variableB]); } }(session, 1, scope, 2, 'A', 'A', undefined!, 0, 0, {}, 'string'); diff --git a/src/vs/workbench/contrib/debug/test/browser/mockDebug.ts b/src/vs/workbench/contrib/debug/test/browser/mockDebug.ts index 8983f96e3d6637..4e0173b43a64f1 100644 --- a/src/vs/workbench/contrib/debug/test/browser/mockDebug.ts +++ b/src/vs/workbench/contrib/debug/test/browser/mockDebug.ts @@ -593,32 +593,32 @@ class MockDebugStorage extends DebugStorage { super(undefined as any, undefined as any, undefined as any); } - loadBreakpoints(): Breakpoint[] { + override loadBreakpoints(): Breakpoint[] { return []; } - loadFunctionBreakpoints(): FunctionBreakpoint[] { + override loadFunctionBreakpoints(): FunctionBreakpoint[] { return []; } - loadExceptionBreakpoints(): ExceptionBreakpoint[] { + override loadExceptionBreakpoints(): ExceptionBreakpoint[] { return []; } - loadDataBreakpoints(): DataBreakpoint[] { + override loadDataBreakpoints(): DataBreakpoint[] { return []; } - loadWatchExpressions(): Expression[] { + override loadWatchExpressions(): Expression[] { return []; } - storeWatchExpressions(_watchExpressions: (IExpression & IEvaluate)[]): void { } + override storeWatchExpressions(_watchExpressions: (IExpression & IEvaluate)[]): void { } - storeBreakpoints(_debugModel: IDebugModel): void { } + override storeBreakpoints(_debugModel: IDebugModel): void { } } export function createMockDebugModel(): DebugModel { diff --git a/src/vs/workbench/contrib/experiments/test/electron-browser/experimentService.test.ts b/src/vs/workbench/contrib/experiments/test/electron-browser/experimentService.test.ts index ca3ba1e63f1c6a..6fbe6a85644985 100644 --- a/src/vs/workbench/contrib/experiments/test/electron-browser/experimentService.test.ts +++ b/src/vs/workbench/contrib/experiments/test/electron-browser/experimentService.test.ts @@ -58,7 +58,7 @@ function aLocalExtension(name: string = 'someext', manifest: any = {}, propertie } export class TestExperimentService extends ExperimentService { - public getExperiments(): Promise { + public override getExperiments(): Promise { return Promise.resolve(experimentData.experiments); } } diff --git a/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.ts b/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.ts index feae800049d65c..8d9860b56ce584 100644 --- a/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.ts +++ b/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.ts @@ -477,7 +477,7 @@ export class ShowRuntimeExtensionsAction extends Action { super(id, label); } - public async run(e?: any): Promise { + public async override run(e?: any): Promise { await this._editorService.openEditor(RuntimeExtensionsInput.instance, { revealIfOpened: true, pinned: true }); } } diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts index 668c5d01356ee0..44659d993714b8 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsActions.ts @@ -113,7 +113,7 @@ export class PromptExtensionInstallFailureAction extends Action { super('extension.promptExtensionInstallFailure'); } - async run(): Promise { + async override run(): Promise { if (isPromiseCanceledError(this.error)) { return; } @@ -178,11 +178,11 @@ export class ActionWithDropDownAction extends ExtensionAction { private _menuActions: IAction[] = []; get menuActions(): IAction[] { return [...this._menuActions]; } - get extension(): IExtension | null { + override get extension(): IExtension | null { return super.extension; } - set extension(extension: IExtension | null) { + override set extension(extension: IExtension | null) { this.actions.forEach(a => a.extension = extension); super.extension = extension; } @@ -220,7 +220,7 @@ export class ActionWithDropDownAction extends ExtensionAction { this.class = clazz; } - run(): Promise { + override run(): Promise { const enabledActions = this.actions.filter(a => a.enabled); return enabledActions[0].run(); } @@ -259,7 +259,7 @@ export abstract class AbstractInstallAction extends ExtensionAction { } } - async run(): Promise { + async override run(): Promise { if (!this.extension) { return; } @@ -393,7 +393,7 @@ export class InstallAndSyncAction extends AbstractInstallAction { } - update(): void { + override update(): void { super.update(); if (this.enabled) { this.enabled = this.userDataAutoSyncEnablementService.isEnabled() && this.userDataSyncResourceEnablementService.isResourceEnabled(SyncResource.Extensions); @@ -535,7 +535,7 @@ export abstract class InstallInOtherServerAction extends ExtensionAction { return false; } - async run(): Promise { + async override run(): Promise { if (!this.extension) { return; } @@ -607,7 +607,7 @@ export class WebInstallAction extends InstallInOtherServerAction { return localize('install browser', "Install in Browser"); } - protected canInstall(): boolean { + protected override canInstall(): boolean { if (super.canInstall()) { return !!this.extension?.gallery && this.webExtensionsScannerService.canAddExtension(this.extension.gallery); } @@ -663,7 +663,7 @@ export class UninstallAction extends ExtensionAction { this.enabled = true; } - async run(): Promise { + async override run(): Promise { if (!this.extension) { return; } @@ -711,7 +711,7 @@ export class UpdateAction extends ExtensionAction { this.label = this.extension.outdated ? this.getUpdateLabel(this.extension.latestVersion) : this.getUpdateLabel(); } - async run(): Promise { + async override run(): Promise { if (!this.extension) { return; } @@ -747,12 +747,12 @@ export class ExtensionActionWithDropdownActionViewItem extends ActionWithDropdow super(null, action, options, contextMenuProvider); } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { super.render(container); this.updateClass(); } - updateClass(): void { + override updateClass(): void { super.updateClass(); if (this.element && this.dropdownMenuActionViewItem && this.dropdownMenuActionViewItem.element) { this.element.classList.toggle('empty', (this._action).menuActions.length === 0); @@ -780,7 +780,7 @@ export abstract class ExtensionDropDownAction extends ExtensionAction { return this._actionViewItem; } - public run({ actionGroups, disposeActionsOnHide }: { actionGroups: IAction[][], disposeActionsOnHide: boolean }): Promise { + public override run({ actionGroups, disposeActionsOnHide }: { actionGroups: IAction[][], disposeActionsOnHide: boolean }): Promise { if (this._actionViewItem) { this._actionViewItem.showMenu(actionGroups, disposeActionsOnHide); } @@ -917,7 +917,7 @@ export class ManageExtensionAction extends ExtensionDropDownAction { return groups; } - async run(): Promise { + async override run(): Promise { const runtimeExtensions = await this.extensionService.getExtensions(); return super.run({ actionGroups: await this.getActionGroups(runtimeExtensions), disposeActionsOnHide: true }); } @@ -945,7 +945,7 @@ export class ExtensionEditorManageExtensionAction extends ExtensionDropDownActio update(): void { } - run(): Promise { + override run(): Promise { const actionGroups: IAction[][] = []; getContextMenuActions(this.extension, true, this.instantiationService).forEach(actions => actionGroups.push(actions)); actionGroups.forEach(group => group.forEach(extensionAction => { @@ -976,7 +976,7 @@ export class MenuItemExtensionAction extends ExtensionAction { } } - async run(): Promise { + async override run(): Promise { if (this.extension) { await this.action.run(this.extension.identifier.id); } @@ -1002,7 +1002,7 @@ export class InstallAnotherVersionAction extends ExtensionAction { this.enabled = !!this.extension && !this.extension.isBuiltin && !!this.extension.gallery && this.extension.state === ExtensionState.Installed; } - run(): Promise { + override run(): Promise { if (!this.enabled) { return Promise.resolve(); } @@ -1055,7 +1055,7 @@ export class EnableForWorkspaceAction extends ExtensionAction { } } - async run(): Promise { + async override run(): Promise { if (!this.extension) { return; } @@ -1086,7 +1086,7 @@ export class EnableGloballyAction extends ExtensionAction { } } - async run(): Promise { + async override run(): Promise { if (!this.extension) { return; } @@ -1123,7 +1123,7 @@ export class DisableForWorkspaceAction extends ExtensionAction { } } - async run(): Promise { + async override run(): Promise { if (!this.extension) { return; } @@ -1160,7 +1160,7 @@ export class DisableGloballyAction extends ExtensionAction { } } - async run(): Promise { + async override run(): Promise { if (!this.extension) { return; } @@ -1364,7 +1364,7 @@ export class ReloadAction extends ExtensionAction { } } - run(): Promise { + override run(): Promise { return Promise.resolve(this.hostService.reload()); } } @@ -1419,7 +1419,7 @@ export class SetColorThemeAction extends ExtensionAction { this.class = this.enabled ? SetColorThemeAction.EnabledClass : SetColorThemeAction.DisabledClass; } - async run({ showCurrentTheme, ignoreFocusLost }: { showCurrentTheme: boolean, ignoreFocusLost: boolean } = { showCurrentTheme: false, ignoreFocusLost: false }): Promise { + async override run({ showCurrentTheme, ignoreFocusLost }: { showCurrentTheme: boolean, ignoreFocusLost: boolean } = { showCurrentTheme: false, ignoreFocusLost: false }): Promise { this.colorThemes = await this.workbenchThemeService.getColorThemes(); this.update(); @@ -1472,7 +1472,7 @@ export class SetFileIconThemeAction extends ExtensionAction { this.class = this.enabled ? SetFileIconThemeAction.EnabledClass : SetFileIconThemeAction.DisabledClass; } - async run({ showCurrentTheme, ignoreFocusLost }: { showCurrentTheme: boolean, ignoreFocusLost: boolean } = { showCurrentTheme: false, ignoreFocusLost: false }): Promise { + async override run({ showCurrentTheme, ignoreFocusLost }: { showCurrentTheme: boolean, ignoreFocusLost: boolean } = { showCurrentTheme: false, ignoreFocusLost: false }): Promise { this.fileIconThemes = await this.workbenchThemeService.getFileIconThemes(); this.update(); if (!this.enabled) { @@ -1526,7 +1526,7 @@ export class SetProductIconThemeAction extends ExtensionAction { this.class = this.enabled ? SetProductIconThemeAction.EnabledClass : SetProductIconThemeAction.DisabledClass; } - async run({ showCurrentTheme, ignoreFocusLost }: { showCurrentTheme: boolean, ignoreFocusLost: boolean } = { showCurrentTheme: false, ignoreFocusLost: false }): Promise { + async override run({ showCurrentTheme, ignoreFocusLost }: { showCurrentTheme: boolean, ignoreFocusLost: boolean } = { showCurrentTheme: false, ignoreFocusLost: false }): Promise { this.productIconThemes = await this.workbenchThemeService.getProductIconThemes(); this.update(); if (!this.enabled) { @@ -1564,7 +1564,7 @@ export class ShowRecommendedExtensionAction extends Action { this.extensionId = extensionId; } - run(): Promise { + override run(): Promise { return this.viewletService.openViewlet(VIEWLET_ID, true) .then(viewlet => viewlet?.getViewPaneContainer() as IExtensionsViewPaneContainer) .then(viewlet => { @@ -1599,7 +1599,7 @@ export class InstallRecommendedExtensionAction extends Action { this.extensionId = extensionId; } - async run(): Promise { + async override run(): Promise { const viewlet = await this.viewletService.openViewlet(VIEWLET_ID, true); const viewPaneContainer = viewlet?.getViewPaneContainer() as IExtensionsViewPaneContainer; viewPaneContainer.search(`@id:${this.extensionId}`); @@ -1634,7 +1634,7 @@ export class IgnoreExtensionRecommendationAction extends Action { this.enabled = true; } - public run(): Promise { + public override run(): Promise { this.extensionRecommendationsManagementService.toggleGlobalIgnoredRecommendation(this.extension.identifier.id, true); return Promise.resolve(); } @@ -1657,7 +1657,7 @@ export class UndoIgnoreExtensionRecommendationAction extends Action { this.enabled = true; } - public run(): Promise { + public override run(): Promise { this.extensionRecommendationsManagementService.toggleGlobalIgnoredRecommendation(this.extension.identifier.id, false); return Promise.resolve(); } @@ -1672,7 +1672,7 @@ export class SearchExtensionsAction extends Action { super('extensions.searchExtensions', localize('search recommendations', "Search Extensions"), undefined, true); } - async run(): Promise { + async override run(): Promise { const viewPaneContainer = (await this.viewletService.openViewlet(VIEWLET_ID, true))?.getViewPaneContainer() as IExtensionsViewPaneContainer; viewPaneContainer.search(this.searchValue); viewPaneContainer.focus(); @@ -1789,7 +1789,7 @@ export class ConfigureWorkspaceRecommendedExtensionsAction extends AbstractConfi this.enabled = this.contextService.getWorkbenchState() !== WorkbenchState.EMPTY; } - public run(): Promise { + public override run(): Promise { switch (this.contextService.getWorkbenchState()) { case WorkbenchState.FOLDER: return this.openExtensionsFile(this.contextService.getWorkspace().folders[0].toResource(EXTENSIONS_CONFIG)); @@ -1819,7 +1819,7 @@ export class ConfigureWorkspaceFolderRecommendedExtensionsAction extends Abstrac super(id, label, contextService, fileService, textFileService, editorService, jsonEditingService, textModelResolverService); } - public run(): Promise { + public override run(): Promise { const folderCount = this.contextService.getWorkspace().folders.length; const pickFolderPromise = folderCount === 1 ? Promise.resolve(this.contextService.getWorkspace().folders[0]) : this.commandService.executeCommand(PICK_WORKSPACE_FOLDER_COMMAND_ID); return Promise.resolve(pickFolderPromise) @@ -1928,7 +1928,7 @@ export class StatusLabelAction extends Action implements IExtensionContainer { return null; } - run(): Promise { + override run(): Promise { return Promise.resolve(); } @@ -1953,7 +1953,7 @@ export class MaliciousStatusLabelAction extends ExtensionAction { } } - run(): Promise { + override run(): Promise { return Promise.resolve(); } } @@ -1984,7 +1984,7 @@ export class ToggleSyncExtensionAction extends ExtensionDropDownAction { } } - async run(): Promise { + async override run(): Promise { return super.run({ actionGroups: [ [ @@ -2070,7 +2070,7 @@ export class ExtensionToolTipAction extends ExtensionAction { return ''; } - run(): Promise { + override run(): Promise { return Promise.resolve(null); } } @@ -2169,7 +2169,7 @@ export class SystemDisabledWarningAction extends ExtensionAction { } } - run(): Promise { + override run(): Promise { return Promise.resolve(null); } } @@ -2191,11 +2191,11 @@ export class ReinstallAction extends Action { super(id, label); } - get enabled(): boolean { + override get enabled(): boolean { return this.extensionsWorkbenchService.local.filter(l => !l.isBuiltin && l.local).length > 0; } - run(): Promise { + override run(): Promise { return this.quickInputService.pick(this.getEntries(), { placeHolder: localize('selectExtensionToReinstall', "Select Extension to Reinstall") }) .then(pick => pick && this.reinstallExtension(pick.extension)); } @@ -2259,11 +2259,11 @@ export class InstallSpecificVersionOfExtensionAction extends Action { super(id, label); } - get enabled(): boolean { + override get enabled(): boolean { return this.extensionsWorkbenchService.local.some(l => this.isEnabled(l)); } - async run(): Promise { + async override run(): Promise { const extensionPick = await this.quickInputService.pick(this.getExtensionEntries(), { placeHolder: localize('selectExtension', "Select Extension"), matchOnDetail: true }); if (extensionPick && extensionPick.extension) { const versionPick = await this.quickInputService.pick(extensionPick.versions.map(v => ({ id: v.version, label: v.version, description: `${getRelativeDateLabel(new Date(Date.parse(v.date)))}${v.version === extensionPick.extension.version ? ` (${localize('current', "Current")})` : ''}` })), { placeHolder: localize('selectVersion', "Select Version to Install"), matchOnDetail: true }); @@ -2361,7 +2361,7 @@ export abstract class AbstractInstallExtensionsInServerAction extends Action { this.tooltip = this.label; } - async run(): Promise { + async override run(): Promise { return this.selectAndInstallExtensions(); } @@ -2432,7 +2432,7 @@ export class InstallLocalExtensionsInRemoteAction extends AbstractInstallExtensi super('workbench.extensions.actions.installLocalExtensionsInRemote', extensionsWorkbenchService, quickInputService, notificationService, progressService); } - get label(): string { + override get label(): string { if (this.extensionManagementServerService && this.extensionManagementServerService.remoteExtensionManagementServer) { return localize('select and install local extensions', "Install Local Extensions in '{0}'...", this.extensionManagementServerService.remoteExtensionManagementServer.label); } @@ -2485,7 +2485,7 @@ export class InstallRemoteExtensionsInLocalAction extends AbstractInstallExtensi super(id, extensionsWorkbenchService, quickInputService, notificationService, progressService); } - get label(): string { + override get label(): string { return localize('select and install remote extensions', "Install Remote Extensions Locally..."); } diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsViewer.ts b/src/vs/workbench/contrib/extensions/browser/extensionsViewer.ts index a57134fb516264..4185fb859ecfbf 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsViewer.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsViewer.ts @@ -226,7 +226,7 @@ class OpenExtensionAction extends Action { this._extension = extension; } - run(sideByside: boolean): Promise { + override run(sideByside: boolean): Promise { if (this._extension) { return this.extensionsWorkdbenchService.open(this._extension, { sideByside }); } diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts b/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts index 4c1c975a732478..aa403b249bd926 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts @@ -465,7 +465,7 @@ export class ExtensionsViewPaneContainer extends ViewPaneContainer implements IE return this.searchBox?.getValue(); } - create(parent: HTMLElement): void { + override create(parent: HTMLElement): void { parent.classList.add('extensions-viewlet'); this.root = parent; @@ -555,13 +555,13 @@ export class ExtensionsViewPaneContainer extends ViewPaneContainer implements IE super.create(append(this.root, $('.extensions'))); } - focus(): void { + override focus(): void { if (this.searchBox) { this.searchBox.focus(); } } - layout(dimension: Dimension): void { + override layout(dimension: Dimension): void { if (this.root) { this.root.classList.toggle('narrow', dimension.width <= 300); } @@ -571,7 +571,7 @@ export class ExtensionsViewPaneContainer extends ViewPaneContainer implements IE super.layout(new Dimension(dimension.width, dimension.height - 41)); } - getOptimalWidth(): number { + override getOptimalWidth(): number { return 400; } @@ -612,7 +612,7 @@ export class ExtensionsViewPaneContainer extends ViewPaneContainer implements IE : ''; } - saveState(): void { + override saveState(): void { const value = this.searchBox ? this.searchBox.getValue() : ''; if (ExtensionsListView.isLocalExtensionsQuery(value)) { this.searchViewletState['query.value'] = value; @@ -642,7 +642,7 @@ export class ExtensionsViewPaneContainer extends ViewPaneContainer implements IE ))).then(() => undefined); } - protected onDidAddViewDescriptors(added: IAddedViewDescriptorRef[]): ViewPane[] { + protected override onDidAddViewDescriptors(added: IAddedViewDescriptorRef[]): ViewPane[] { const addedViews = super.onDidAddViewDescriptors(added); this.progress(Promise.all(addedViews.map(addedView => (addedView).show(this.normalizedQuery()) diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts b/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts index f9a525c846606b..0ab5c5927eca9c 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsViews.ts @@ -141,7 +141,7 @@ export class ExtensionsListView extends ViewPane { protected registerActions(): void { } - protected renderHeader(container: HTMLElement): void { + protected override renderHeader(container: HTMLElement): void { container.classList.add('extension-view-header'); super.renderHeader(container); @@ -149,7 +149,7 @@ export class ExtensionsListView extends ViewPane { this._register(attachBadgeStyler(this.badge, this.themeService)); } - renderBody(container: HTMLElement): void { + override renderBody(container: HTMLElement): void { super.renderBody(container); const extensionsList = append(container, $('.extensions-list')); @@ -193,7 +193,7 @@ export class ExtensionsListView extends ViewPane { }; } - protected layoutBody(height: number, width: number): void { + protected override layoutBody(height: number, width: number): void { super.layoutBody(height, width); if (this.bodyTemplate) { this.bodyTemplate.extensionsList.style.height = height + 'px'; @@ -908,7 +908,7 @@ export class ExtensionsListView extends ViewPane { return new PagedModel(pager); } - dispose(): void { + override dispose(): void { super.dispose(); if (this.queryRequest) { this.queryRequest.request.cancel(); @@ -979,7 +979,7 @@ export class ExtensionsListView extends ViewPane { return /@recommended:keymaps/i.test(query); } - focus(): void { + override focus(): void { super.focus(); if (!this.list) { return; @@ -994,7 +994,7 @@ export class ExtensionsListView extends ViewPane { export class ServerInstalledExtensionsView extends ExtensionsListView { - async show(query: string): Promise> { + async override show(query: string): Promise> { query = query ? query : '@installed'; if (!ExtensionsListView.isLocalExtensionsQuery(query)) { query = query += ' @installed'; @@ -1006,7 +1006,7 @@ export class ServerInstalledExtensionsView extends ExtensionsListView { export class EnabledExtensionsView extends ExtensionsListView { - async show(query: string): Promise> { + async override show(query: string): Promise> { query = query || '@enabled'; return ExtensionsListView.isEnabledExtensionsQuery(query) ? super.show(query) : this.showEmptyModel(); } @@ -1014,26 +1014,26 @@ export class EnabledExtensionsView extends ExtensionsListView { export class DisabledExtensionsView extends ExtensionsListView { - async show(query: string): Promise> { + async override show(query: string): Promise> { query = query || '@disabled'; return ExtensionsListView.isDisabledExtensionsQuery(query) ? super.show(query) : this.showEmptyModel(); } } export class BuiltInFeatureExtensionsView extends ExtensionsListView { - async show(query: string): Promise> { + async override show(query: string): Promise> { return (query && query.trim() !== '@builtin') ? this.showEmptyModel() : super.show('@builtin:features'); } } export class BuiltInThemesExtensionsView extends ExtensionsListView { - async show(query: string): Promise> { + async override show(query: string): Promise> { return (query && query.trim() !== '@builtin') ? this.showEmptyModel() : super.show('@builtin:themes'); } } export class BuiltInProgrammingLanguageExtensionsView extends ExtensionsListView { - async show(query: string): Promise> { + async override show(query: string): Promise> { return (query && query.trim() !== '@builtin') ? this.showEmptyModel() : super.show('@builtin:basics'); } } @@ -1041,7 +1041,7 @@ export class BuiltInProgrammingLanguageExtensionsView extends ExtensionsListView export class DefaultRecommendedExtensionsView extends ExtensionsListView { private readonly recommendedExtensionsQuery = '@recommended:all'; - renderBody(container: HTMLElement): void { + override renderBody(container: HTMLElement): void { super.renderBody(container); this._register(this.extensionRecommendationsService.onDidChangeRecommendations(() => { @@ -1049,7 +1049,7 @@ export class DefaultRecommendedExtensionsView extends ExtensionsListView { })); } - async show(query: string): Promise> { + async override show(query: string): Promise> { if (query && query.trim() !== this.recommendedExtensionsQuery) { return this.showEmptyModel(); } @@ -1066,7 +1066,7 @@ export class DefaultRecommendedExtensionsView extends ExtensionsListView { export class RecommendedExtensionsView extends ExtensionsListView { private readonly recommendedExtensionsQuery = '@recommended'; - renderBody(container: HTMLElement): void { + override renderBody(container: HTMLElement): void { super.renderBody(container); this._register(this.extensionRecommendationsService.onDidChangeRecommendations(() => { @@ -1074,7 +1074,7 @@ export class RecommendedExtensionsView extends ExtensionsListView { })); } - async show(query: string): Promise> { + async override show(query: string): Promise> { return (query && query.trim() !== this.recommendedExtensionsQuery) ? this.showEmptyModel() : super.show(this.recommendedExtensionsQuery); } } @@ -1082,14 +1082,14 @@ export class RecommendedExtensionsView extends ExtensionsListView { export class WorkspaceRecommendedExtensionsView extends ExtensionsListView implements IWorkspaceRecommendedExtensionsView { private readonly recommendedExtensionsQuery = '@recommended:workspace'; - renderBody(container: HTMLElement): void { + override renderBody(container: HTMLElement): void { super.renderBody(container); this._register(this.extensionRecommendationsService.onDidChangeRecommendations(() => this.show(this.recommendedExtensionsQuery))); this._register(this.contextService.onDidChangeWorkbenchState(() => this.show(this.recommendedExtensionsQuery))); } - async show(query: string): Promise> { + async override show(query: string): Promise> { let shouldShowEmptyView = query && query.trim() !== '@recommended' && query.trim() !== '@recommended:workspace'; let model = await (shouldShowEmptyView ? this.showEmptyModel() : super.show(this.recommendedExtensionsQuery)); this.setExpanded(model.length > 0); diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts index 15ceb5659579ea..c114b95be95f7e 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts @@ -1333,7 +1333,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension this.ignoredAutoUpdateExtensions = this.ignoredAutoUpdateExtensions.filter(extensionId => this.local.some(local => !!local.local && new ExtensionIdentifierWithVersion(local.identifier, local.version).key() === extensionId)); } - dispose(): void { + override dispose(): void { super.dispose(); this.syncDelayer.cancel(); } diff --git a/src/vs/workbench/contrib/extensions/common/extensionsInput.ts b/src/vs/workbench/contrib/extensions/common/extensionsInput.ts index eef812021ea4d3..1a03601c3682da 100644 --- a/src/vs/workbench/contrib/extensions/common/extensionsInput.ts +++ b/src/vs/workbench/contrib/extensions/common/extensionsInput.ts @@ -32,15 +32,15 @@ export class ExtensionsInput extends EditorInput { return ExtensionsInput.ID; } - getName(): string { + override getName(): string { return localize('extensionsInputName', "Extension: {0}", this.extension.displayName); } - supportsSplitEditor(): boolean { + override supportsSplitEditor(): boolean { return false; } - matches(other: unknown): boolean { + override matches(other: unknown): boolean { if (super.matches(other)) { return true; } diff --git a/src/vs/workbench/contrib/extensions/common/runtimeExtensionsInput.ts b/src/vs/workbench/contrib/extensions/common/runtimeExtensionsInput.ts index 8fa384f074a169..df328a2d9b7c85 100644 --- a/src/vs/workbench/contrib/extensions/common/runtimeExtensionsInput.ts +++ b/src/vs/workbench/contrib/extensions/common/runtimeExtensionsInput.ts @@ -29,15 +29,15 @@ export class RuntimeExtensionsInput extends EditorInput { return RuntimeExtensionsInput.ID; } - getName(): string { + override getName(): string { return nls.localize('extensionsInputName', "Running Extensions"); } - supportsSplitEditor(): boolean { + override supportsSplitEditor(): boolean { return false; } - matches(other: unknown): boolean { + override matches(other: unknown): boolean { return other instanceof RuntimeExtensionsInput; } } diff --git a/src/vs/workbench/contrib/extensions/electron-browser/debugExtensionHostAction.ts b/src/vs/workbench/contrib/extensions/electron-browser/debugExtensionHostAction.ts index bd3ea4886c13cb..22095c34251957 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/debugExtensionHostAction.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/debugExtensionHostAction.ts @@ -27,7 +27,7 @@ export class DebugExtensionHostAction extends Action { super(DebugExtensionHostAction.ID, DebugExtensionHostAction.LABEL, DebugExtensionHostAction.CSS_CLASS); } - async run(): Promise { + async override run(): Promise { const inspectPort = await this._extensionService.getInspectPort(false); if (!inspectPort) { diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensionsSlowActions.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensionsSlowActions.ts index d025c2e1316962..53ee0c448971a3 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/extensionsSlowActions.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/extensionsSlowActions.ts @@ -74,7 +74,7 @@ export class SlowExtensionAction extends Action { this.enabled = Boolean(RepoInfo.fromExtension(extension)); } - async run(): Promise { + async override run(): Promise { const action = await this._instantiationService.invokeFunction(createSlowExtensionAction, this.extension, this.profile); if (action) { await action.run(); @@ -127,7 +127,7 @@ class ReportExtensionSlowAction extends Action { super('report.slow', localize('cmd.report', "Report Issue")); } - async run(): Promise { + async override run(): Promise { // rewrite pii (paths) and store on disk const profiler = await import('v8-inspect-profiler'); @@ -171,7 +171,7 @@ class ShowExtensionSlowAction extends Action { super('show.slow', localize('cmd.show', "Show Issues")); } - async run(): Promise { + async override run(): Promise { // rewrite pii (paths) and store on disk const profiler = await import('v8-inspect-profiler'); diff --git a/src/vs/workbench/contrib/extensions/electron-browser/reportExtensionIssueAction.ts b/src/vs/workbench/contrib/extensions/electron-browser/reportExtensionIssueAction.ts index bd4331a381d6ab..d89536ffb4bdaf 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/reportExtensionIssueAction.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/reportExtensionIssueAction.ts @@ -40,7 +40,7 @@ export class ReportExtensionIssueAction extends Action { this.enabled = extension.description.isBuiltin || (!!extension.description.repository && !!extension.description.repository.url); } - async run(): Promise { + async override run(): Promise { if (!this._url) { this._url = await this._generateNewIssueUrl(this.extension); } diff --git a/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts b/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts index 8aba9dd18a13ad..a5c303f843a1fc 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts @@ -134,7 +134,7 @@ export class StartExtensionHostProfileAction extends Action { super(id, label); } - run(): Promise { + override run(): Promise { this._extensionHostProfileService.startProfiling(); return Promise.resolve(); } @@ -151,7 +151,7 @@ export class StopExtensionHostProfileAction extends Action { super(id, label); } - run(): Promise { + override run(): Promise { this._extensionHostProfileService.stopProfiling(); return Promise.resolve(); } @@ -175,7 +175,7 @@ export class SaveExtensionHostProfileAction extends Action { }); } - run(): Promise { + override run(): Promise { return Promise.resolve(this._asyncRun()); } diff --git a/src/vs/workbench/contrib/extensions/electron-sandbox/extensionsActions.ts b/src/vs/workbench/contrib/extensions/electron-sandbox/extensionsActions.ts index 99cd8d052d8f51..ce16a3b34d9718 100644 --- a/src/vs/workbench/contrib/extensions/electron-sandbox/extensionsActions.ts +++ b/src/vs/workbench/contrib/extensions/electron-sandbox/extensionsActions.ts @@ -26,7 +26,7 @@ export class OpenExtensionsFolderAction extends Action { super(id, label, undefined, true); } - async run(): Promise { + async override run(): Promise { const extensionsHome = URI.file(this.environmentService.extensionsPath); const file = await this.fileService.resolve(extensionsHome); diff --git a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionRecommendationsService.test.ts b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionRecommendationsService.test.ts index fdc9e7391101d1..3379afc2e539e3 100644 --- a/src/vs/workbench/contrib/extensions/test/electron-browser/extensionRecommendationsService.test.ts +++ b/src/vs/workbench/contrib/extensions/test/electron-browser/extensionRecommendationsService.test.ts @@ -261,7 +261,7 @@ suite('ExtensionRecommendationsService Test', () => { prompted = false; class TestNotificationService2 extends TestNotificationService { - public prompt(severity: Severity, message: string, choices: IPromptChoice[], options?: IPromptOptions) { + public override prompt(severity: Severity, message: string, choices: IPromptChoice[], options?: IPromptOptions) { prompted = true; promptedEmitter.fire(); return super.prompt(severity, message, choices, options); diff --git a/src/vs/workbench/contrib/feedback/browser/feedback.ts b/src/vs/workbench/contrib/feedback/browser/feedback.ts index 223c6bb7f8703b..9bd1c3ba1081d6 100644 --- a/src/vs/workbench/contrib/feedback/browser/feedback.ts +++ b/src/vs/workbench/contrib/feedback/browser/feedback.ts @@ -92,7 +92,7 @@ export class FeedbackWidget extends Dropdown { this.element.title = nls.localize('sendFeedback', "Tweet Feedback"); } - protected getAnchor(): HTMLElement | IAnchor { + protected override getAnchor(): HTMLElement | IAnchor { const position = dom.getDomNodePagePosition(this.element); return { @@ -103,7 +103,7 @@ export class FeedbackWidget extends Dropdown { }; } - protected renderContents(container: HTMLElement): IDisposable { + protected override renderContents(container: HTMLElement): IDisposable { const disposables = new DisposableStore(); container.classList.add('monaco-menu-container'); @@ -379,7 +379,7 @@ export class FeedbackWidget extends Dropdown { return element; } - show(): void { + override show(): void { super.show(); if (this.options.onFeedbackVisibilityChange) { @@ -389,13 +389,13 @@ export class FeedbackWidget extends Dropdown { this.updateCharCountText(); } - protected onHide(): void { + protected override onHide(): void { if (this.options.onFeedbackVisibilityChange) { this.options.onFeedbackVisibilityChange(false); } } - hide(): void { + override hide(): void { if (this.feedbackDescriptionInput) { this.feedback = this.feedbackDescriptionInput.value; } @@ -412,7 +412,7 @@ export class FeedbackWidget extends Dropdown { super.hide(); } - onEvent(e: Event, activeElement: HTMLElement): void { + override onEvent(e: Event, activeElement: HTMLElement): void { if (e instanceof KeyboardEvent) { const keyboardEvent = e; if (keyboardEvent.keyCode === 27) { // Escape diff --git a/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.ts b/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.ts index 59334b13ead60b..dc9ec77a6034c4 100644 --- a/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.ts +++ b/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.ts @@ -55,7 +55,7 @@ export class BinaryFileEditor extends BaseBinaryResourceEditor { } } - getTitle(): string { + override getTitle(): string { return this.input ? this.input.getName() : nls.localize('binaryFileEditor', "Binary File Viewer"); } } diff --git a/src/vs/workbench/contrib/files/browser/editors/textFileEditor.ts b/src/vs/workbench/contrib/files/browser/editors/textFileEditor.ts index 6bbeff0f38a795..0fe6b4da1d2458 100644 --- a/src/vs/workbench/contrib/files/browser/editors/textFileEditor.ts +++ b/src/vs/workbench/contrib/files/browser/editors/textFileEditor.ts @@ -88,7 +88,7 @@ export class TextFileEditor extends BaseTextEditor { } } - protected onWillCloseEditorInGroup(editor: IEditorInput): void { + protected override onWillCloseEditorInGroup(editor: IEditorInput): void { // React to editors closing to preserve or clear view state. This needs to happen // in the onWillCloseEditor because at that time the editor has not yet @@ -96,15 +96,15 @@ export class TextFileEditor extends BaseTextEditor { this.doSaveOrClearTextEditorViewState(editor); } - getTitle(): string { + override getTitle(): string { return this.input ? this.input.getName() : localize('textFileEditor', "Text File Editor"); } - get input(): FileEditorInput | undefined { + override get input(): FileEditorInput | undefined { return this._input as FileEditorInput; } - async setInput(input: FileEditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { + async override setInput(input: FileEditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { // Update/clear view settings if input changes this.doSaveOrClearTextEditorViewState(this.input); @@ -229,7 +229,7 @@ export class TextFileEditor extends BaseTextEditor { } } - clearInput(): void { + override clearInput(): void { // Update/clear editor view state in settings this.doSaveOrClearTextEditorViewState(this.input); @@ -244,7 +244,7 @@ export class TextFileEditor extends BaseTextEditor { super.clearInput(); } - protected saveState(): void { + protected override saveState(): void { // Update/clear editor view State this.doSaveOrClearTextEditorViewState(this.input); diff --git a/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.ts b/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.ts index 1ef4caee830f88..2efcb9b9418da8 100644 --- a/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.ts +++ b/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.ts @@ -180,7 +180,7 @@ export class TextFileSaveErrorHandler extends Disposable implements ISaveErrorHa this.messages.set(model.resource, handle); } - dispose(): void { + override dispose(): void { super.dispose(); this.messages.clear(); @@ -205,7 +205,7 @@ class ResolveConflictLearnMoreAction extends Action { super('workbench.files.action.resolveConflictLearnMore', localize('learnMore', "Learn More")); } - async run(): Promise { + async override run(): Promise { await this.openerService.open(URI.parse('https://go.microsoft.com/fwlink/?linkid=868264')); } } @@ -218,7 +218,7 @@ class DoNotShowResolveConflictLearnMoreAction extends Action { super('workbench.files.action.resolveConflictLearnMoreDoNotShowAgain', localize('dontShowAgain', "Don't Show Again")); } - async run(notification: IDisposable): Promise { + async override run(notification: IDisposable): Promise { this.storageService.store(LEARN_MORE_DIRTY_WRITE_IGNORE_KEY, true, StorageScope.GLOBAL, StorageTarget.USER); // Hide notification @@ -238,7 +238,7 @@ class ResolveSaveConflictAction extends Action { super('workbench.files.action.resolveConflict', localize('compareChanges', "Compare")); } - async run(): Promise { + async override run(): Promise { if (!this.model.isDisposed()) { const resource = this.model.resource; const name = basename(resource); @@ -269,7 +269,7 @@ class SaveModelElevatedAction extends Action { super('workbench.files.action.saveModelElevated', triedToUnlock ? isWindows ? localize('overwriteElevated', "Overwrite as Admin...") : localize('overwriteElevatedSudo', "Overwrite as Sudo...") : isWindows ? localize('saveElevated', "Retry as Admin...") : localize('saveElevatedSudo', "Retry as Sudo...")); } - async run(): Promise { + async override run(): Promise { if (!this.model.isDisposed()) { await this.model.save({ writeElevated: true, @@ -288,7 +288,7 @@ class RetrySaveModelAction extends Action { super('workbench.files.action.saveModel', localize('retry', "Retry")); } - async run(): Promise { + async override run(): Promise { if (!this.model.isDisposed()) { await this.model.save({ reason: SaveReason.EXPLICIT }); } @@ -303,7 +303,7 @@ class DiscardModelAction extends Action { super('workbench.files.action.discardModel', localize('discard', "Discard")); } - async run(): Promise { + async override run(): Promise { if (!this.model.isDisposed()) { await this.model.revert(); } @@ -320,7 +320,7 @@ class SaveModelAsAction extends Action { super('workbench.files.action.saveModelAs', SAVE_FILE_AS_LABEL); } - async run(): Promise { + async override run(): Promise { if (!this.model.isDisposed()) { const editor = this.findEditor(); if (editor) { @@ -361,7 +361,7 @@ class UnlockModelAction extends Action { super('workbench.files.action.unlock', localize('overwrite', "Overwrite")); } - async run(): Promise { + async override run(): Promise { if (!this.model.isDisposed()) { await this.model.save({ writeUnlock: true, reason: SaveReason.EXPLICIT }); } @@ -376,7 +376,7 @@ class SaveModelIgnoreModifiedSinceAction extends Action { super('workbench.files.action.saveIgnoreModifiedSince', localize('overwrite', "Overwrite")); } - async run(): Promise { + async override run(): Promise { if (!this.model.isDisposed()) { await this.model.save({ ignoreModifiedSince: true, reason: SaveReason.EXPLICIT }); } @@ -391,7 +391,7 @@ class ConfigureSaveConflictAction extends Action { super('workbench.files.action.configureSaveConflict', localize('configure', "Configure")); } - async run(): Promise { + async override run(): Promise { this.preferencesService.openSettings(undefined, 'files.saveConflictResolution'); } } diff --git a/src/vs/workbench/contrib/files/browser/explorerViewlet.ts b/src/vs/workbench/contrib/files/browser/explorerViewlet.ts index dbe99c77bf36b8..306248770a6a1d 100644 --- a/src/vs/workbench/contrib/files/browser/explorerViewlet.ts +++ b/src/vs/workbench/contrib/files/browser/explorerViewlet.ts @@ -192,12 +192,12 @@ export class ExplorerViewPaneContainer extends ViewPaneContainer { this._register(this.contextService.onDidChangeWorkspaceName(e => this.updateTitleArea())); } - create(parent: HTMLElement): void { + override create(parent: HTMLElement): void { super.create(parent); parent.classList.add('explorer-viewlet'); } - protected createView(viewDescriptor: IViewDescriptor, options: IViewletViewOptions): ViewPane { + protected override createView(viewDescriptor: IViewDescriptor, options: IViewletViewOptions): ViewPane { if (viewDescriptor.id === VIEW_ID) { // Create a delegating editor service for the explorer to be able to delay the refresh in the opened // editors view above. This is a workaround for being able to double click on a file to make it pinned @@ -245,12 +245,12 @@ export class ExplorerViewPaneContainer extends ViewPaneContainer { return this.getView(OpenEditorsView.ID); } - public setVisible(visible: boolean): void { + public override setVisible(visible: boolean): void { this.viewletVisibleContextKey.set(visible); super.setVisible(visible); } - focus(): void { + override focus(): void { const explorerView = this.getView(VIEW_ID); if (explorerView && this.panes.every(p => !p.isExpanded())) { explorerView.setExpanded(true); diff --git a/src/vs/workbench/contrib/files/browser/fileActions.ts b/src/vs/workbench/contrib/files/browser/fileActions.ts index 02ebcee876599a..a8eecafced1b1e 100644 --- a/src/vs/workbench/contrib/files/browser/fileActions.ts +++ b/src/vs/workbench/contrib/files/browser/fileActions.ts @@ -448,7 +448,7 @@ export class GlobalCompareResourcesAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const activeInput = this.editorService.activeEditor; const activeResource = EditorResourceAccessor.getOriginalUri(activeInput); if (activeResource && this.textModelService.canHandleResource(activeResource)) { @@ -508,7 +508,7 @@ export class ToggleAutoSaveAction extends Action { super(id, label); } - run(): Promise { + override run(): Promise { return this.filesConfigurationService.toggleAutoSave(); } } @@ -547,7 +547,7 @@ export abstract class BaseSaveAllAction extends Action { } } - async run(context?: unknown): Promise { + async override run(context?: unknown): Promise { try { await this.doRun(context); } catch (error) { @@ -561,7 +561,7 @@ export class SaveAllInGroupAction extends BaseSaveAllAction { static readonly ID = 'workbench.files.action.saveAllInGroup'; static readonly LABEL = nls.localize('saveAllInGroup', "Save All in Group"); - get class(): string { + override get class(): string { return 'explorer-action ' + Codicon.saveAll.classNames; } @@ -579,7 +579,7 @@ export class CloseGroupAction extends Action { super(id, label, Codicon.closeAll.classNames); } - run(context?: unknown): Promise { + override run(context?: unknown): Promise { return this.commandService.executeCommand(CLOSE_EDITORS_AND_GROUP_COMMAND_ID, {}, context); } } @@ -597,7 +597,7 @@ export class FocusFilesExplorer extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { await this.viewletService.openViewlet(VIEWLET_ID, true); } } @@ -617,7 +617,7 @@ export class ShowActiveFileInExplorer extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const resource = EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor, { supportSideBySide: SideBySideEditor.PRIMARY }); if (resource) { this.commandService.executeCommand(REVEAL_IN_EXPLORER_COMMAND_ID, resource); @@ -643,7 +643,7 @@ export class ShowOpenedFileInNewWindow extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const fileResource = EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor, { supportSideBySide: SideBySideEditor.PRIMARY }); if (fileResource) { if (this.fileService.canHandleResource(fileResource)) { @@ -755,7 +755,7 @@ export class CompareWithClipboardAction extends Action { this.enabled = true; } - async run(): Promise { + async override run(): Promise { const resource = EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor, { supportSideBySide: SideBySideEditor.PRIMARY }); const scheme = `clipboardCompare${CompareWithClipboardAction.SCHEME_COUNTER++}`; if (resource && (this.fileService.canHandleResource(resource) || resource.scheme === Schemas.untitled)) { @@ -778,7 +778,7 @@ export class CompareWithClipboardAction extends Action { } } - dispose(): void { + override dispose(): void { super.dispose(); dispose(this.registrationDisposal); diff --git a/src/vs/workbench/contrib/files/browser/views/emptyView.ts b/src/vs/workbench/contrib/files/browser/views/emptyView.ts index 7e70f008f29a3a..d36b245d996461 100644 --- a/src/vs/workbench/contrib/files/browser/views/emptyView.ts +++ b/src/vs/workbench/contrib/files/browser/views/emptyView.ts @@ -45,11 +45,11 @@ export class EmptyView extends ViewPane { this._register(this.labelService.onDidChangeFormatters(() => this.refreshTitle())); } - shouldShowWelcome(): boolean { + override shouldShowWelcome(): boolean { return true; } - protected renderBody(container: HTMLElement): void { + protected override renderBody(container: HTMLElement): void { super.renderBody(container); this._register(new DragAndDropObserver(container, { diff --git a/src/vs/workbench/contrib/files/browser/views/explorerView.ts b/src/vs/workbench/contrib/files/browser/views/explorerView.ts index 05f26f13526b7f..f8512b1715b597 100644 --- a/src/vs/workbench/contrib/files/browser/views/explorerView.ts +++ b/src/vs/workbench/contrib/files/browser/views/explorerView.ts @@ -207,11 +207,11 @@ export class ExplorerView extends ViewPane { return this.labelService.getWorkspaceLabel(this.contextService.getWorkspace()); } - get title(): string { + override get title(): string { return this.name; } - set title(_: string) { + override set title(_: string) { // noop } @@ -232,7 +232,7 @@ export class ExplorerView extends ViewPane { // Split view methods - protected renderHeader(container: HTMLElement): void { + protected override renderHeader(container: HTMLElement): void { super.renderHeader(container); // Expand on drag over @@ -252,12 +252,12 @@ export class ExplorerView extends ViewPane { setHeader(); } - protected layoutBody(height: number, width: number): void { + protected override layoutBody(height: number, width: number): void { super.layoutBody(height, width); this.tree.layout(height, width); } - renderBody(container: HTMLElement): void { + override renderBody(container: HTMLElement): void { super.renderBody(container); this.container = container; @@ -297,7 +297,7 @@ export class ExplorerView extends ViewPane { })); } - focus(): void { + override focus(): void { this.tree.domFocus(); const focused = this.tree.getFocus(); @@ -621,7 +621,7 @@ export class ExplorerView extends ViewPane { } } - getOptimalWidth(): number { + override getOptimalWidth(): number { const parentNode = this.tree.getHTMLElement(); const childNodes = ([] as HTMLElement[]).slice.call(parentNode.querySelectorAll('.explorer-item .label-name')); // select all file labels @@ -835,7 +835,7 @@ export class ExplorerView extends ViewPane { } } - dispose(): void { + override dispose(): void { if (this.dragHandler) { this.dragHandler.dispose(); } diff --git a/src/vs/workbench/contrib/files/browser/views/openEditorsView.ts b/src/vs/workbench/contrib/files/browser/views/openEditorsView.ts index 81912c52f465b4..71f7d47cdddc2a 100644 --- a/src/vs/workbench/contrib/files/browser/views/openEditorsView.ts +++ b/src/vs/workbench/contrib/files/browser/views/openEditorsView.ts @@ -192,7 +192,7 @@ export class OpenEditorsView extends ViewPane { })); } - protected renderHeaderTitle(container: HTMLElement): void { + protected override renderHeaderTitle(container: HTMLElement): void { super.renderHeaderTitle(container, this.title); const count = dom.append(container, $('.count')); @@ -214,7 +214,7 @@ export class OpenEditorsView extends ViewPane { this.updateDirtyIndicator(); } - renderBody(container: HTMLElement): void { + override renderBody(container: HTMLElement): void { super.renderBody(container); container.classList.add('open-editors'); @@ -309,7 +309,7 @@ export class OpenEditorsView extends ViewPane { })); } - focus(): void { + override focus(): void { super.focus(); this.list.domFocus(); } @@ -318,7 +318,7 @@ export class OpenEditorsView extends ViewPane { return this.list; } - protected layoutBody(height: number, width: number): void { + protected override layoutBody(height: number, width: number): void { super.layoutBody(height, width); if (this.list) { this.list.layout(height, width); @@ -467,7 +467,7 @@ export class OpenEditorsView extends ViewPane { this.structuralRefreshDelay = delay; } - getOptimalWidth(): number { + override getOptimalWidth(): number { let parentNode = this.list.getHTMLElement(); let childNodes: HTMLElement[] = [].slice.call(parentNode.querySelectorAll('.open-editor > a')); @@ -492,7 +492,7 @@ interface IEditorGroupTemplateData { class OpenEditorActionRunner extends ActionRunner { public editor: OpenEditor | undefined; - async run(action: IAction): Promise { + async override run(action: IAction): Promise { if (!this.editor) { return; } diff --git a/src/vs/workbench/contrib/files/common/editors/fileEditorInput.ts b/src/vs/workbench/contrib/files/common/editors/fileEditorInput.ts index 530f47bd49c582..6b8989a45c75d5 100644 --- a/src/vs/workbench/contrib/files/common/editors/fileEditorInput.ts +++ b/src/vs/workbench/contrib/files/common/editors/fileEditorInput.ts @@ -88,7 +88,7 @@ export class FileEditorInput extends AbstractTextResourceEditorInput implements } } - protected registerListeners(): void { + protected override registerListeners(): void { super.registerListeners(); // Attach to model that matches our resource once created @@ -131,7 +131,7 @@ export class FileEditorInput extends AbstractTextResourceEditorInput implements return FILE_EDITOR_INPUT_ID; } - getName(): string { + override getName(): string { return this.preferredName || this.decorateLabel(super.getName()); } @@ -155,7 +155,7 @@ export class FileEditorInput extends AbstractTextResourceEditorInput implements return this.preferredName; } - getDescription(verbosity?: Verbosity): string | undefined { + override getDescription(verbosity?: Verbosity): string | undefined { return this.preferredDescription || super.getDescription(verbosity); } @@ -175,7 +175,7 @@ export class FileEditorInput extends AbstractTextResourceEditorInput implements return this.preferredDescription; } - getTitle(verbosity: Verbosity): string { + override getTitle(verbosity: Verbosity): string { switch (verbosity) { case Verbosity.SHORT: return this.decorateLabel(super.getName()); @@ -241,11 +241,11 @@ export class FileEditorInput extends AbstractTextResourceEditorInput implements this.forceOpenAs = ForceOpenAs.Binary; } - isDirty(): boolean { + override isDirty(): boolean { return !!(this.model?.isDirty()); } - isReadonly(): boolean { + override isReadonly(): boolean { if (this.model) { return this.model.isReadonly(); } @@ -253,7 +253,7 @@ export class FileEditorInput extends AbstractTextResourceEditorInput implements return super.isReadonly(); } - isSaving(): boolean { + override isSaving(): boolean { if (this.model?.hasState(TextFileEditorModelState.SAVED) || this.model?.hasState(TextFileEditorModelState.CONFLICT) || this.model?.hasState(TextFileEditorModelState.ERROR)) { return false; // require the model to be dirty and not in conflict or error state } @@ -266,11 +266,11 @@ export class FileEditorInput extends AbstractTextResourceEditorInput implements return super.isSaving(); } - getPreferredEditorId(candidates: string[]): string { + override getPreferredEditorId(candidates: string[]): string { return this.forceOpenAs === ForceOpenAs.Binary ? BINARY_FILE_EDITOR_ID : TEXT_FILE_EDITOR_ID; } - resolve(): Promise { + override resolve(): Promise { // Resolve as binary if (this.forceOpenAs === ForceOpenAs.Binary) { @@ -338,7 +338,7 @@ export class FileEditorInput extends AbstractTextResourceEditorInput implements return !!this.model; } - rename(group: GroupIdentifier, target: URI): IMoveResult { + override rename(group: GroupIdentifier, target: URI): IMoveResult { return { editor: { resource: target, @@ -362,7 +362,7 @@ export class FileEditorInput extends AbstractTextResourceEditorInput implements return undefined; } - matches(otherInput: unknown): boolean { + override matches(otherInput: unknown): boolean { if (otherInput === this) { return true; } @@ -374,7 +374,7 @@ export class FileEditorInput extends AbstractTextResourceEditorInput implements return false; } - dispose(): void { + override dispose(): void { // Model this.model = undefined; diff --git a/src/vs/workbench/contrib/files/common/workspaceWatcher.ts b/src/vs/workbench/contrib/files/common/workspaceWatcher.ts index 1534bdc86083dd..7f6ec9c638480d 100644 --- a/src/vs/workbench/contrib/files/common/workspaceWatcher.ts +++ b/src/vs/workbench/contrib/files/common/workspaceWatcher.ts @@ -143,7 +143,7 @@ export class WorkspaceWatcher extends Disposable { this.watches.clear(); } - dispose(): void { + override dispose(): void { super.dispose(); this.unwatchWorkspaces(); diff --git a/src/vs/workbench/contrib/files/electron-sandbox/textFileEditor.ts b/src/vs/workbench/contrib/files/electron-sandbox/textFileEditor.ts index d79e4a0820123d..c5a07f93a9d4cc 100644 --- a/src/vs/workbench/contrib/files/electron-sandbox/textFileEditor.ts +++ b/src/vs/workbench/contrib/files/electron-sandbox/textFileEditor.ts @@ -50,7 +50,7 @@ export class NativeTextFileEditor extends TextFileEditor { super(telemetryService, fileService, viewletService, instantiationService, contextService, storageService, textResourceConfigurationService, editorService, themeService, editorGroupService, textFileService, explorerService, uriIdentityService); } - protected handleSetInputError(error: Error, input: FileEditorInput, options: EditorOptions | undefined): void { + protected override handleSetInputError(error: Error, input: FileEditorInput, options: EditorOptions | undefined): void { // Allow to restart with higher memory limit if the file is too large if ((error).fileOperationResult === FileOperationResult.FILE_EXCEEDS_MEMORY_LIMIT) { diff --git a/src/vs/workbench/contrib/files/test/browser/fileEditorInput.test.ts b/src/vs/workbench/contrib/files/test/browser/fileEditorInput.test.ts index 5bc0b1c119ebf8..b82dd23a1e4154 100644 --- a/src/vs/workbench/contrib/files/test/browser/fileEditorInput.test.ts +++ b/src/vs/workbench/contrib/files/test/browser/fileEditorInput.test.ts @@ -34,7 +34,7 @@ suite('Files - FileEditorInput', () => { instantiationService = workbenchInstantiationService({ editorService: () => { return new class extends TestEditorService { - createEditorInput(input: IResourceEditorInput) { + override createEditorInput(input: IResourceEditorInput) { return createFileInput(input.resource); } }; diff --git a/src/vs/workbench/contrib/issue/electron-sandbox/issueActions.ts b/src/vs/workbench/contrib/issue/electron-sandbox/issueActions.ts index 8b8422eed467da..79b6607dd351da 100644 --- a/src/vs/workbench/contrib/issue/electron-sandbox/issueActions.ts +++ b/src/vs/workbench/contrib/issue/electron-sandbox/issueActions.ts @@ -20,7 +20,7 @@ export class OpenProcessExplorer extends Action { super(id, label); } - run(): Promise { + override run(): Promise { return this.issueService.openProcessExplorer(); } } @@ -37,7 +37,7 @@ export class ReportPerformanceIssueUsingReporterAction extends Action { super(id, label); } - run(): Promise { + override run(): Promise { return this.issueService.openReporter({ issueType: IssueType.PerformanceIssue }); } } diff --git a/src/vs/workbench/contrib/localizations/browser/localizationsActions.ts b/src/vs/workbench/contrib/localizations/browser/localizationsActions.ts index 1304e66558145d..f5636c2102514e 100644 --- a/src/vs/workbench/contrib/localizations/browser/localizationsActions.ts +++ b/src/vs/workbench/contrib/localizations/browser/localizationsActions.ts @@ -44,7 +44,7 @@ export class ConfigureLocaleAction extends Action { .concat({ label: localize('installAdditionalLanguages', "Install additional languages...") }); } - public async run(): Promise { + public async override run(): Promise { const languageOptions = await this.getLanguageOptions(); const currentLanguageIndex = languageOptions.findIndex(l => l.label === language); diff --git a/src/vs/workbench/contrib/logs/common/logsActions.ts b/src/vs/workbench/contrib/logs/common/logsActions.ts index f19eb8a8fed0a3..7ad4c630cd8fd3 100644 --- a/src/vs/workbench/contrib/logs/common/logsActions.ts +++ b/src/vs/workbench/contrib/logs/common/logsActions.ts @@ -25,7 +25,7 @@ export class SetLogLevelAction extends Action { super(id, label); } - run(): Promise { + override run(): Promise { const current = this.logService.getLevel(); const entries = [ { label: nls.localize('trace', "Trace"), level: LogLevel.Trace, description: this.getDescription(LogLevel.Trace, current) }, @@ -72,7 +72,7 @@ export class OpenWindowSessionLogFileAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const sessionResult = await this.quickInputService.pick( this.getSessions().then(sessions => sessions.map((s, index) => ({ id: s.toString(), diff --git a/src/vs/workbench/contrib/logs/electron-sandbox/logsActions.ts b/src/vs/workbench/contrib/logs/electron-sandbox/logsActions.ts index cd377536bf77ed..cbe21096c1cba1 100644 --- a/src/vs/workbench/contrib/logs/electron-sandbox/logsActions.ts +++ b/src/vs/workbench/contrib/logs/electron-sandbox/logsActions.ts @@ -23,7 +23,7 @@ export class OpenLogsFolderAction extends Action { super(id, label); } - run(): Promise { + override run(): Promise { return this.nativeHostService.showItemInFolder(URI.file(join(this.environmentService.logsPath, 'main.log')).fsPath); } } @@ -41,7 +41,7 @@ export class OpenExtensionLogsFolderAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const folderStat = await this.fileService.resolve(this.environmentSerice.extHostLogsPath); if (folderStat.children && folderStat.children[0]) { return this.nativeHostService.showItemInFolder(folderStat.children[0].resource.fsPath); diff --git a/src/vs/workbench/contrib/markers/browser/markersTreeViewer.ts b/src/vs/workbench/contrib/markers/browser/markersTreeViewer.ts index f66d8357d6743a..3b56e25be94344 100644 --- a/src/vs/workbench/contrib/markers/browser/markersTreeViewer.ts +++ b/src/vs/workbench/contrib/markers/browser/markersTreeViewer.ts @@ -262,12 +262,12 @@ const toggleMultilineAction = 'problems.action.toggleMultiline'; class ToggleMultilineActionViewItem extends ActionViewItem { - render(container: HTMLElement): void { + override render(container: HTMLElement): void { super.render(container); this.updateExpandedAttribute(); } - updateClass(): void { + override updateClass(): void { super.updateClass(); this.updateExpandedAttribute(); } @@ -857,7 +857,7 @@ export class MarkersViewModel extends Disposable { } } - dispose(): void { + override dispose(): void { this.markersViewStates.forEach(({ disposables }) => dispose(disposables)); this.markersViewStates.clear(); this.markersPerResource.clear(); diff --git a/src/vs/workbench/contrib/markers/browser/markersView.ts b/src/vs/workbench/contrib/markers/browser/markersView.ts index 5f257dc27c9db2..ddab4379a4a1c0 100644 --- a/src/vs/workbench/contrib/markers/browser/markersView.ts +++ b/src/vs/workbench/contrib/markers/browser/markersView.ts @@ -146,7 +146,7 @@ export class MarkersView extends ViewPane implements IMarkersView { })); } - public renderBody(parent: HTMLElement): void { + public override renderBody(parent: HTMLElement): void { super.renderBody(parent); parent.classList.add('markers-panel'); @@ -168,7 +168,7 @@ export class MarkersView extends ViewPane implements IMarkersView { return Messages.MARKERS_PANEL_TITLE_PROBLEMS; } - public layoutBody(height: number, width: number): void { + public override layoutBody(height: number, width: number): void { super.layoutBody(height, width); const wasSmallLayout = this.smallLayout; this.smallLayout = width < 600 && height > 100; @@ -187,7 +187,7 @@ export class MarkersView extends ViewPane implements IMarkersView { this.filters.layout = new dom.Dimension(this.smallLayout ? width : width - 200, height); } - public focus(): void { + public override focus(): void { if (this.tree && this.tree.getHTMLElement() === document.activeElement) { return; } @@ -808,7 +808,7 @@ export class MarkersView extends ViewPane implements IMarkersView { return this.tree?.getFocus()[0] || undefined; } - public getActionViewItem(action: IAction): IActionViewItem | undefined { + public override getActionViewItem(action: IAction): IActionViewItem | undefined { if (action.id === `workbench.actions.treeView.${this.id}.filter`) { return this.instantiationService.createInstance(MarkersFilterActionViewItem, action, this); } @@ -864,7 +864,7 @@ export class MarkersView extends ViewPane implements IMarkersView { this.telemetryService.publicLog('problems.filter', data); } - saveState(): void { + override saveState(): void { this.panelState['filter'] = this.filters.filterText; this.panelState['filterHistory'] = this.filters.filterHistory; this.panelState['showErrors'] = this.filters.showErrors; @@ -877,7 +877,7 @@ export class MarkersView extends ViewPane implements IMarkersView { super.saveState(); } - dispose() { + override dispose() { super.dispose(); } @@ -901,7 +901,7 @@ class MarkersTree extends WorkbenchObjectTree { super(user, container, delegate, renderers, options, contextKeyService, listService, themeService, configurationService, keybindingService, accessibilityService); } - layout(height: number, width: number): void { + override layout(height: number, width: number): void { this.container.style.height = `${height}px`; super.layout(height, width); } diff --git a/src/vs/workbench/contrib/markers/browser/markersViewActions.ts b/src/vs/workbench/contrib/markers/browser/markersViewActions.ts index 708f6d6eaad9df..f34cc274754115 100644 --- a/src/vs/workbench/contrib/markers/browser/markersViewActions.ts +++ b/src/vs/workbench/contrib/markers/browser/markersViewActions.ts @@ -166,7 +166,7 @@ class FiltersDropdownMenuActionViewItem extends DropdownMenuActionViewItem { ); } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { super.render(container); this.updateChecked(); } @@ -227,7 +227,7 @@ class FiltersDropdownMenuActionViewItem extends DropdownMenuActionViewItem { ]; } - updateChecked(): void { + override updateChecked(): void { this.element!.classList.toggle('checked', this._action.checked); } @@ -265,7 +265,7 @@ export class MarkersFilterActionViewItem extends BaseActionViewItem { this._register(markersView.filters.onDidChange(e => this.onDidFiltersChange(e))); } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { this.container = container; this.container.classList.add('markers-panel-action-filter-container'); @@ -278,23 +278,23 @@ export class MarkersFilterActionViewItem extends BaseActionViewItem { this.adjustInputBox(); } - focus(): void { + override focus(): void { if (this.filterInputBox) { this.filterInputBox.focus(); } } - blur(): void { + override blur(): void { if (this.filterInputBox) { this.filterInputBox.blur(); } } - setFocusable(): void { + override setFocusable(): void { // noop input elements are focusable by default } - get trapsArrowNavigation(): boolean { + override get trapsArrowNavigation(): boolean { return true; } @@ -427,7 +427,7 @@ export class MarkersFilterActionViewItem extends BaseActionViewItem { } } - protected updateClass(): void { + protected override updateClass(): void { if (this.element && this.container) { this.element.className = this.class; this.container.classList.toggle('grow', this.element.classList.contains('grow')); @@ -474,7 +474,7 @@ export class QuickFixAction extends Action { super(QuickFixAction.ID, Messages.MARKERS_PANEL_ACTION_TOOLTIP_QUICKFIX, QuickFixAction.CLASS, false); } - run(): Promise { + override run(): Promise { this._onShowQuickFixes.fire(); return Promise.resolve(); } @@ -488,7 +488,7 @@ export class QuickFixActionViewItem extends ActionViewItem { super(null, action, { icon: true, label: false }); } - public onClick(event: DOM.EventLike): void { + public override onClick(event: DOM.EventLike): void { DOM.EventHelper.stop(event, true); this.showQuickFixes(); } diff --git a/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/test/notebookClipboard.test.ts b/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/test/notebookClipboard.test.ts index 1864f4597dd5e3..ede86215825b3f 100644 --- a/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/test/notebookClipboard.test.ts +++ b/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/test/notebookClipboard.test.ts @@ -18,16 +18,16 @@ import { NotebookCellTextModel } from 'vs/workbench/contrib/notebook/common/mode suite('Notebook Clipboard', () => { const createEditorService = (editor: IActiveNotebookEditor) => { const visibleEditorPane = new class extends mock() { - getId(): string { + override getId(): string { return NOTEBOOK_EDITOR_ID; } - getControl(): INotebookEditor { + override getControl(): INotebookEditor { return editor; } }; const editorService: IEditorService = new class extends mock() { - get activeEditorPane(): IVisibleEditorPane | undefined { + override get activeEditorPane(): IVisibleEditorPane | undefined { return visibleEditorPane; } }; @@ -112,8 +112,8 @@ suite('Notebook Clipboard', () => { let _cells: NotebookCellTextModel[] = []; accessor.stub(INotebookService, new class extends mock() { - setToCopy(cells: NotebookCellTextModel[]) { _cells = cells; } - getToCopy() { return { items: _cells, isCopy: true }; } + override setToCopy(cells: NotebookCellTextModel[]) { _cells = cells; } + override getToCopy() { return { items: _cells, isCopy: true }; } }); const clipboardContrib = new NotebookClipboardContribution(createEditorService(editor)); @@ -154,8 +154,8 @@ suite('Notebook Clipboard', () => { ], async (editor, accessor) => { accessor.stub(INotebookService, new class extends mock() { - setToCopy() { } - getToCopy() { + override setToCopy() { } + override getToCopy() { return { items: [ editor.viewModel.cellAt(0)!.model @@ -190,8 +190,8 @@ suite('Notebook Clipboard', () => { async (editor, accessor) => { let _toCopy: NotebookCellTextModel[] = []; accessor.stub(INotebookService, new class extends mock() { - setToCopy(toCopy: NotebookCellTextModel[]) { _toCopy = toCopy; } - getToCopy() { + override setToCopy(toCopy: NotebookCellTextModel[]) { _toCopy = toCopy; } + override getToCopy() { return { items: _toCopy, isCopy: true @@ -220,8 +220,8 @@ suite('Notebook Clipboard', () => { ], async (editor, accessor) => { accessor.stub(INotebookService, new class extends mock() { - setToCopy() { } - getToCopy() { + override setToCopy() { } + override getToCopy() { return { items: [], isCopy: true }; } }); @@ -262,8 +262,8 @@ suite('Notebook Clipboard', () => { ], async (editor, accessor) => { accessor.stub(INotebookService, new class extends mock() { - setToCopy() { } - getToCopy() { + override setToCopy() { } + override getToCopy() { return { items: [], isCopy: true }; } }); @@ -287,8 +287,8 @@ suite('Notebook Clipboard', () => { ], async (editor, accessor) => { accessor.stub(INotebookService, new class extends mock() { - setToCopy() { } - getToCopy() { + override setToCopy() { } + override getToCopy() { return { items: [], isCopy: true }; } }); diff --git a/src/vs/workbench/contrib/notebook/browser/contrib/coreActions.ts b/src/vs/workbench/contrib/notebook/browser/contrib/coreActions.ts index e0c074a60415f0..6b4974eaeb8306 100644 --- a/src/vs/workbench/contrib/notebook/browser/contrib/coreActions.ts +++ b/src/vs/workbench/contrib/notebook/browser/contrib/coreActions.ts @@ -221,7 +221,7 @@ export abstract class NotebookCellAction extends return undefined; } - async run(accessor: ServicesAccessor, context?: INotebookCellActionContext, ...additionalArgs: any[]): Promise { + async override run(accessor: ServicesAccessor, context?: INotebookCellActionContext, ...additionalArgs: any[]): Promise { if (this.isCellActionContext(context)) { const telemetryService = accessor.get(ITelemetryService); telemetryService.publicLog2('workbenchActionExecuted', { id: this.desc.id, from: 'cellToolbar' }); @@ -305,7 +305,7 @@ registerAction2(class ExecuteCell extends NotebookCellAction { }); } - getCellContextFromArgs(accessor: ServicesAccessor, context?: ICellRange, ...additionalArgs: any[]): INotebookCellActionContext | undefined { + override getCellContextFromArgs(accessor: ServicesAccessor, context?: ICellRange, ...additionalArgs: any[]): INotebookCellActionContext | undefined { if (!context) { return; } @@ -396,7 +396,7 @@ registerAction2(class CancelExecuteCell extends NotebookCellAction { }); } - getCellContextFromArgs(accessor: ServicesAccessor, context?: ICellRange, ...additionalArgs: any[]): INotebookCellActionContext | undefined { + override getCellContextFromArgs(accessor: ServicesAccessor, context?: ICellRange, ...additionalArgs: any[]): INotebookCellActionContext | undefined { if (!context || typeof context.start !== 'number' || typeof context.end !== 'number' || context.start >= context.end) { return; } @@ -554,7 +554,7 @@ registerAction2(class extends NotebookAction { }); } - getEditorContextFromArgsOrActive(accessor: ServicesAccessor, context?: UriComponents): INotebookActionContext | undefined { + override getEditorContextFromArgsOrActive(accessor: ServicesAccessor, context?: UriComponents): INotebookActionContext | undefined { return getContextFromUri(accessor, context) ?? getContextFromActiveEditor(accessor.get(IEditorService)); } @@ -608,7 +608,7 @@ registerAction2(class CancelNotebook extends NotebookAction { }); } - getEditorContextFromArgsOrActive(accessor: ServicesAccessor, context?: UriComponents): INotebookActionContext | undefined { + override getEditorContextFromArgsOrActive(accessor: ServicesAccessor, context?: UriComponents): INotebookActionContext | undefined { return getContextFromUri(accessor, context) ?? getContextFromActiveEditor(accessor.get(IEditorService)); } @@ -810,7 +810,7 @@ registerAction2(class extends NotebookAction { }); } - async run(accessor: ServicesAccessor, context?: INotebookActionContext): Promise { + async override run(accessor: ServicesAccessor, context?: INotebookActionContext): Promise { context = context ?? this.getEditorContextFromArgsOrActive(accessor); if (context) { this.runWithContext(accessor, context); @@ -835,7 +835,7 @@ registerAction2(class extends NotebookAction { }); } - async run(accessor: ServicesAccessor, context?: INotebookActionContext): Promise { + async override run(accessor: ServicesAccessor, context?: INotebookActionContext): Promise { context = context ?? this.getEditorContextFromArgsOrActive(accessor); if (context) { this.runWithContext(accessor, context); @@ -1375,7 +1375,7 @@ export class ChangeCellLanguageAction extends NotebookCellAction { }); } - protected getCellContextFromArgs(accessor: ServicesAccessor, context?: ICellRange, ...additionalArgs: any[]): IChangeCellContext | undefined { + protected override getCellContextFromArgs(accessor: ServicesAccessor, context?: ICellRange, ...additionalArgs: any[]): IChangeCellContext | undefined { if (!context || typeof context.start !== 'number' || typeof context.end !== 'number' || context.start >= context.end) { return; } diff --git a/src/vs/workbench/contrib/notebook/browser/contrib/find/findController.ts b/src/vs/workbench/contrib/notebook/browser/contrib/find/findController.ts index 1fcab2227dcf57..e2febb837cc1ce 100644 --- a/src/vs/workbench/contrib/notebook/browser/contrib/find/findController.ts +++ b/src/vs/workbench/contrib/notebook/browser/contrib/find/findController.ts @@ -270,7 +270,7 @@ export class NotebookFindWidget extends SimpleFindReplaceWidget implements INote }); } - show(initialInput?: string): void { + override show(initialInput?: string): void { super.show(initialInput); this._findInput.select(); @@ -312,7 +312,7 @@ export class NotebookFindWidget extends SimpleFindReplaceWidget implements INote } } - hide() { + override hide() { super.hide(); this.set([], false); @@ -341,7 +341,7 @@ export class NotebookFindWidget extends SimpleFindReplaceWidget implements INote this._findMatches = []; } - dispose() { + override dispose() { this._notebookEditor?.removeClassName(FIND_SHOW_TRANSITION); this._notebookEditor?.removeClassName(FIND_HIDE_TRANSITION); super.dispose(); diff --git a/src/vs/workbench/contrib/notebook/browser/contrib/outline/test/notebookOutline.test.ts b/src/vs/workbench/contrib/notebook/browser/contrib/outline/test/notebookOutline.test.ts index f06e3f8a775bbb..f1e7fe845ba515 100644 --- a/src/vs/workbench/contrib/notebook/browser/contrib/outline/test/notebookOutline.test.ts +++ b/src/vs/workbench/contrib/notebook/browser/contrib/outline/test/notebookOutline.test.ts @@ -23,8 +23,8 @@ suite('Notebook Outline', function () { instantiationService.set(IEditorService, new class extends mock() { }); instantiationService.set(IMarkerService, new MarkerService()); instantiationService.set(IThemeService, new class extends mock() { - onDidFileIconThemeChange = Event.None; - getFileIconTheme(): IFileIconTheme { + override onDidFileIconThemeChange = Event.None; + override getFileIconTheme(): IFileIconTheme { return { hasFileIcons: true, hasFolderIcons: true, hidesExplorerArrows: false }; } }); diff --git a/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.ts b/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.ts index 2e8c382e66de5a..cc7576ee80aed5 100644 --- a/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.ts +++ b/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.ts @@ -77,7 +77,7 @@ export class TroubleshootController extends Disposable implements INotebookEdito })); } - dispose() { + override dispose() { dispose(this._cellStateListeners); super.dispose(); } diff --git a/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.ts b/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.ts index 299ba0f0345794..397e3512c5b0c5 100644 --- a/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.ts +++ b/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.ts @@ -745,7 +745,7 @@ abstract class AbstractElementRenderer extends Disposable { this.templateData.bottomBorder.style.top = `${this.cell.layoutInfo.totalHeight - 32}px`; } - dispose() { + override dispose() { if (this._outputEditor) { this.cell.saveOutputEditorViewState(this._outputEditor.saveViewState()); } @@ -807,7 +807,7 @@ abstract class SingleSideDiffElement extends AbstractElementRenderer { this._diagonalFill = this.templateData.diagonalFill; } - buildBody() { + override buildBody() { const body = this.templateData.body; this._diffEditorContainer = this.templateData.diffEditorContainer; body.classList.remove('left', 'right', 'full'); @@ -1101,7 +1101,7 @@ export class DeletedElement extends SingleSideDiffElement { } } - dispose() { + override dispose() { if (this._editor) { this.cell.saveSpirceEditorViewState(this._editor.saveViewState()); } @@ -1251,7 +1251,7 @@ export class InsertElement extends SingleSideDiffElement { }); } - dispose() { + override dispose() { if (this._editor) { this.cell.saveSpirceEditorViewState(this._editor.saveViewState()); } @@ -1598,7 +1598,7 @@ export class ModifiedElement extends AbstractElementRenderer { }); } - dispose() { + override dispose() { if (this._editor) { this.cell.saveSpirceEditorViewState(this._editor.saveViewState()); } diff --git a/src/vs/workbench/contrib/notebook/browser/diff/notebookTextDiffEditor.ts b/src/vs/workbench/contrib/notebook/browser/diff/notebookTextDiffEditor.ts index 1ed00f27ebea43..ef7e28ece694fe 100644 --- a/src/vs/workbench/contrib/notebook/browser/diff/notebookTextDiffEditor.ts +++ b/src/vs/workbench/contrib/notebook/browser/diff/notebookTextDiffEditor.ts @@ -284,7 +284,7 @@ export class NotebookTextDiffEditor extends EditorPane implements INotebookTextD } } - async setInput(input: NotebookDiffEditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { + async override setInput(input: NotebookDiffEditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { await super.setInput(input, options, context, token); const model = await input.resolve(); @@ -652,19 +652,19 @@ export class NotebookTextDiffEditor extends EditorPane implements INotebookTextD return this._overflowContainer; } - getControl(): NotebookEditorWidget | undefined { + override getControl(): NotebookEditorWidget | undefined { return undefined; } - setEditorVisible(visible: boolean, group: IEditorGroup | undefined): void { + override setEditorVisible(visible: boolean, group: IEditorGroup | undefined): void { super.setEditorVisible(visible, group); } - focus() { + override focus() { super.focus(); } - clearInput(): void { + override clearInput(): void { super.clearInput(); this._modifiedResourceDisposableStore.clear(); @@ -772,7 +772,7 @@ export class NotebookTextDiffEditor extends EditorPane implements INotebookTextD this._eventDispatcher?.emit([new NotebookDiffLayoutChangedEvent({ width: true, fontInfo: true }, this.getLayoutInfo())]); } - dispose() { + override dispose() { this._isDisposed = true; super.dispose(); } diff --git a/src/vs/workbench/contrib/notebook/browser/diff/notebookTextDiffList.ts b/src/vs/workbench/contrib/notebook/browser/diff/notebookTextDiffList.ts index ce2bc9c6ec2423..4d5dd5f06c7ea1 100644 --- a/src/vs/workbench/contrib/notebook/browser/diff/notebookTextDiffList.ts +++ b/src/vs/workbench/contrib/notebook/browser/diff/notebookTextDiffList.ts @@ -321,7 +321,7 @@ export class NotebookTextDiffList extends WorkbenchList { + async override save(group: GroupIdentifier, options?: ISaveOptions): Promise { if (this._modifiedTextModel) { if (this.isUntitled()) { @@ -112,7 +112,7 @@ export class NotebookDiffEditorInput extends EditorInput { return undefined; } - async saveAs(group: GroupIdentifier, options?: ISaveOptions): Promise { + async override saveAs(group: GroupIdentifier, options?: ISaveOptions): Promise { if (!this._modifiedTextModel || !this.viewType) { return undefined; } @@ -156,7 +156,7 @@ ${patterns} } // called when users rename a notebook document - rename(group: GroupIdentifier, target: URI): IMoveResult | undefined { + override rename(group: GroupIdentifier, target: URI): IMoveResult | undefined { if (this._modifiedTextModel) { const contributedNotebookProviders = this._notebookService.getContributedNotebookProviders(target); @@ -171,7 +171,7 @@ ${patterns} return undefined; } - async revert(group: GroupIdentifier, options?: IRevertOptions): Promise { + async override revert(group: GroupIdentifier, options?: IRevertOptions): Promise { if (this._modifiedTextModel && this._modifiedTextModel.object.isDirty()) { await this._modifiedTextModel.object.revert(options); } @@ -179,7 +179,7 @@ ${patterns} return; } - async resolve(): Promise { + async override resolve(): Promise { if (!await this._notebookService.canResolve(this.viewType!)) { return null; } @@ -199,7 +199,7 @@ ${patterns} return new NotebookDiffEditorModel(this._originalTextModel.object, this._modifiedTextModel.object); } - matches(otherInput: unknown): boolean { + override matches(otherInput: unknown): boolean { if (this === otherInput) { return true; } @@ -210,7 +210,7 @@ ${patterns} return false; } - dispose() { + override dispose() { this._modifiedTextModel?.dispose(); this._modifiedTextModel = null; this._originalTextModel?.dispose(); diff --git a/src/vs/workbench/contrib/notebook/browser/notebookEditor.ts b/src/vs/workbench/contrib/notebook/browser/notebookEditor.ts index 719420f6cc97a1..90260e8437ecf9 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebookEditor.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebookEditor.ts @@ -43,7 +43,7 @@ export class NotebookEditor extends EditorPane { // todo@rebornix is there a reason that `super.fireOnDidFocus` isn't used? private readonly _onDidFocusWidget = this._register(new Emitter()); - get onDidFocus(): Event { return this._onDidFocusWidget.event; } + override get onDidFocus(): Event { return this._onDidFocusWidget.event; } private readonly _onDidChangeModel = this._register(new Emitter()); readonly onDidChangeModel: Event = this._onDidChangeModel.event; @@ -69,15 +69,15 @@ export class NotebookEditor extends EditorPane { return this._widget.value?.viewModel; } - get minimumWidth(): number { return 375; } - get maximumWidth(): number { return Number.POSITIVE_INFINITY; } + override get minimumWidth(): number { return 375; } + override get maximumWidth(): number { return Number.POSITIVE_INFINITY; } // these setters need to exist because this extends from EditorPane - set minimumWidth(value: number) { /*noop*/ } - set maximumWidth(value: number) { /*noop*/ } + override set minimumWidth(value: number) { /*noop*/ } + override set maximumWidth(value: number) { /*noop*/ } //#region Editor Core - get scopedContextKeyService(): IContextKeyService | undefined { + override get scopedContextKeyService(): IContextKeyService | undefined { return this._widget.value?.scopedContextKeyService; } @@ -93,11 +93,11 @@ export class NotebookEditor extends EditorPane { return this._rootElement; } - getControl(): NotebookEditorWidget | undefined { + override getControl(): NotebookEditorWidget | undefined { return this._widget.value; } - setEditorVisible(visible: boolean, group: IEditorGroup | undefined): void { + override setEditorVisible(visible: boolean, group: IEditorGroup | undefined): void { super.setEditorVisible(visible, group); if (group) { this._groupListener.clear(); @@ -118,19 +118,19 @@ export class NotebookEditor extends EditorPane { } } - focus() { + override focus() { super.focus(); this._widget.value?.focus(); } - hasFocus(): boolean { + override hasFocus(): boolean { const activeElement = document.activeElement; const value = this._widget.value; return !!value && (DOM.isAncestor(activeElement, value.getDomNode() || DOM.isAncestor(activeElement, value.getOverflowContainerDomNode()))); } - async setInput(input: NotebookEditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { + async override setInput(input: NotebookEditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { const startTime = Date.now(); const group = this.group!; @@ -216,7 +216,7 @@ export class NotebookEditor extends EditorPane { }); } - clearInput(): void { + override clearInput(): void { if (this._widget.value) { this._saveEditorViewState(this.input); this._widget.value.onWillHide(); @@ -224,14 +224,14 @@ export class NotebookEditor extends EditorPane { super.clearInput(); } - setOptions(options: EditorOptions | undefined): void { + override setOptions(options: EditorOptions | undefined): void { if (options instanceof NotebookEditorOptions) { this._widget.value?.setOptions(options); } super.setOptions(options); } - protected saveState(): void { + protected override saveState(): void { this._saveEditorViewState(this.input); super.saveState(); } @@ -293,7 +293,7 @@ export class NotebookEditor extends EditorPane { //#endregion - dispose() { + override dispose() { super.dispose(); } diff --git a/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts b/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts index 70ee6307f1d42c..53f2902e4f8b1f 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts @@ -2379,7 +2379,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor //#endregion - dispose() { + override dispose() { this._isDisposed = true; // dispose webview first this._webview?.dispose(); diff --git a/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.ts b/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.ts index d2457355670833..47b705295e96d3 100644 --- a/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.ts +++ b/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.ts @@ -625,19 +625,19 @@ export class NotebookCellList extends WorkbenchList implements ID this.setSelection(indices); } - focusNext(n: number | undefined, loop: boolean | undefined, browserEvent?: UIEvent, filter?: (element: CellViewModel) => boolean): void { + override focusNext(n: number | undefined, loop: boolean | undefined, browserEvent?: UIEvent, filter?: (element: CellViewModel) => boolean): void { this._focusNextPreviousDelegate.onFocusNext(() => { super.focusNext(n, loop, browserEvent, filter); }); } - focusPrevious(n: number | undefined, loop: boolean | undefined, browserEvent?: UIEvent, filter?: (element: CellViewModel) => boolean): void { + override focusPrevious(n: number | undefined, loop: boolean | undefined, browserEvent?: UIEvent, filter?: (element: CellViewModel) => boolean): void { this._focusNextPreviousDelegate.onFocusPrevious(() => { super.focusPrevious(n, loop, browserEvent, filter); }); } - setFocus(indexes: number[], browserEvent?: UIEvent, ignoreTextModelUpdate?: boolean): void { + override setFocus(indexes: number[], browserEvent?: UIEvent, ignoreTextModelUpdate?: boolean): void { if (ignoreTextModelUpdate) { super.setFocus(indexes, browserEvent); return; @@ -665,7 +665,7 @@ export class NotebookCellList extends WorkbenchList implements ID super.setFocus(indexes, browserEvent); } - setSelection(indexes: number[], browserEvent?: UIEvent | undefined, ignoreTextModelUpdate?: boolean) { + override setSelection(indexes: number[], browserEvent?: UIEvent | undefined, ignoreTextModelUpdate?: boolean) { if (ignoreTextModelUpdate) { super.setSelection(indexes, browserEvent); return; @@ -867,7 +867,7 @@ export class NotebookCellList extends WorkbenchList implements ID } // override - domFocus() { + override domFocus() { const focused = this.getFocusedElements()[0]; const focusedDomElement = focused && this.domElementOfElement(focused); @@ -1128,7 +1128,7 @@ export class NotebookCellList extends WorkbenchList implements ID } - style(styles: IListStyles) { + override style(styles: IListStyles) { const selectorSuffix = this.view.domId; if (!this.styleElement) { this.styleElement = DOM.createStyleSheet(this.view.domNode); @@ -1251,7 +1251,7 @@ export class NotebookCellList extends WorkbenchList implements ID return this.view.renderHeight; } - layout(height?: number, width?: number): void { + override layout(height?: number, width?: number): void { this._isInLayout = true; super.layout(height, width); if (this.renderHeight === 0) { @@ -1262,7 +1262,7 @@ export class NotebookCellList extends WorkbenchList implements ID this._isInLayout = false; } - dispose() { + override dispose() { this._isDisposed = true; this._viewModelStore.dispose(); this._localDisposableStore.dispose(); diff --git a/src/vs/workbench/contrib/notebook/browser/view/output/transforms/richTransform.ts b/src/vs/workbench/contrib/notebook/browser/view/output/transforms/richTransform.ts index cfba7650b01a68..4285b38c02a025 100644 --- a/src/vs/workbench/contrib/notebook/browser/view/output/transforms/richTransform.ts +++ b/src/vs/workbench/contrib/notebook/browser/view/output/transforms/richTransform.ts @@ -195,15 +195,15 @@ class StreamRendererContrib extends Disposable implements IOutputRendererContrib } class StderrRendererContrib extends StreamRendererContrib { - getType() { + override getType() { return RenderOutputType.Mainframe; } - getMimetypes() { + override getMimetypes() { return ['application/x.notebook.stderr']; } - render(output: ICellOutputViewModel, items: IOutputItemDto[], container: HTMLElement, notebookUri: URI | undefined): IRenderOutput { + override render(output: ICellOutputViewModel, items: IOutputItemDto[], container: HTMLElement, notebookUri: URI | undefined): IRenderOutput { const result = super.render(output, items, container, notebookUri); container.classList.add('error'); return result; diff --git a/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts b/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts index f74dde00d2c03a..b8dbec50a9e52d 100644 --- a/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts +++ b/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts @@ -1551,7 +1551,7 @@ var requirejs = (function() { this._preloadsCache.clear(); } - dispose() { + override dispose() { this._disposed = true; this.webview?.dispose(); super.dispose(); diff --git a/src/vs/workbench/contrib/notebook/browser/view/renderers/cellActionView.ts b/src/vs/workbench/contrib/notebook/browser/view/renderers/cellActionView.ts index 886a0e942c94af..b12e001352efd6 100644 --- a/src/vs/workbench/contrib/notebook/browser/view/renderers/cellActionView.ts +++ b/src/vs/workbench/contrib/notebook/browser/view/renderers/cellActionView.ts @@ -26,7 +26,7 @@ export class VerticalSeparator extends Action { } export class VerticalSeparatorViewItem extends BaseActionViewItem { - render(container: HTMLElement) { + override render(container: HTMLElement) { container.classList.add('verticalSeparator'); // const iconContainer = DOM.append(container, $('.verticalSeparator')); // DOM.addClasses(iconContainer, 'codicon', 'codicon-chrome-minimize'); @@ -89,7 +89,7 @@ export class CodiconActionViewItem extends MenuEntryActionViewItem { ) { super(_action, keybindingService, notificationService); } - updateLabel(): void { + override updateLabel(): void { if (this.options.label && this.label) { DOM.reset(this.label, ...renderLabelWithIcons(this._commandAction.label ?? '')); } diff --git a/src/vs/workbench/contrib/notebook/browser/view/renderers/cellOutput.ts b/src/vs/workbench/contrib/notebook/browser/view/renderers/cellOutput.ts index e374f742ab376b..5f377b78618f6e 100644 --- a/src/vs/workbench/contrib/notebook/browser/view/renderers/cellOutput.ts +++ b/src/vs/workbench/contrib/notebook/browser/view/renderers/cellOutput.ts @@ -335,7 +335,7 @@ export class CellOutputElement extends Disposable { this.notebookEditor.layoutNotebookCell(this.viewCell, this.viewCell.layoutInfo.totalHeight); } - dispose() { + override dispose() { this.viewCell.updateOutputMinHeight(0); if (this._outputHeightTimer) { @@ -600,7 +600,7 @@ export class CellOutputContainer extends Disposable { this.notebookEditor.layoutNotebookCell(this.viewCell, this.viewCell.layoutInfo.totalHeight); } - dispose() { + override dispose() { this.viewCell.updateOutputMinHeight(0); if (this._outputHeightTimer) { diff --git a/src/vs/workbench/contrib/notebook/browser/view/renderers/cellWidgets.ts b/src/vs/workbench/contrib/notebook/browser/view/renderers/cellWidgets.ts index 88c3cccfcb7ef8..73c4163fd75965 100644 --- a/src/vs/workbench/contrib/notebook/browser/view/renderers/cellWidgets.ts +++ b/src/vs/workbench/contrib/notebook/browser/view/renderers/cellWidgets.ts @@ -332,7 +332,7 @@ export class BrowserResizeObserver extends Disposable implements IResizeObserver this.observer.unobserve(this.referenceDomElement!); } - dispose(): void { + override dispose(): void { this.observer.disconnect(); super.dispose(); } diff --git a/src/vs/workbench/contrib/notebook/browser/view/renderers/codeCell.ts b/src/vs/workbench/contrib/notebook/browser/view/renderers/codeCell.ts index f514f7b087fef2..635553709bbd42 100644 --- a/src/vs/workbench/contrib/notebook/browser/view/renderers/codeCell.ts +++ b/src/vs/workbench/contrib/notebook/browser/view/renderers/codeCell.ts @@ -353,7 +353,7 @@ export class CodeCell extends Disposable { this.notebookEditor.layoutNotebookCell(this.viewCell, this.viewCell.layoutInfo.totalHeight); } - dispose() { + override dispose() { this.viewCell.detachTextEditor(); this._outputContainerRenderer.dispose(); this._activeCellRunPlaceholder?.dispose(); diff --git a/src/vs/workbench/contrib/notebook/browser/view/renderers/markdownCell.ts b/src/vs/workbench/contrib/notebook/browser/view/renderers/markdownCell.ts index 93c27645e2788b..3c290aa3e113db 100644 --- a/src/vs/workbench/contrib/notebook/browser/view/renderers/markdownCell.ts +++ b/src/vs/workbench/contrib/notebook/browser/view/renderers/markdownCell.ts @@ -275,7 +275,7 @@ export class StatefulMarkdownCell extends Disposable { updatePlaceholder(); } - dispose() { + override dispose() { this.localDisposables.dispose(); this.viewCell.detachTextEditor(); super.dispose(); diff --git a/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.ts b/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.ts index 0534d20e2b5899..1750fe55b64e60 100644 --- a/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.ts +++ b/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.ts @@ -481,7 +481,7 @@ export abstract class BaseCellViewModel extends Disposable { }; } - dispose() { + override dispose() { super.dispose(); if (this._textModelRef) { diff --git a/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.ts b/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.ts index 338cf970aa9f89..7d2bb561157abd 100644 --- a/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.ts +++ b/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.ts @@ -211,7 +211,7 @@ export class CodeCellViewModel extends BaseCellViewModel implements ICellViewMod this._onDidChangeLayout.fire(state); } - restoreEditorViewState(editorViewStates: editorCommon.ICodeEditorViewState | null, totalHeight?: number) { + override restoreEditorViewState(editorViewStates: editorCommon.ICodeEditorViewState | null, totalHeight?: number) { super.restoreEditorViewState(editorViewStates); if (totalHeight !== undefined && this._layoutInfo.layoutState !== CodeCellLayoutState.Measured) { this._layoutInfo = { @@ -354,7 +354,7 @@ export class CodeCellViewModel extends BaseCellViewModel implements ICellViewMod }; } - dispose() { + override dispose() { super.dispose(); } } diff --git a/src/vs/workbench/contrib/notebook/browser/viewModel/markdownCellViewModel.ts b/src/vs/workbench/contrib/notebook/browser/viewModel/markdownCellViewModel.ts index 6274f6df6c272b..e21a257663afa7 100644 --- a/src/vs/workbench/contrib/notebook/browser/viewModel/markdownCellViewModel.ts +++ b/src/vs/workbench/contrib/notebook/browser/viewModel/markdownCellViewModel.ts @@ -171,7 +171,7 @@ export class MarkdownCellViewModel extends BaseCellViewModel implements ICellVie this._onDidChangeLayout.fire(state); } - restoreEditorViewState(editorViewStates: editorCommon.ICodeEditorViewState | null, totalHeight?: number) { + override restoreEditorViewState(editorViewStates: editorCommon.ICodeEditorViewState | null, totalHeight?: number) { super.restoreEditorViewState(editorViewStates); // we might already warmup the viewport so the cell has a total height computed if (totalHeight !== undefined && this._layoutInfo.totalHeight === 0) { diff --git a/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModel.ts b/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModel.ts index d08ee1d5a3284a..2fda333e40bac2 100644 --- a/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModel.ts +++ b/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModel.ts @@ -1139,7 +1139,7 @@ export class NotebookViewModel extends Disposable implements EditorFoldingStateD return this._notebook === notebook; } - dispose() { + override dispose() { this._localStore.clear(); this._viewCells.forEach(cell => { cell.dispose(); diff --git a/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.ts b/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.ts index dca7e4c9f5c935..87992bbb6cf0ad 100644 --- a/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.ts +++ b/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.ts @@ -203,7 +203,7 @@ export class NotebookCellTextModel extends Disposable implements ICell { return ref; } - dispose() { + override dispose() { // Manually release reference to previous text buffer to avoid large leaks // in case someone leaks a CellTextModel reference const emptyDisposedTextBuffer = new PieceTreeTextBuffer([], '', '\n', false, false, true, true); diff --git a/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.ts b/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.ts index 8f616f20038066..2dafa089bbbfcd 100644 --- a/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.ts +++ b/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.ts @@ -287,7 +287,7 @@ export class NotebookTextModel extends Disposable implements INotebookTextModel this._cells.splice(0, 0, ...mainCells); } - dispose() { + override dispose() { this._onWillDispose.fire(); dispose(this._cellListeners.values()); dispose(this._cells); diff --git a/src/vs/workbench/contrib/notebook/common/notebookEditorInput.ts b/src/vs/workbench/contrib/notebook/common/notebookEditorInput.ts index fd316656cd9773..5b1cb4743ee603 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookEditorInput.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookEditorInput.ts @@ -48,7 +48,7 @@ export class NotebookEditorInput extends EditorInput { this._name = labelService.getUriBasenameLabel(resource); } - dispose() { + override dispose() { this._editorModelReference?.dispose(); this._editorModelReference = null; super.dispose(); @@ -58,26 +58,26 @@ export class NotebookEditorInput extends EditorInput { return NotebookEditorInput.ID; } - getName(): string { + override getName(): string { return this._name; } - isDirty() { + override isDirty() { if (!this._editorModelReference) { return this._defaultDirtyState; } return this._editorModelReference.object.isDirty(); } - isUntitled(): boolean { + override isUntitled(): boolean { return this.resource.scheme === Schemas.untitled; } - isReadonly() { + override isReadonly() { return false; } - async save(group: GroupIdentifier, options?: ISaveOptions): Promise { + async override save(group: GroupIdentifier, options?: ISaveOptions): Promise { if (this._editorModelReference) { if (this.isUntitled()) { @@ -92,7 +92,7 @@ export class NotebookEditorInput extends EditorInput { return undefined; } - async saveAs(group: GroupIdentifier, options?: ISaveOptions): Promise { + async override saveAs(group: GroupIdentifier, options?: ISaveOptions): Promise { if (!this._editorModelReference) { return undefined; } @@ -133,7 +133,7 @@ export class NotebookEditorInput extends EditorInput { } // called when users rename a notebook document - rename(group: GroupIdentifier, target: URI): IMoveResult | undefined { + override rename(group: GroupIdentifier, target: URI): IMoveResult | undefined { if (this._editorModelReference) { const contributedNotebookProviders = this._notebookService.getContributedNotebookProviders(target); @@ -149,13 +149,13 @@ export class NotebookEditorInput extends EditorInput { return { editor: editorInput }; } - async revert(_group: GroupIdentifier, options?: IRevertOptions): Promise { + async override revert(_group: GroupIdentifier, options?: IRevertOptions): Promise { if (this._editorModelReference && this._editorModelReference.object.isDirty()) { await this._editorModelReference.object.revert(options); } } - async resolve(): Promise { + async override resolve(): Promise { if (!await this._notebookService.canResolve(this.viewType)) { return null; } @@ -178,7 +178,7 @@ export class NotebookEditorInput extends EditorInput { return this._editorModelReference.object; } - matches(otherInput: unknown): boolean { + override matches(otherInput: unknown): boolean { if (this === otherInput) { return true; } diff --git a/src/vs/workbench/contrib/notebook/common/notebookEditorModel.ts b/src/vs/workbench/contrib/notebook/common/notebookEditorModel.ts index c1639d1a2fdb1a..fca5e90159866c 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookEditorModel.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookEditorModel.ts @@ -98,7 +98,7 @@ export class ComplexNotebookEditorModel extends EditorModel implements INotebook })); } - isResolved(): this is IResolvedNotebookEditorModel { + override isResolved(): this is IResolvedNotebookEditorModel { return this.notebook !== undefined; } @@ -406,7 +406,7 @@ export class SimpleNotebookEditorModel extends EditorModel implements INotebookE super(); } - dispose(): void { + override dispose(): void { this._workingCopyListeners.dispose(); this._workingCopy?.dispose(); this._onDidChangeDirty.dispose(); @@ -418,7 +418,7 @@ export class SimpleNotebookEditorModel extends EditorModel implements INotebookE return this._workingCopy?.model.notebookModel; } - isResolved(): this is IResolvedNotebookEditorModel { + override isResolved(): this is IResolvedNotebookEditorModel { return Boolean(this._workingCopy); } diff --git a/src/vs/workbench/contrib/notebook/test/notebookEditor.test.ts b/src/vs/workbench/contrib/notebook/test/notebookEditor.test.ts index e983d30ffcd57c..9f2dbae129bb09 100644 --- a/src/vs/workbench/contrib/notebook/test/notebookEditor.test.ts +++ b/src/vs/workbench/contrib/notebook/test/notebookEditor.test.ts @@ -57,8 +57,8 @@ suite('ListViewInfoAccessor', () => { assert.deepStrictEqual(listViewInfoAccessor.getCellsFromViewRange(1, 2), viewModel.getCells({ start: 2, end: 5 })); const notebookEditor = new class extends mock() { - getViewIndex(cell: ICellViewModel) { return listViewInfoAccessor.getViewIndex(cell); } - getCellRangeFromViewRange(startIndex: number, endIndex: number) { return listViewInfoAccessor.getCellRangeFromViewRange(startIndex, endIndex); } + override getViewIndex(cell: ICellViewModel) { return listViewInfoAccessor.getViewIndex(cell); } + override getCellRangeFromViewRange(startIndex: number, endIndex: number) { return listViewInfoAccessor.getCellRangeFromViewRange(startIndex, endIndex); } }; assert.deepStrictEqual(expandCellRangesWithHiddenCells(notebookEditor, viewModel, [{ start: 0, end: 1 }]), [{ start: 0, end: 2 }]); diff --git a/src/vs/workbench/contrib/notebook/test/notebookEditorModel.test.ts b/src/vs/workbench/contrib/notebook/test/notebookEditorModel.test.ts index 8d4567ed075423..7728628c114aac 100644 --- a/src/vs/workbench/contrib/notebook/test/notebookEditorModel.test.ts +++ b/src/vs/workbench/contrib/notebook/test/notebookEditorModel.test.ts @@ -28,10 +28,10 @@ suite('NotebookEditorModel', function () { const notificationService = new class extends mock() { }; const untitledTextEditorService = new class extends mock() { }; const fileService = new class extends mock() { - onDidFilesChange = Event.None; + override onDidFilesChange = Event.None; }; const labelService = new class extends mock() { - getUriBasenameLabel(uri: URI) { return uri.toString(); } + override getUriBasenameLabel(uri: URI) { return uri.toString(); } }; const notebookDataProvider = new class extends mock() { }; @@ -43,7 +43,7 @@ suite('NotebookEditorModel', function () { const copies: IWorkingCopy[] = []; const workingCopyService = new class extends mock() { - registerWorkingCopy(copy: IWorkingCopy) { + override registerWorkingCopy(copy: IWorkingCopy) { copies.push(copy); return Disposable.None; } diff --git a/src/vs/workbench/contrib/notebook/test/notebookServiceImpl.test.ts b/src/vs/workbench/contrib/notebook/test/notebookServiceImpl.test.ts index d0b1e289885c8c..0ff0ef9e0b588c 100644 --- a/src/vs/workbench/contrib/notebook/test/notebookServiceImpl.test.ts +++ b/src/vs/workbench/contrib/notebook/test/notebookServiceImpl.test.ts @@ -19,11 +19,11 @@ suite('NotebookProviderInfoStore', function () { const store = new NotebookProviderInfoStore( new class extends mock() { - get() { return ''; } - store() { } + override get() { return ''; } + override store() { } }, new class extends mock() { - onDidRegisterExtensions = Event.None; + override onDidRegisterExtensions = Event.None; } ); diff --git a/src/vs/workbench/contrib/notebook/test/testNotebookEditor.ts b/src/vs/workbench/contrib/notebook/test/testNotebookEditor.ts index 193732afc064e0..1baafaf5b9fd61 100644 --- a/src/vs/workbench/contrib/notebook/test/testNotebookEditor.ts +++ b/src/vs/workbench/contrib/notebook/test/testNotebookEditor.ts @@ -157,23 +157,23 @@ function _createTestNotebookEditor(instantiationService: TestInstantiationServic const listViewInfoAccessor = new ListViewInfoAccessor(cellList); const notebookEditor: IActiveNotebookEditor = new class extends mock() { - dispose() { + override dispose() { viewModel.dispose(); } - onDidChangeModel: Event = new Emitter().event; - get viewModel() { return viewModel; } - hasModel(): this is IActiveNotebookEditor { + override onDidChangeModel: Event = new Emitter().event; + override get viewModel() { return viewModel; } + override hasModel(): this is IActiveNotebookEditor { return !!this.viewModel; } - getFocus() { return viewModel.getFocus(); } - getSelections() { return viewModel.getSelections(); } - getViewIndex(cell: ICellViewModel) { return listViewInfoAccessor.getViewIndex(cell); } - getCellRangeFromViewRange(startIndex: number, endIndex: number) { return listViewInfoAccessor.getCellRangeFromViewRange(startIndex, endIndex); } - revealCellRangeInView() { } - setHiddenAreas(_ranges: ICellRange[]): boolean { + override getFocus() { return viewModel.getFocus(); } + override getSelections() { return viewModel.getSelections(); } + override getViewIndex(cell: ICellViewModel) { return listViewInfoAccessor.getViewIndex(cell); } + override getCellRangeFromViewRange(startIndex: number, endIndex: number) { return listViewInfoAccessor.getCellRangeFromViewRange(startIndex, endIndex); } + override revealCellRangeInView() { } + override setHiddenAreas(_ranges: ICellRange[]): boolean { return cellList.setHiddenAreas(_ranges, true); } - getActiveCell() { + override getActiveCell() { const elements = cellList.getFocusedElements(); if (elements && elements.length) { @@ -182,7 +182,7 @@ function _createTestNotebookEditor(instantiationService: TestInstantiationServic return undefined; } - hasOutputTextSelection() { + override hasOutputTextSelection() { return false; } }; diff --git a/src/vs/workbench/contrib/outline/browser/outlinePane.ts b/src/vs/workbench/contrib/outline/browser/outlinePane.ts index 22410907986615..8b16ac9dc5863f 100644 --- a/src/vs/workbench/contrib/outline/browser/outlinePane.ts +++ b/src/vs/workbench/contrib/outline/browser/outlinePane.ts @@ -118,18 +118,18 @@ export class OutlinePane extends ViewPane { this._disposables.add(this._outlineViewState.onDidChange(updateContext)); } - dispose(): void { + override dispose(): void { this._disposables.dispose(); this._editorDisposables.dispose(); this._editorListener.dispose(); super.dispose(); } - focus(): void { + override focus(): void { this._tree?.domFocus(); } - protected renderBody(container: HTMLElement): void { + protected override renderBody(container: HTMLElement): void { super.renderBody(container); this._domNode = container; @@ -158,7 +158,7 @@ export class OutlinePane extends ViewPane { })); } - protected layoutBody(height: number, width: number): void { + protected override layoutBody(height: number, width: number): void { super.layoutBody(height, width); this._tree?.layout(height, width); this._treeDimensions = new dom.Dimension(width, height); diff --git a/src/vs/workbench/contrib/output/browser/logViewer.ts b/src/vs/workbench/contrib/output/browser/logViewer.ts index a8fb736ea74f3f..656dcce905845b 100644 --- a/src/vs/workbench/contrib/output/browser/logViewer.ts +++ b/src/vs/workbench/contrib/output/browser/logViewer.ts @@ -53,7 +53,7 @@ export class LogViewerInput extends ResourceEditorInput { ); } - getTypeId(): string { + override getTypeId(): string { return LogViewerInput.ID; } } @@ -74,7 +74,7 @@ export class LogViewer extends AbstractTextResourceEditor { super(LogViewer.LOG_VIEWER_EDITOR_ID, telemetryService, instantiationService, storageService, textResourceConfigurationService, themeService, editorGroupService, editorService); } - protected getConfigurationOverrides(): IEditorOptions { + protected override getConfigurationOverrides(): IEditorOptions { const options = super.getConfigurationOverrides(); options.wordWrap = 'off'; // all log viewers do not wrap options.folding = false; diff --git a/src/vs/workbench/contrib/output/browser/outputView.ts b/src/vs/workbench/contrib/output/browser/outputView.ts index d7c7c6ddb696c1..50b3047ee4dd1f 100644 --- a/src/vs/workbench/contrib/output/browser/outputView.ts +++ b/src/vs/workbench/contrib/output/browser/outputView.ts @@ -80,14 +80,14 @@ export class OutputViewPane extends ViewPane { } } - focus(): void { + override focus(): void { super.focus(); if (this.editorPromise) { this.editorPromise.then(() => this.editor.focus()); } } - renderBody(container: HTMLElement): void { + override renderBody(container: HTMLElement): void { super.renderBody(container); this.editor.create(container); container.classList.add('output-view'); @@ -117,12 +117,12 @@ export class OutputViewPane extends ViewPane { })); } - layoutBody(height: number, width: number): void { + override layoutBody(height: number, width: number): void { super.layoutBody(height, width); this.editor.layout(new Dimension(width, height)); } - getActionViewItem(action: IAction): IActionViewItem | undefined { + override getActionViewItem(action: IAction): IActionViewItem | undefined { if (action.id === 'workbench.output.action.switchBetweenOutputs') { return this.instantiationService.createInstance(SwitchOutputActionViewItem, action); } @@ -178,15 +178,15 @@ export class OutputEditor extends AbstractTextResourceEditor { super(OUTPUT_VIEW_ID, telemetryService, instantiationService, storageService, textResourceConfigurationService, themeService, editorGroupService, editorService); } - getId(): string { + override getId(): string { return OUTPUT_VIEW_ID; } - getTitle(): string { + override getTitle(): string { return nls.localize('output', "Output"); } - protected getConfigurationOverrides(): IEditorOptions { + protected override getConfigurationOverrides(): IEditorOptions { const options = super.getConfigurationOverrides(); options.wordWrap = 'on'; // all output editors wrap options.lineNumbers = 'off'; // all output editors hide line numbers @@ -219,7 +219,7 @@ export class OutputEditor extends AbstractTextResourceEditor { return channel ? nls.localize('outputViewWithInputAriaLabel', "{0}, Output panel", channel.label) : nls.localize('outputViewAriaLabel', "Output panel"); } - async setInput(input: EditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { + async override setInput(input: EditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { const focus = !(options && options.preserveFocus); if (input.matches(this.input)) { return; @@ -236,7 +236,7 @@ export class OutputEditor extends AbstractTextResourceEditor { this.revealLastLine(); } - clearInput(): void { + override clearInput(): void { if (this.input) { // Dispose current input (Output panel is not a workbench editor) this.input.dispose(); @@ -244,7 +244,7 @@ export class OutputEditor extends AbstractTextResourceEditor { super.clearInput(); } - protected createEditor(parent: HTMLElement): void { + protected override createEditor(parent: HTMLElement): void { parent.setAttribute('role', 'document'); @@ -281,7 +281,7 @@ class SwitchOutputActionViewItem extends SelectActionViewItem { this.updateOtions(); } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { super.render(container); container.classList.add('switch-output'); this._register(attachStylerCallback(this.themeService, { selectBorder }, colors => { @@ -289,7 +289,7 @@ class SwitchOutputActionViewItem extends SelectActionViewItem { })); } - protected getActionContext(option: string, index: number): string { + protected override getActionContext(option: string, index: number): string { const channel = index < this.outputChannels.length ? this.outputChannels[index] : this.logChannels[index - this.outputChannels.length - 1]; return channel ? channel.id : option; } diff --git a/src/vs/workbench/contrib/output/common/outputChannelModel.ts b/src/vs/workbench/contrib/output/common/outputChannelModel.ts index d5507658394b74..98f16262606c79 100644 --- a/src/vs/workbench/contrib/output/common/outputChannelModel.ts +++ b/src/vs/workbench/contrib/output/common/outputChannelModel.ts @@ -122,7 +122,7 @@ export abstract class AbstractFileOutputChannelModel extends Disposable implemen protected onUpdateModelCancelled() { } protected updateModel() { } - dispose(): void { + override dispose(): void { this._onDispose.fire(); super.dispose(); } @@ -176,7 +176,7 @@ class OutputFileListener extends Disposable { } } - dispose(): void { + override dispose(): void { this.unwatch(); super.dispose(); } @@ -229,7 +229,7 @@ class FileOutputChannelModel extends AbstractFileOutputChannelModel implements I return this.loadModelPromise; } - clear(till?: number): void { + override clear(till?: number): void { const loadModelPromise: Promise = this.loadModelPromise ? this.loadModelPromise : Promise.resolve(); loadModelPromise.then(() => { super.clear(till); @@ -241,7 +241,7 @@ class FileOutputChannelModel extends AbstractFileOutputChannelModel implements I throw new Error('Not supported'); } - protected updateModel(): void { + protected override updateModel(): void { if (this.model) { this.fileService.readFile(this.file, { position: this.endOffset }) .then(content => { @@ -257,15 +257,15 @@ class FileOutputChannelModel extends AbstractFileOutputChannelModel implements I } } - protected onModelCreated(model: ITextModel): void { + protected override onModelCreated(model: ITextModel): void { this.fileHandler.watch(this.etag); } - protected onModelWillDispose(model: ITextModel | null): void { + protected override onModelWillDispose(model: ITextModel | null): void { this.fileHandler.unwatch(); } - protected onUpdateModelCancelled(): void { + protected override onUpdateModelCancelled(): void { this.updateInProgress = false; } @@ -273,7 +273,7 @@ class FileOutputChannelModel extends AbstractFileOutputChannelModel implements I return VSBuffer.fromString(str).byteLength; } - update(size?: number): void { + override update(size?: number): void { if (this.model) { if (!this.updateInProgress) { this.updateInProgress = true; @@ -368,7 +368,7 @@ export class BufferredOutputChannel extends Disposable implements IOutputChannel } } - dispose(): void { + override dispose(): void { this._onDispose.fire(); super.dispose(); } diff --git a/src/vs/workbench/contrib/output/electron-sandbox/outputChannelModelService.ts b/src/vs/workbench/contrib/output/electron-sandbox/outputChannelModelService.ts index 2da8fc1a7a3c44..2b0824c09c68e1 100644 --- a/src/vs/workbench/contrib/output/electron-sandbox/outputChannelModelService.ts +++ b/src/vs/workbench/contrib/output/electron-sandbox/outputChannelModelService.ts @@ -77,7 +77,7 @@ class OutputChannelBackedByFile extends AbstractFileOutputChannelModel implement } } - clear(till?: number): void { + override clear(till?: number): void { super.clear(till); this.appendedMessage = ''; } @@ -122,7 +122,7 @@ class OutputChannelBackedByFile extends AbstractFileOutputChannelModel implement .then(content => this.appendedMessage ? content.value + this.appendedMessage : content.value.toString()); } - protected updateModel(): void { + protected override updateModel(): void { if (this.model && this.appendedMessage) { this.appendToModel(this.appendedMessage); this.appendedMessage = ''; @@ -213,7 +213,7 @@ export class OutputChannelModelService extends AbstractOutputChannelModelService super(instantiationService); } - createOutputChannelModel(id: string, modelUri: URI, mimeType: string, file?: URI): IOutputChannelModel { + override createOutputChannelModel(id: string, modelUri: URI, mimeType: string, file?: URI): IOutputChannelModel { return file ? super.createOutputChannelModel(id, modelUri, mimeType, file) : this.instantiationService.createInstance(DelegatedOutputChannelModel, id, modelUri, mimeType, this.outputDir); } diff --git a/src/vs/workbench/contrib/performance/browser/perfviewEditor.ts b/src/vs/workbench/contrib/performance/browser/perfviewEditor.ts index b50dca220239f6..200a5ec4517530 100644 --- a/src/vs/workbench/contrib/performance/browser/perfviewEditor.ts +++ b/src/vs/workbench/contrib/performance/browser/perfviewEditor.ts @@ -72,7 +72,7 @@ export class PerfviewInput extends ResourceEditorInput { ); } - getTypeId(): string { + override getTypeId(): string { return PerfviewInput.Id; } } diff --git a/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.ts b/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.ts index 0e640c7528bb18..844ddab9fde69e 100644 --- a/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.ts +++ b/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.ts @@ -69,7 +69,7 @@ export class KeybindingsSearchWidget extends SearchWidget { this._reset(); } - clear(): void { + override clear(): void { this._reset(); super.clear(); } @@ -336,7 +336,7 @@ export class DefineKeybindingOverlayWidget extends Disposable implements IOverla }; } - dispose(): void { + override dispose(): void { this._editor.removeOverlayWidget(this); super.dispose(); } diff --git a/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts b/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts index 7c5303e3c5edf3..3e5f527c23f43a 100644 --- a/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts +++ b/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts @@ -59,7 +59,7 @@ class ThemableCheckboxActionViewItem extends CheckboxActionViewItem { super(context, action, options); } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { super.render(container); if (this.checkbox) { this.disposables.add(attachCheckboxStyler(this.checkbox, this.themeService)); @@ -146,13 +146,13 @@ export class KeybindingsEditor extends EditorPane implements IKeybindingsEditorP this.createBody(keybindingsEditorElement); } - setInput(input: KeybindingsEditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { + override setInput(input: KeybindingsEditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { this.keybindingsEditorContextKey.set(true); return super.setInput(input, options, context, token) .then(() => this.render(!!(options && options.preserveFocus))); } - clearInput(): void { + override clearInput(): void { super.clearInput(); this.keybindingsEditorContextKey.reset(); this.keybindingFocusContextKey.reset(); @@ -170,7 +170,7 @@ export class KeybindingsEditor extends EditorPane implements IKeybindingsEditorP this._onLayout.fire(); } - focus(): void { + override focus(): void { const activeKeybindingEntry = this.activeKeybindingEntry; if (activeKeybindingEntry) { this.selectEntry(activeKeybindingEntry); diff --git a/src/vs/workbench/contrib/preferences/browser/keybindingsEditorContribution.ts b/src/vs/workbench/contrib/preferences/browser/keybindingsEditorContribution.ts index 35e42607f7868b..389647b326f9fb 100644 --- a/src/vs/workbench/contrib/preferences/browser/keybindingsEditorContribution.ts +++ b/src/vs/workbench/contrib/preferences/browser/keybindingsEditorContribution.ts @@ -63,7 +63,7 @@ export class DefineKeybindingController extends Disposable implements IEditorCon return this._keybindingWidgetRenderer; } - dispose(): void { + override dispose(): void { this._disposeKeybindingWidgetRenderer(); this._disposeKeybindingDecorationRenderer(); super.dispose(); diff --git a/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.ts b/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.ts index a7e4bad5e7ad65..ac9c8cf5a90718 100644 --- a/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.ts +++ b/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.ts @@ -109,7 +109,7 @@ export class KeyboardLayoutPickerAction extends Action { super(actionId, actionLabel, undefined, true); } - async run(): Promise { + async override run(): Promise { let layouts = this.keyboardLayoutService.getAllKeyboardLayouts(); let currentLayout = this.keyboardLayoutService.getCurrentKeyboardLayout(); let layoutConfig = this.configurationService.getValue('keyboard.layout'); diff --git a/src/vs/workbench/contrib/preferences/browser/preferencesActions.ts b/src/vs/workbench/contrib/preferences/browser/preferencesActions.ts index 03d0c473b17037..7bae5549965413 100644 --- a/src/vs/workbench/contrib/preferences/browser/preferencesActions.ts +++ b/src/vs/workbench/contrib/preferences/browser/preferencesActions.ts @@ -28,7 +28,7 @@ export class ConfigureLanguageBasedSettingsAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const languages = this.modeService.getRegisteredLanguageNames(); const picks: IQuickPickItem[] = languages.sort().map((lang, index) => { const description: string = nls.localize('languageDescriptionConfigured', "({0})", this.modeService.getModeIdForLanguageName(lang.toLowerCase())); diff --git a/src/vs/workbench/contrib/preferences/browser/preferencesEditor.ts b/src/vs/workbench/contrib/preferences/browser/preferencesEditor.ts index b92b3b4385fc39..69b8248289f3ff 100644 --- a/src/vs/workbench/contrib/preferences/browser/preferencesEditor.ts +++ b/src/vs/workbench/contrib/preferences/browser/preferencesEditor.ts @@ -71,17 +71,17 @@ export class PreferencesEditor extends EditorPane { private lastFocusedWidget: SearchWidget | SideBySidePreferencesWidget | undefined = undefined; - get minimumWidth(): number { return this.sideBySidePreferencesWidget ? this.sideBySidePreferencesWidget.minimumWidth : 0; } - get maximumWidth(): number { return this.sideBySidePreferencesWidget ? this.sideBySidePreferencesWidget.maximumWidth : Number.POSITIVE_INFINITY; } + override get minimumWidth(): number { return this.sideBySidePreferencesWidget ? this.sideBySidePreferencesWidget.minimumWidth : 0; } + override get maximumWidth(): number { return this.sideBySidePreferencesWidget ? this.sideBySidePreferencesWidget.maximumWidth : Number.POSITIVE_INFINITY; } // these setters need to exist because this extends from EditorPane - set minimumWidth(value: number) { /*noop*/ } - set maximumWidth(value: number) { /*noop*/ } + override set minimumWidth(value: number) { /*noop*/ } + override set maximumWidth(value: number) { /*noop*/ } - get minimumHeight() { return 260; } + override get minimumHeight() { return 260; } private _onDidCreateWidget = this._register(new Emitter<{ width: number; height: number; } | undefined>()); - readonly onDidChangeSizeConstraints: Event<{ width: number; height: number; } | undefined> = this._onDidCreateWidget.event; + override readonly onDidChangeSizeConstraints: Event<{ width: number; height: number; } | undefined> = this._onDidCreateWidget.event; constructor( @IPreferencesService private readonly preferencesService: IPreferencesService, @@ -151,7 +151,7 @@ export class PreferencesEditor extends EditorPane { this.preferencesRenderers.editFocusedPreference(); } - setInput(newInput: EditorInput, options: SettingsEditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { + override setInput(newInput: EditorInput, options: SettingsEditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { this.defaultSettingsEditorContextKey.set(true); this.defaultSettingsJSONEditorContextKey.set(true); if (options && options.query) { @@ -167,11 +167,11 @@ export class PreferencesEditor extends EditorPane { this.sideBySidePreferencesWidget.layout(new DOM.Dimension(dimension.width, dimension.height - headerHeight)); } - getControl(): IEditorControl | undefined { + override getControl(): IEditorControl | undefined { return this.sideBySidePreferencesWidget.getControl(); } - focus(): void { + override focus(): void { if (this.lastFocusedWidget) { this.lastFocusedWidget.focus(); } @@ -191,7 +191,7 @@ export class PreferencesEditor extends EditorPane { } } - clearInput(): void { + override clearInput(): void { this.defaultSettingsEditorContextKey.set(false); this.defaultSettingsJSONEditorContextKey.set(false); this.sideBySidePreferencesWidget.clearInput(); @@ -199,7 +199,7 @@ export class PreferencesEditor extends EditorPane { super.clearInput(); } - protected setEditorVisible(visible: boolean, group: IEditorGroup | undefined): void { + protected override setEditorVisible(visible: boolean, group: IEditorGroup | undefined): void { this.sideBySidePreferencesWidget.setEditorVisible(visible, group); super.setEditorVisible(visible, group); } @@ -331,11 +331,11 @@ export class PreferencesEditor extends EditorPane { class SettingsNavigator extends ArrayNavigator { - next(): ISetting | null { + override next(): ISetting | null { return super.next() || super.first(); } - previous(): ISetting | null { + override previous(): ISetting | null { return super.previous() || super.last(); } @@ -749,7 +749,7 @@ class PreferencesRenderersController extends Disposable { return settings; } - dispose(): void { + override dispose(): void { dispose(this._defaultPreferencesRendererDisposables); dispose(this._editablePreferencesRendererDisposables); super.dispose(); @@ -958,7 +958,7 @@ class SideBySidePreferencesWidget extends Widget { } } - dispose(): void { + override dispose(): void { this.disposeEditors(); super.dispose(); } @@ -987,7 +987,7 @@ export class DefaultPreferencesEditor extends BaseTextEditor { return contributions; } - createEditorControl(parent: HTMLElement, configuration: IEditorOptions): editorCommon.IEditor { + override createEditorControl(parent: HTMLElement, configuration: IEditorOptions): editorCommon.IEditor { const editor = this.instantiationService.createInstance(CodeEditorWidget, parent, configuration, { contributions: DefaultPreferencesEditor._getContributions() }); // Inform user about editor being readonly if user starts type @@ -1004,7 +1004,7 @@ export class DefaultPreferencesEditor extends BaseTextEditor { } } - protected getConfigurationOverrides(): IEditorOptions { + protected override getConfigurationOverrides(): IEditorOptions { const options = super.getConfigurationOverrides(); options.readOnly = true; if (this.input) { @@ -1025,7 +1025,7 @@ export class DefaultPreferencesEditor extends BaseTextEditor { return options; } - async setInput(input: DefaultPreferencesEditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { + async override setInput(input: DefaultPreferencesEditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { await super.setInput(input, options, context, token); const editorModel = await this.input!.resolve(); if (!editorModel) { @@ -1042,7 +1042,7 @@ export class DefaultPreferencesEditor extends BaseTextEditor { editor.setModel((editorModel).textEditorModel); } - clearInput(): void { + override clearInput(): void { // Clear Model const editor = this.getControl(); if (editor) { @@ -1053,7 +1053,7 @@ export class DefaultPreferencesEditor extends BaseTextEditor { super.clearInput(); } - layout(dimension: DOM.Dimension) { + override layout(dimension: DOM.Dimension) { const editor = assertIsDefined(this.getControl()); editor.layout(dimension); } @@ -1144,7 +1144,7 @@ abstract class AbstractSettingsEditorContribution extends Disposable implements } } - dispose() { + override dispose() { this.disposePreferencesRenderer(); super.dispose(); } diff --git a/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts b/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts index a65db9f9b45fb8..96e8b714f27ae8 100644 --- a/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts +++ b/src/vs/workbench/contrib/preferences/browser/preferencesRenderers.ts @@ -197,16 +197,16 @@ export class WorkspaceSettingsRenderer extends UserSettingsRenderer implements I this.workspaceConfigurationRenderer = this._register(instantiationService.createInstance(WorkspaceConfigurationRenderer, editor, preferencesModel)); } - protected createHeader(): void { + protected override createHeader(): void { this._register(new SettingsHeaderWidget(this.editor, '')).setMessage(nls.localize('emptyWorkspaceSettingsHeader', "Place your settings here to override the User Settings.")); } - setAssociatedPreferencesModel(associatedPreferencesModel: IPreferencesEditorModel): void { + override setAssociatedPreferencesModel(associatedPreferencesModel: IPreferencesEditorModel): void { super.setAssociatedPreferencesModel(associatedPreferencesModel); this.workspaceConfigurationRenderer.render(this.getAssociatedPreferencesModel()); } - render(): void { + override render(): void { super.render(); this.workspaceConfigurationRenderer.render(this.getAssociatedPreferencesModel()); } @@ -223,7 +223,7 @@ export class FolderSettingsRenderer extends UserSettingsRenderer implements IPre super(editor, preferencesModel, preferencesService, configurationService, instantiationService); } - protected createHeader(): void { + protected override createHeader(): void { this._register(new SettingsHeaderWidget(this.editor, '')).setMessage(nls.localize('emptyFolderSettingsHeader', "Place your folder settings here to override those from the Workspace Settings.")); } @@ -521,7 +521,7 @@ export class SettingsGroupTitleRenderer extends Disposable implements HiddenArea this.renderDisposables.clear(); } - dispose() { + override dispose() { this.disposeWidgets(); super.dispose(); } @@ -542,7 +542,7 @@ export class HiddenAreasRenderer extends Disposable { this.editor.setHiddenAreas(ranges); } - dispose() { + override dispose() { this.editor.setHiddenAreas([]); super.dispose(); } @@ -593,7 +593,7 @@ export class FilteredMatchesRenderer extends Disposable implements HiddenAreasPr return notMatchesRanges; } - dispose() { + override dispose() { this.decorationIds = this.editor.deltaDecorations(this.decorationIds, []); super.dispose(); } @@ -619,7 +619,7 @@ export class HighlightMatchesRenderer extends Disposable { }; } - dispose() { + override dispose() { this.decorationIds = this.editor.deltaDecorations(this.decorationIds, []); super.dispose(); } @@ -1068,7 +1068,7 @@ class UnsupportedSettingsRenderer extends Disposable { }; } - public dispose(): void { + public override dispose(): void { this.markerService.remove('UnsupportedSettingsRenderer', [this.settingsEditorModel.uri]); super.dispose(); } @@ -1139,7 +1139,7 @@ class WorkspaceConfigurationRenderer extends Disposable { }; } - dispose(): void { + override dispose(): void { this.markerService.remove('WorkspaceConfigurationRenderer', [this.workspaceSettingsEditorModel.uri]); this.decorationIds = this.editor.deltaDecorations(this.decorationIds, []); super.dispose(); diff --git a/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.ts b/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.ts index 4d993c9f85edd4..5cae81d7586490 100644 --- a/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.ts +++ b/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.ts @@ -97,7 +97,7 @@ export class SettingsHeaderWidget extends Widget implements IViewZone { } } - dispose() { + override dispose() { this.editor.changeViewZones(accessor => { accessor.removeZone(this.id); }); @@ -110,7 +110,7 @@ export class DefaultSettingsHeaderWidget extends SettingsHeaderWidget { private _onClick = this._register(new Emitter()); readonly onClick: Event = this._onClick.event; - protected create() { + protected override create() { super.create(); this.toggleMessage(true); @@ -302,7 +302,7 @@ export class SettingsGroupTitleWidget extends Widget implements IViewZone { return false; } - dispose() { + override dispose() { this.editor.changeViewZones(accessor => { accessor.removeZone(this.id); }); @@ -352,7 +352,7 @@ export class FolderSettingsActionViewItem extends BaseActionViewItem { this.update(); } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { this.element = container; this.container = container; @@ -383,7 +383,7 @@ export class FolderSettingsActionViewItem extends BaseActionViewItem { } } - onClick(event: DOM.EventLike): void { + override onClick(event: DOM.EventLike): void { DOM.EventHelper.stop(event, true); if (!this.folder || this._action.checked) { this.showMenu(); @@ -392,11 +392,11 @@ export class FolderSettingsActionViewItem extends BaseActionViewItem { } } - protected updateEnabled(): void { + protected override updateEnabled(): void { this.update(); } - protected updateChecked(): void { + protected override updateChecked(): void { this.update(); } @@ -753,7 +753,7 @@ export class SearchWidget extends Widget { return this.inputBox.value = value; } - dispose(): void { + override dispose(): void { if (this.options.focusKey) { this.options.focusKey.set(false); } @@ -820,7 +820,7 @@ export class EditPreferenceWidget extends Disposable { return this._editPreferenceDecoration.length > 0; } - dispose(): void { + override dispose(): void { this.hide(); super.dispose(); } diff --git a/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts b/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts index 51d5a3c84b8593..467abd9dc91983 100644 --- a/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts +++ b/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts @@ -202,12 +202,12 @@ export class SettingsEditor2 extends EditorPane { })); } - get minimumWidth(): number { return 375; } - get maximumWidth(): number { return Number.POSITIVE_INFINITY; } + override get minimumWidth(): number { return 375; } + override get maximumWidth(): number { return Number.POSITIVE_INFINITY; } // these setters need to exist because this extends from EditorPane - set minimumWidth(value: number) { /*noop*/ } - set maximumWidth(value: number) { /*noop*/ } + override set minimumWidth(value: number) { /*noop*/ } + override set maximumWidth(value: number) { /*noop*/ } private get currentSettingsModel() { return this.searchResultModel || this.settingsTreeModel; @@ -246,7 +246,7 @@ export class SettingsEditor2 extends EditorPane { this.updateStyles(); } - setInput(input: SettingsEditor2Input, options: SettingsEditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { + override setInput(input: SettingsEditor2Input, options: SettingsEditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { this.inSettingsEditorContextKey.set(true); return super.setInput(input, options, context, token) .then(() => timeout(0)) // Force setInput to be async @@ -293,7 +293,7 @@ export class SettingsEditor2 extends EditorPane { return withUndefinedAsNull(cachedState); } - setOptions(options: SettingsEditorOptions | undefined): void { + override setOptions(options: SettingsEditorOptions | undefined): void { super.setOptions(options); if (options) { @@ -317,7 +317,7 @@ export class SettingsEditor2 extends EditorPane { } } - clearInput(): void { + override clearInput(): void { this.inSettingsEditorContextKey.set(false); super.clearInput(); } @@ -340,7 +340,7 @@ export class SettingsEditor2 extends EditorPane { this.rootElement.classList.toggle('narrow-width', dimension.width < 600); } - focus(): void { + override focus(): void { if (this._currentFocusContext === SettingsFocusContext.Search) { this.focusSearch(); } else if (this._currentFocusContext === SettingsFocusContext.SettingControl) { @@ -359,7 +359,7 @@ export class SettingsEditor2 extends EditorPane { } } - protected setEditorVisible(visible: boolean, group: IEditorGroup | undefined): void { + protected override setEditorVisible(visible: boolean, group: IEditorGroup | undefined): void { super.setEditorVisible(visible, group); if (!visible) { @@ -1395,7 +1395,7 @@ export class SettingsEditor2 extends EditorPane { this.tocTree.layout(tocTreeHeight); } - protected saveState(): void { + protected override saveState(): void { if (this.isVisible()) { const searchQuery = this.searchWidget.getValue().trim(); const target = this.settingsTargetsWidget.settingsTarget as SettingsTarget; diff --git a/src/vs/workbench/contrib/preferences/browser/settingsTree.ts b/src/vs/workbench/contrib/preferences/browser/settingsTree.ts index 9e89f8333247b7..1b97ca5f40927d 100644 --- a/src/vs/workbench/contrib/preferences/browser/settingsTree.ts +++ b/src/vs/workbench/contrib/preferences/browser/settingsTree.ts @@ -1827,11 +1827,11 @@ class SettingsTreeDelegate extends CachedListVirtualDelegate extends ObjectTreeModel { - isCollapsible(element: T): boolean { + override isCollapsible(element: T): boolean { return false; } - setCollapsed(element: T, collapsed?: boolean, recursive?: boolean): boolean { + override setCollapsed(element: T, collapsed?: boolean, recursive?: boolean): boolean { return false; } } @@ -1991,7 +1991,7 @@ export class SettingsTree extends WorkbenchObjectTree { })); } - protected createModel(user: string, view: IList>, options: IObjectTreeOptions): ITreeModel { + protected override createModel(user: string, view: IList>, options: IObjectTreeOptions): ITreeModel { return new NonCollapsibleObjectTreeModel(user, view, options); } } @@ -2006,7 +2006,7 @@ class CopySettingIdAction extends Action { super(CopySettingIdAction.ID, CopySettingIdAction.LABEL); } - async run(context: SettingsTreeSettingElement): Promise { + async override run(context: SettingsTreeSettingElement): Promise { if (context) { await this.clipboardService.writeText(context.setting.key); } @@ -2025,7 +2025,7 @@ class CopySettingAsJSONAction extends Action { super(CopySettingAsJSONAction.ID, CopySettingAsJSONAction.LABEL); } - async run(context: SettingsTreeSettingElement): Promise { + async override run(context: SettingsTreeSettingElement): Promise { if (context) { const jsonResult = `"${context.setting.key}": ${JSON.stringify(context.value, undefined, ' ')}`; await this.clipboardService.writeText(jsonResult); @@ -2053,7 +2053,7 @@ class SyncSettingAction extends Action { this.checked = !ignoredSettings.includes(this.setting.key); } - async run(): Promise { + async override run(): Promise { // first remove the current setting completely from ignored settings let currentValue = [...this.configService.getValue('settingsSync.ignoredSettings')]; currentValue = currentValue.filter(v => v !== this.setting.key && v !== `-${this.setting.key}`); diff --git a/src/vs/workbench/contrib/preferences/browser/settingsWidgets.ts b/src/vs/workbench/contrib/preferences/browser/settingsWidgets.ts index b863ddcf71a72e..897d1239ddc959 100644 --- a/src/vs/workbench/contrib/preferences/browser/settingsWidgets.ts +++ b/src/vs/workbench/contrib/preferences/browser/settingsWidgets.ts @@ -623,17 +623,17 @@ export class ListSettingWidget extends AbstractListSettingWidget } export class ExcludeSettingWidget extends ListSettingWidget { - protected getContainerClasses() { + protected override getContainerClasses() { return ['setting-list-exclude-widget']; } - protected getLocalizedRowTitle({ value, sibling }: IListDataItem): string { + protected override getLocalizedRowTitle({ value, sibling }: IListDataItem): string { return isUndefinedOrNull(sibling) ? localize('excludePatternHintLabel', "Exclude files matching `{0}`", value) : localize('excludeSiblingHintLabel', "Exclude files matching `{0}`, only when a file matching `{1}` is present", value, sibling); } - protected getLocalizedStrings() { + protected override getLocalizedStrings() { return { deleteActionTooltip: localize('removeExcludeItem', "Remove Exclude Item"), editActionTooltip: localize('editExcludeItem', "Edit Exclude Item"), @@ -703,7 +703,7 @@ export class ObjectSettingWidget extends AbstractListSettingWidget undefined; private valueSuggester: IObjectValueSuggester = () => undefined; - setValue(listData: IObjectDataItem[], options?: IObjectSetValueOptions): void { + override setValue(listData: IObjectDataItem[], options?: IObjectSetValueOptions): void { this.showAddButton = options?.showAddButton ?? this.showAddButton; this.keySuggester = options?.keySuggester ?? this.keySuggester; this.valueSuggester = options?.valueSuggester ?? this.valueSuggester; @@ -721,7 +721,7 @@ export class ObjectSettingWidget extends AbstractListSettingWidget 1) { super.render(container); container.classList.add('switch-remote'); } } - protected getActionContext(_: string, index: number): any { + protected override getActionContext(_: string, index: number): any { return this.optionsItems[index]; } diff --git a/src/vs/workbench/contrib/remote/browser/remote.ts b/src/vs/workbench/contrib/remote/browser/remote.ts index 5e2ea816afc3b2..d8a68ff6633a12 100644 --- a/src/vs/workbench/contrib/remote/browser/remote.ts +++ b/src/vs/workbench/contrib/remote/browser/remote.ts @@ -403,7 +403,7 @@ class HelpPanel extends ViewPane { super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService); } - protected renderBody(container: HTMLElement): void { + protected override renderBody(container: HTMLElement): void { super.renderBody(container); container.classList.add('remote-help'); @@ -436,7 +436,7 @@ class HelpPanel extends ViewPane { })); } - protected layoutBody(height: number, width: number): void { + protected override layoutBody(height: number, width: number): void { super.layoutBody(height, width); this.tree.layout(height, width); } @@ -522,7 +522,7 @@ export class RemoteViewPaneContainer extends FilterViewPaneContainer implements this.remoteExplorerService.targetType = isStringArray(viewDescriptor.remoteAuthority) ? viewDescriptor.remoteAuthority : [viewDescriptor.remoteAuthority!]; } - public getActionViewItem(action: Action): IActionViewItem | undefined { + public override getActionViewItem(action: Action): IActionViewItem | undefined { if (action.id === SwitchRemoteAction.ID) { const optionItems = SwitchRemoteViewItem.createOptionItems(Registry.as(Extensions.ViewsRegistry).getViews(this.viewContainer), this.contextKeyService); const item = this.instantiationService.createInstance(SwitchRemoteViewItem, action, optionItems); diff --git a/src/vs/workbench/contrib/remote/browser/urlFinder.ts b/src/vs/workbench/contrib/remote/browser/urlFinder.ts index ba36c2b54140dd..b66495b015792a 100644 --- a/src/vs/workbench/contrib/remote/browser/urlFinder.ts +++ b/src/vs/workbench/contrib/remote/browser/urlFinder.ts @@ -89,7 +89,7 @@ export class UrlFinder extends Disposable { } } - dispose() { + override dispose() { super.dispose(); const listeners = this.listeners.values(); for (const listener of listeners) { diff --git a/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts b/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts index 385bbbaabe0473..f9a808c423bf67 100644 --- a/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts +++ b/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts @@ -53,7 +53,7 @@ import { Codicon } from 'vs/base/common/codicons'; class DiffActionRunner extends ActionRunner { - runAction(action: IAction, context: any): Promise { + override runAction(action: IAction, context: any): Promise { if (action instanceof MenuItemAction) { return action.run(...context); } @@ -121,7 +121,7 @@ class UIEditorAction extends Action { this.editor = editor; } - run(): Promise { + override run(): Promise { return Promise.resolve(this.instantiationService.invokeFunction(accessor => this.action.run(accessor, this.editor, null))); } } @@ -245,7 +245,7 @@ class DirtyDiffWidget extends PeekViewWidget { this.setTitle(this.title, detail); } - protected _fillHead(container: HTMLElement): void { + protected override _fillHead(container: HTMLElement): void { super._fillHead(container, true); const previous = this.instantiationService.createInstance(UIEditorAction, this.editor, new ShowPreviousChangeAction(), ThemeIcon.asClassName(gotoPreviousLocation)); @@ -263,7 +263,7 @@ class DirtyDiffWidget extends PeekViewWidget { }), { label: false, icon: true }); } - protected _getActionBarOptions(): IActionBarOptions { + protected override _getActionBarOptions(): IActionBarOptions { const actionRunner = new DiffActionRunner(); // close widget on successful action @@ -300,7 +300,7 @@ class DirtyDiffWidget extends PeekViewWidget { this.diffEditor = this.instantiationService.createInstance(EmbeddedDiffEditorWidget, container, options, this.editor); } - _onWidth(width: number): void { + override _onWidth(width: number): void { if (typeof this.height === 'undefined') { return; } @@ -308,7 +308,7 @@ class DirtyDiffWidget extends PeekViewWidget { this.diffEditor.layout({ height: this.height, width }); } - protected _doLayoutBody(height: number, width: number): void { + protected override _doLayoutBody(height: number, width: number): void { super._doLayoutBody(height, width); this.diffEditor.layout({ height, width }); @@ -347,7 +347,7 @@ class DirtyDiffWidget extends PeekViewWidget { }); } - protected revealLine(lineNumber: number) { + protected override revealLine(lineNumber: number) { this.editor.revealLineInCenterIfOutsideViewport(lineNumber, ScrollType.Smooth); } @@ -840,7 +840,7 @@ export class DirtyDiffController extends Disposable implements IEditorContributi return model.changes; } - dispose(): void { + override dispose(): void { this.gutterActionDisposables.dispose(); super.dispose(); } @@ -994,7 +994,7 @@ class DirtyDiffDecorator extends Disposable { this.decorations = this.editorModel.deltaDecorations(this.decorations, decorations); } - dispose(): void { + override dispose(): void { super.dispose(); if (this.editorModel && !this.editorModel.isDisposed()) { @@ -1262,7 +1262,7 @@ export class DirtyDiffModel extends Disposable { return this.changes.length - 1; } - dispose(): void { + override dispose(): void { super.dispose(); this._disposed = true; @@ -1433,7 +1433,7 @@ export class DirtyDiffWorkbenchController extends Disposable implements ext.IWor return null; } - dispose(): void { + override dispose(): void { this.disable(); super.dispose(); } diff --git a/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.ts b/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.ts index 39d95cc7bc2f8c..85b35ceac5d99c 100644 --- a/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.ts +++ b/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.ts @@ -56,7 +56,7 @@ export class SCMRepositoriesViewPane extends ViewPane { super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService); } - protected renderBody(container: HTMLElement): void { + protected override renderBody(container: HTMLElement): void { super.renderBody(container); const listContainer = append(container, $('.scm-view.scm-repositories-view')); @@ -120,11 +120,11 @@ export class SCMRepositoriesViewPane extends ViewPane { this.updateBodySize(); } - focus(): void { + override focus(): void { this.list.domFocus(); } - protected layoutBody(height: number, width: number): void { + protected override layoutBody(height: number, width: number): void { super.layoutBody(height, width); this.list.layout(height, width); } diff --git a/src/vs/workbench/contrib/scm/browser/scmViewPane.ts b/src/vs/workbench/contrib/scm/browser/scmViewPane.ts index 091613b355da9b..104d7d0f511662 100644 --- a/src/vs/workbench/contrib/scm/browser/scmViewPane.ts +++ b/src/vs/workbench/contrib/scm/browser/scmViewPane.ts @@ -301,7 +301,7 @@ class RepositoryPaneActionRunner extends ActionRunner { super(); } - async runAction(action: IAction, context: ISCMResource | IResourceNode): Promise { + async override runAction(action: IAction, context: ISCMResource | IResourceNode): Promise { if (!(action instanceof MenuItemAction)) { return super.runAction(action, context); } @@ -1797,7 +1797,7 @@ class SCMInputWidget extends Disposable { this.validationDisposable.dispose(); } - dispose(): void { + override dispose(): void { this.input = undefined; this.repositoryDisposables.dispose(); this.validationDisposable.dispose(); @@ -1847,7 +1847,7 @@ export class SCMViewPane extends ViewPane { this._register(Event.any(this.scmService.onDidAddRepository, this.scmService.onDidRemoveRepository)(() => this._onDidChangeViewWelcomeState.fire())); } - protected renderBody(container: HTMLElement): void { + protected override renderBody(container: HTMLElement): void { super.renderBody(container); // List @@ -1969,7 +1969,7 @@ export class SCMViewPane extends ViewPane { this.storageService.store(`scm.viewMode`, this._viewModel.mode, StorageScope.WORKSPACE, StorageTarget.USER); } - layoutBody(height: number | undefined = this.layoutCache.height, width: number | undefined = this.layoutCache.width): void { + override layoutBody(height: number | undefined = this.layoutCache.height, width: number | undefined = this.layoutCache.width): void { if (height === undefined) { return; } @@ -1986,7 +1986,7 @@ export class SCMViewPane extends ViewPane { this.tree.layout(height, width); } - focus(): void { + override focus(): void { super.focus(); if (this.isExpanded()) { @@ -2122,7 +2122,7 @@ export class SCMViewPane extends ViewPane { .filter(r => !!r && !isSCMResourceGroup(r))! as any; } - shouldShowWelcome(): boolean { + override shouldShowWelcome(): boolean { return this.scmService.repositories.length === 0; } } diff --git a/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.ts b/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.ts index 1e014cf01f2468..09c35778b5a635 100644 --- a/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.ts +++ b/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.ts @@ -35,16 +35,16 @@ export class SCMViewPaneContainer extends ViewPaneContainer { super(VIEWLET_ID, { mergeViewWithContainerWhenSingleView: true }, instantiationService, configurationService, layoutService, contextMenuService, telemetryService, extensionService, themeService, storageService, contextService, viewDescriptorService); } - create(parent: HTMLElement): void { + override create(parent: HTMLElement): void { super.create(parent); parent.classList.add('scm-viewlet'); } - getOptimalWidth(): number { + override getOptimalWidth(): number { return 400; } - getTitle(): string { + override getTitle(): string { return localize('source control', "Source Control"); } } diff --git a/src/vs/workbench/contrib/scm/browser/util.ts b/src/vs/workbench/contrib/scm/browser/util.ts index 7ba4c62ec4d295..250b8cfce6b5e6 100644 --- a/src/vs/workbench/contrib/scm/browser/util.ts +++ b/src/vs/workbench/contrib/scm/browser/util.ts @@ -90,7 +90,7 @@ export class StatusBarAction extends Action { this.tooltip = command.tooltip || ''; } - run(): Promise { + override run(): Promise { return this.commandService.executeCommand(this.command.id, ...(this.command.arguments || [])); } } @@ -101,7 +101,7 @@ class StatusBarActionViewItem extends ActionViewItem { super(null, action, {}); } - updateLabel(): void { + override updateLabel(): void { if (this.options.label && this.label) { reset(this.label, ...renderLabelWithIcons(this.getAction().label)); } diff --git a/src/vs/workbench/contrib/search/browser/anythingQuickAccess.ts b/src/vs/workbench/contrib/search/browser/anythingQuickAccess.ts index 3ea89e9870aff3..fce8acd1d9746e 100644 --- a/src/vs/workbench/contrib/search/browser/anythingQuickAccess.ts +++ b/src/vs/workbench/contrib/search/browser/anythingQuickAccess.ts @@ -200,7 +200,7 @@ export class AnythingQuickAccessProvider extends PickerQuickAccessProvider, token: CancellationToken): IDisposable { + override provide(picker: IQuickPick, token: CancellationToken): IDisposable { const disposables = new DisposableStore(); // Update the pick state for this run diff --git a/src/vs/workbench/contrib/search/browser/patternInputWidget.ts b/src/vs/workbench/contrib/search/browser/patternInputWidget.ts index 72425e8cf98f45..160e680c752e6b 100644 --- a/src/vs/workbench/contrib/search/browser/patternInputWidget.ts +++ b/src/vs/workbench/contrib/search/browser/patternInputWidget.ts @@ -67,7 +67,7 @@ export class PatternInputWidget extends Widget implements IThemable { parent.appendChild(this.domNode); } - dispose(): void { + override dispose(): void { super.dispose(); if (this.inputFocusTracker) { this.inputFocusTracker.dispose(); @@ -199,7 +199,7 @@ export class IncludePatternInputWidget extends PatternInputWidget { private useSearchInEditorsBox!: Checkbox; - dispose(): void { + override dispose(): void { super.dispose(); this.useSearchInEditorsBox.dispose(); } @@ -212,11 +212,11 @@ export class IncludePatternInputWidget extends PatternInputWidget { this.useSearchInEditorsBox.checked = value; } - protected getSubcontrolsWidth(): number { + protected override getSubcontrolsWidth(): number { return super.getSubcontrolsWidth() + this.useSearchInEditorsBox.width(); } - protected renderSubcontrols(controlsDiv: HTMLDivElement): void { + protected override renderSubcontrols(controlsDiv: HTMLDivElement): void { this.useSearchInEditorsBox = this._register(new Checkbox({ icon: Codicon.book, title: nls.localize('onlySearchInOpenEditors', "Search only in Open Editors"), @@ -249,7 +249,7 @@ export class ExcludePatternInputWidget extends PatternInputWidget { private useExcludesAndIgnoreFilesBox!: Checkbox; - dispose(): void { + override dispose(): void { super.dispose(); this.useExcludesAndIgnoreFilesBox.dispose(); } @@ -263,11 +263,11 @@ export class ExcludePatternInputWidget extends PatternInputWidget { this._onChangeIgnoreBoxEmitter.fire(); } - protected getSubcontrolsWidth(): number { + protected override getSubcontrolsWidth(): number { return super.getSubcontrolsWidth() + this.useExcludesAndIgnoreFilesBox.width(); } - protected renderSubcontrols(controlsDiv: HTMLDivElement): void { + protected override renderSubcontrols(controlsDiv: HTMLDivElement): void { this.useExcludesAndIgnoreFilesBox = this._register(new Checkbox({ icon: Codicon.exclude, actionClassName: 'useExcludesAndIgnoreFiles', diff --git a/src/vs/workbench/contrib/search/browser/search.contribution.ts b/src/vs/workbench/contrib/search/browser/search.contribution.ts index 9feb3fed98d332..0a6480886f0acb 100644 --- a/src/vs/workbench/contrib/search/browser/search.contribution.ts +++ b/src/vs/workbench/contrib/search/browser/search.contribution.ts @@ -608,7 +608,7 @@ class ShowAllSymbolsAction extends Action { super(actionId, actionLabel); } - async run(): Promise { + async override run(): Promise { this.quickInputService.quickAccess.show(ShowAllSymbolsAction.ALL_SYMBOLS_PREFIX); } } diff --git a/src/vs/workbench/contrib/search/browser/searchActions.ts b/src/vs/workbench/contrib/search/browser/searchActions.ts index d18d2f4fc0c49f..d550b950219d98 100644 --- a/src/vs/workbench/contrib/search/browser/searchActions.ts +++ b/src/vs/workbench/contrib/search/browser/searchActions.ts @@ -102,7 +102,7 @@ export class FocusNextInputAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const input = this.editorService.activeEditor; if (input instanceof SearchEditorInput) { // cast as we cannot import SearchEditor as a value b/c cyclic dependency. @@ -127,7 +127,7 @@ export class FocusPreviousInputAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const input = this.editorService.activeEditor; if (input instanceof SearchEditorInput) { // cast as we cannot import SearchEditor as a value b/c cyclic dependency. @@ -149,7 +149,7 @@ export abstract class FindOrReplaceInFilesAction extends Action { super(id, label); } - run(): Promise { + override run(): Promise { return openSearchView(this.viewsService, false).then(openedView => { if (openedView) { const searchAndReplaceWidget = openedView.searchAndReplaceWidget; @@ -226,7 +226,7 @@ export class CloseReplaceAction extends Action { super(id, label); } - run(): Promise { + override run(): Promise { const searchView = getSearchView(this.viewsService); if (searchView) { searchView.searchAndReplaceWidget.toggleReplace(false); @@ -253,7 +253,7 @@ export class ToggleSearchOnTypeAction extends Action { super(id, label); } - run(): Promise { + override run(): Promise { const searchOnType = this.configurationService.getValue(ToggleSearchOnTypeAction.searchOnTypeKey); return this.configurationService.updateValue(ToggleSearchOnTypeAction.searchOnTypeKey, !searchOnType); } @@ -344,7 +344,7 @@ export class FocusNextSearchResultAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const input = this.editorService.activeEditor; if (input instanceof SearchEditorInput) { // cast as we cannot import SearchEditor as a value b/c cyclic dependency. @@ -370,7 +370,7 @@ export class FocusPreviousSearchResultAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { const input = this.editorService.activeEditor; if (input instanceof SearchEditorInput) { // cast as we cannot import SearchEditor as a value b/c cyclic dependency. @@ -452,7 +452,7 @@ export class RemoveAction extends AbstractSearchAndReplaceAction { super('remove', RemoveAction.LABEL, ThemeIcon.asClassName(searchRemoveIcon)); } - run(): Promise { + override run(): Promise { const currentFocusElement = this.viewer.getFocus()[0]; const nextFocusElement = !currentFocusElement || currentFocusElement instanceof SearchResult || elementIsEqualOrParent(currentFocusElement, this.element) ? this.getElementToFocusAfterRemoved(this.viewer, this.element) : @@ -492,7 +492,7 @@ export class ReplaceAllAction extends AbstractSearchAndReplaceAction { super(Constants.ReplaceAllInFileActionId, appendKeyBindingLabel(ReplaceAllAction.LABEL, keyBindingService.lookupKeybinding(Constants.ReplaceAllInFileActionId), keyBindingService), ThemeIcon.asClassName(searchReplaceAllIcon)); } - run(): Promise { + override run(): Promise { const tree = this.viewlet.getControl(); const nextFocusElement = this.getElementToFocusAfterRemoved(tree, this.fileMatch); return this.fileMatch.parent().replace(this.fileMatch).then(() => { @@ -516,7 +516,7 @@ export class ReplaceAllInFolderAction extends AbstractSearchAndReplaceAction { super(Constants.ReplaceAllInFolderActionId, appendKeyBindingLabel(ReplaceAllInFolderAction.LABEL, keyBindingService.lookupKeybinding(Constants.ReplaceAllInFolderActionId), keyBindingService), ThemeIcon.asClassName(searchReplaceAllIcon)); } - run(): Promise { + override run(): Promise { const nextFocusElement = this.getElementToFocusAfterRemoved(this.viewer, this.folderMatch); return this.folderMatch.replaceAll().then(() => { if (nextFocusElement) { @@ -543,7 +543,7 @@ export class ReplaceAction extends AbstractSearchAndReplaceAction { super(Constants.ReplaceActionId, appendKeyBindingLabel(ReplaceAction.LABEL, keyBindingService.lookupKeybinding(Constants.ReplaceActionId), keyBindingService), ThemeIcon.asClassName(searchReplaceIcon)); } - async run(): Promise { + async override run(): Promise { this.enabled = false; await this.element.parent().replace(this.element); diff --git a/src/vs/workbench/contrib/search/browser/searchView.ts b/src/vs/workbench/contrib/search/browser/searchView.ts index 107bba653402c8..db3dae148942bf 100644 --- a/src/vs/workbench/contrib/search/browser/searchView.ts +++ b/src/vs/workbench/contrib/search/browser/searchView.ts @@ -255,7 +255,7 @@ export class SearchView extends ViewPane { } } - renderBody(parent: HTMLElement): void { + override renderBody(parent: HTMLElement): void { super.renderBody(parent); this.container = dom.append(parent, dom.$('.search-view')); @@ -890,7 +890,7 @@ export class SearchView extends ViewPane { this.tree.domFocus(); } - focus(): void { + override focus(): void { super.focus(); if (this.lastFocusState === 'input' || !this.hasSearchResults()) { const updatedText = this.searchConfig.seedOnFocus ? this.updateTextFromSelection({ allowSearchOnType: false }) : false; @@ -1045,7 +1045,7 @@ export class SearchView extends ViewPane { this.tree.layout(); // The tree will measure its container } - protected layoutBody(height: number, width: number): void { + protected override layoutBody(height: number, width: number): void { super.layoutBody(height, width); this.size = new dom.Dimension(width, height); this.reLayout(); @@ -1798,7 +1798,7 @@ export class SearchView extends ViewPane { this.inputPatternIncludes.clearHistory(); } - public saveState(): void { + public override saveState(): void { const isRegex = this.searchWidget.searchInput.getRegex(); const isWholeWords = this.searchWidget.searchInput.getWholeWords(); const isCaseSensitive = this.searchWidget.searchInput.getCaseSensitive(); @@ -1868,7 +1868,7 @@ export class SearchView extends ViewPane { } } - dispose(): void { + override dispose(): void { this.isDisposed = true; this.saveState(); super.dispose(); diff --git a/src/vs/workbench/contrib/search/browser/searchWidget.ts b/src/vs/workbench/contrib/search/browser/searchWidget.ts index 747a9984005403..e4b413be3b6e85 100644 --- a/src/vs/workbench/contrib/search/browser/searchWidget.ts +++ b/src/vs/workbench/contrib/search/browser/searchWidget.ts @@ -64,7 +64,7 @@ class ReplaceAllAction extends Action { this._searchWidget = searchWidget; } - run(): Promise { + override run(): Promise { if (this._searchWidget) { return this._searchWidget.triggerReplaceAll(); } @@ -653,7 +653,7 @@ export class SearchWidget extends Widget { this.onContextLinesChanged(); } - dispose(): void { + override dispose(): void { this.setReplaceAllActionState(false); super.dispose(); } diff --git a/src/vs/workbench/contrib/search/common/searchModel.ts b/src/vs/workbench/contrib/search/common/searchModel.ts index 1e3b7a634d2f79..a215cd5265b281 100644 --- a/src/vs/workbench/contrib/search/common/searchModel.ts +++ b/src/vs/workbench/contrib/search/common/searchModel.ts @@ -439,7 +439,7 @@ export class FileMatch extends Disposable implements IFileMatch { this._fileStat = stat; } - dispose(): void { + override dispose(): void { this.setSelectedMatch(null); this.unbindModel(); this._onDispose.fire(); @@ -630,7 +630,7 @@ export class FolderMatch extends Disposable { this._unDisposedFileMatches.clear(); } - dispose(): void { + override dispose(): void { this.disposeMatches(); this._onDispose.fire(); super.dispose(); @@ -649,7 +649,7 @@ export class FolderMatchWithResource extends FolderMatch { super(_resource, _id, _index, _query, _parent, _searchModel, replaceService, instantiationService); } - get resource(): URI { + override get resource(): URI { return this._resource!; } } @@ -971,7 +971,7 @@ export class SearchResult extends Disposable { this._rangeHighlightDecorations.removeHighlightRange(); } - dispose(): void { + override dispose(): void { this.disposePastResults(); this.disposeMatches(); this._rangeHighlightDecorations.dispose(); @@ -1173,7 +1173,7 @@ export class SearchModel extends Disposable { return false; } - dispose(): void { + override dispose(): void { this.cancelSearch(); this.searchResult.dispose(); super.dispose(); diff --git a/src/vs/workbench/contrib/searchEditor/browser/searchEditor.ts b/src/vs/workbench/contrib/searchEditor/browser/searchEditor.ts index 160aa6ebd49f0d..13012897c0de41 100644 --- a/src/vs/workbench/contrib/searchEditor/browser/searchEditor.ts +++ b/src/vs/workbench/contrib/searchEditor/browser/searchEditor.ts @@ -119,7 +119,7 @@ export class SearchEditor extends BaseTextEditor { this.searchModel = this._register(this.instantiationService.createInstance(SearchModel)); } - createEditor(parent: HTMLElement) { + override createEditor(parent: HTMLElement) { DOM.append(parent, this.container); this.createQueryEditor(this.container); @@ -238,11 +238,11 @@ export class SearchEditor extends BaseTextEditor { }); } - getControl() { + override getControl() { return this.searchResultEditor; } - focus() { + override focus() { const viewState = this.loadViewState(); if (viewState && viewState.focused === 'editor') { this.searchResultEditor.focus(); @@ -544,7 +544,7 @@ export class SearchEditor extends BaseTextEditor { await Promise.all(files); } - layout(dimension: DOM.Dimension) { + override layout(dimension: DOM.Dimension) { this.dimension = dimension; this.reLayout(); } @@ -583,7 +583,7 @@ export class SearchEditor extends BaseTextEditor { if (config.showIncludesExcludes !== undefined) { this.toggleIncludesExcludes(config.showIncludesExcludes); } } - async setInput(newInput: SearchEditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { + async override setInput(newInput: SearchEditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { this.saveViewState(); await super.setInput(newInput, options, context, token); @@ -625,7 +625,7 @@ export class SearchEditor extends BaseTextEditor { this.reLayout(); } - saveState() { + override saveState() { this.saveViewState(); super.saveState(); } @@ -635,7 +635,7 @@ export class SearchEditor extends BaseTextEditor { if (resource) { this.saveTextEditorViewState(resource); } } - protected retrieveTextEditorViewState(resource: URI): SearchEditorViewState | null { + protected override retrieveTextEditorViewState(resource: URI): SearchEditorViewState | null { const control = this.getControl(); const editorViewState = control.saveViewState(); if (!editorViewState) { return null; } @@ -654,7 +654,7 @@ export class SearchEditor extends BaseTextEditor { if (viewState) { this.searchResultEditor.restoreViewState(viewState); } } - clearInput() { + override clearInput() { this.saveViewState(); super.clearInput(); } diff --git a/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts b/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts index b724ea5a3fc2b4..fdb127713128a7 100644 --- a/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts +++ b/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts @@ -121,7 +121,7 @@ export class SearchEditorInput extends EditorInput { this._register(this.workingCopyService.registerWorkingCopy(workingCopyAdapter)); } - async save(group: GroupIdentifier, options?: ITextFileSaveOptions): Promise { + async override save(group: GroupIdentifier, options?: ITextFileSaveOptions): Promise { if ((await this.model).isDisposed()) { return; } if (this.backingUri) { @@ -141,7 +141,7 @@ export class SearchEditorInput extends EditorInput { return { config: this.config, body: await this.model }; } - async saveAs(group: GroupIdentifier, options?: ITextFileSaveOptions): Promise { + async override saveAs(group: GroupIdentifier, options?: ITextFileSaveOptions): Promise { const path = await this.fileDialogService.pickFileToSave(await this.suggestFileName(), options?.availableFileSystems); if (path) { this.telemetryService.publicLog2('searchEditor/saveSearchResults'); @@ -163,7 +163,7 @@ export class SearchEditorInput extends EditorInput { return SearchEditorInput.ID; } - getName(maxLength = 12): string { + override getName(maxLength = 12): string { const trimToMax = (label: string) => (label.length < maxLength ? label : `${label.slice(0, maxLength - 3)}...`); if (this.backingUri) { @@ -183,19 +183,19 @@ export class SearchEditorInput extends EditorInput { this._onDidChangeDirty.fire(); } - isDirty() { + override isDirty() { return this.dirty; } - isReadonly() { + override isReadonly() { return false; } - isUntitled() { + override isUntitled() { return !this.backingUri; } - rename(group: GroupIdentifier, target: URI): IMoveResult | undefined { + override rename(group: GroupIdentifier, target: URI): IMoveResult | undefined { if (this._cachedModel && extname(target) === SEARCH_EDITOR_EXT) { return { editor: this.instantiationService.invokeFunction(getOrMakeSearchEditorInput, { config: this.config, text: this._cachedModel.getValue(), backingUri: target }) @@ -205,12 +205,12 @@ export class SearchEditorInput extends EditorInput { return undefined; } - dispose() { + override dispose() { this.modelService.destroyModel(this.modelUri); super.dispose(); } - matches(other: unknown) { + override matches(other: unknown) { if (this === other) { return true; } if (other instanceof SearchEditorInput) { @@ -233,7 +233,7 @@ export class SearchEditorInput extends EditorInput { ({ range, options: { className: SearchEditorFindMatchClass, stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges } }))); } - async revert(group: GroupIdentifier, options?: IRevertOptions) { + async override revert(group: GroupIdentifier, options?: IRevertOptions) { if (options?.soft) { this.setDirty(false); return; @@ -250,7 +250,7 @@ export class SearchEditorInput extends EditorInput { this.setDirty(false); } - supportsSplitEditor() { + override supportsSplitEditor() { return false; } diff --git a/src/vs/workbench/contrib/tasks/common/problemCollectors.ts b/src/vs/workbench/contrib/tasks/common/problemCollectors.ts index ae04ea8f3e0e7d..adec04cbbe6c7e 100644 --- a/src/vs/workbench/contrib/tasks/common/problemCollectors.ts +++ b/src/vs/workbench/contrib/tasks/common/problemCollectors.ts @@ -546,7 +546,7 @@ export class WatchingProblemCollector extends AbstractProblemCollector implement } } - public done(): void { + public override done(): void { [...this.applyToByOwner.keys()].forEach(owner => { this.recordResourcesToClean(owner); }); diff --git a/src/vs/workbench/contrib/tasks/common/problemMatcher.ts b/src/vs/workbench/contrib/tasks/common/problemMatcher.ts index 66db97d2fe66b6..a115b921876fbe 100644 --- a/src/vs/workbench/contrib/tasks/common/problemMatcher.ts +++ b/src/vs/workbench/contrib/tasks/common/problemMatcher.ts @@ -424,7 +424,7 @@ class SingleLineMatcher extends AbstractLineMatcher { return 1; } - public handle(lines: string[], start: number = 0): HandleResult { + public override handle(lines: string[], start: number = 0): HandleResult { Assert.ok(lines.length - start === 1); let data: ProblemData = Object.create(null); if (this.pattern.kind !== undefined) { @@ -441,7 +441,7 @@ class SingleLineMatcher extends AbstractLineMatcher { return { match: null, continue: false }; } - public next(line: string): ProblemMatch | null { + public override next(line: string): ProblemMatch | null { return null; } } @@ -460,7 +460,7 @@ class MultiLineMatcher extends AbstractLineMatcher { return this.patterns.length; } - public handle(lines: string[], start: number = 0): HandleResult { + public override handle(lines: string[], start: number = 0): HandleResult { Assert.ok(lines.length - start === this.patterns.length); this.data = Object.create(null); let data = this.data!; @@ -486,7 +486,7 @@ class MultiLineMatcher extends AbstractLineMatcher { return { match: markerMatch ? markerMatch : null, continue: loop }; } - public next(line: string): ProblemMatch | null { + public override next(line: string): ProblemMatch | null { let pattern = this.patterns[this.patterns.length - 1]; Assert.ok(pattern.loop === true && this.data !== null); let matches = pattern.regexp.exec(line); diff --git a/src/vs/workbench/contrib/tasks/common/tasks.ts b/src/vs/workbench/contrib/tasks/common/tasks.ts index c8ca3c4fa9f964..3532f09d686456 100644 --- a/src/vs/workbench/contrib/tasks/common/tasks.ts +++ b/src/vs/workbench/contrib/tasks/common/tasks.ts @@ -670,7 +670,7 @@ export class CustomTask extends CommonTask { /** * Indicated the source of the task (e.g. tasks.json or extension) */ - _source: FileBasedTaskSource; + override _source: FileBasedTaskSource; hasDefinedMatchers: boolean; @@ -689,7 +689,7 @@ export class CustomTask extends CommonTask { } } - public clone(): CustomTask { + public override clone(): CustomTask { return new CustomTask(this._id, this._source, this._label, this.type, this.command, this.hasDefinedMatchers, this.runOptions, this.configurationProperties); } @@ -700,7 +700,7 @@ export class CustomTask extends CommonTask { return undefined; } - public getDefinition(useSource: boolean = false): KeyedTaskIdentifier { + public override getDefinition(useSource: boolean = false): KeyedTaskIdentifier { if (useSource && this._source.customizes !== undefined) { return this._source.customizes; } else { @@ -740,7 +740,7 @@ export class CustomTask extends CommonTask { return value instanceof CustomTask; } - public getMapKey(): string { + public override getMapKey(): string { let workspaceFolder = this._source.config.workspaceFolder; return workspaceFolder ? `${workspaceFolder.uri.toString()}|${this._id}|${this.instance}` : `${this._id}|${this.instance}`; } @@ -749,11 +749,11 @@ export class CustomTask extends CommonTask { return this._source.kind === TaskSourceKind.User ? USER_TASKS_GROUP_KEY : this._source.config.workspaceFolder?.uri.toString(); } - public getCommonTaskId(): string { + public override getCommonTaskId(): string { return this._source.customizes ? super.getCommonTaskId() : (this.getRecentlyUsedKey() ?? super.getCommonTaskId()); } - public getRecentlyUsedKey(): string | undefined { + public override getRecentlyUsedKey(): string | undefined { interface CustomKey { type: string; folder: string; @@ -771,15 +771,15 @@ export class CustomTask extends CommonTask { return JSON.stringify(key); } - public getWorkspaceFolder(): IWorkspaceFolder | undefined { + public override getWorkspaceFolder(): IWorkspaceFolder | undefined { return this._source.config.workspaceFolder; } - public getWorkspaceFileName(): string | undefined { + public override getWorkspaceFileName(): string | undefined { return (this._source.config.workspace && this._source.config.workspace.configuration) ? resources.basename(this._source.config.workspace.configuration) : undefined; } - public getTelemetryKind(): string { + public override getTelemetryKind(): string { if (this._source.customizes) { return 'workspace>extension'; } else { @@ -797,7 +797,7 @@ export class ConfiguringTask extends CommonTask { /** * Indicated the source of the task (e.g. tasks.json or extension) */ - _source: FileBasedTaskSource; + override _source: FileBasedTaskSource; configures: KeyedTaskIdentifier; @@ -816,15 +816,15 @@ export class ConfiguringTask extends CommonTask { return object; } - public getDefinition(): KeyedTaskIdentifier { + public override getDefinition(): KeyedTaskIdentifier { return this.configures; } - public getWorkspaceFileName(): string | undefined { + public override getWorkspaceFileName(): string | undefined { return (this._source.config.workspace && this._source.config.workspace.configuration) ? resources.basename(this._source.config.workspace.configuration) : undefined; } - public getWorkspaceFolder(): IWorkspaceFolder | undefined { + public override getWorkspaceFolder(): IWorkspaceFolder | undefined { return this._source.config.workspaceFolder; } @@ -832,7 +832,7 @@ export class ConfiguringTask extends CommonTask { return this._source.kind === TaskSourceKind.User ? USER_TASKS_GROUP_KEY : this._source.config.workspaceFolder?.uri.toString(); } - public getRecentlyUsedKey(): string | undefined { + public override getRecentlyUsedKey(): string | undefined { interface CustomKey { type: string; folder: string; @@ -879,11 +879,11 @@ export class ContributedTask extends CommonTask { this.command = command; } - public clone(): ContributedTask { + public override clone(): ContributedTask { return new ContributedTask(this._id, this._source, this._label, this.type, this.defines, this.command, this.hasDefinedMatchers, this.runOptions, this.configurationProperties); } - public getDefinition(): KeyedTaskIdentifier { + public override getDefinition(): KeyedTaskIdentifier { return this.defines; } @@ -891,7 +891,7 @@ export class ContributedTask extends CommonTask { return value instanceof ContributedTask; } - public getMapKey(): string { + public override getMapKey(): string { let workspaceFolder = this._source.workspaceFolder; return workspaceFolder ? `${this._source.scope.toString()}|${workspaceFolder.uri.toString()}|${this._id}|${this.instance}` @@ -905,7 +905,7 @@ export class ContributedTask extends CommonTask { return undefined; } - public getRecentlyUsedKey(): string | undefined { + public override getRecentlyUsedKey(): string | undefined { interface ContributedKey { type: string; scope: number; @@ -918,11 +918,11 @@ export class ContributedTask extends CommonTask { return JSON.stringify(key); } - public getWorkspaceFolder(): IWorkspaceFolder | undefined { + public override getWorkspaceFolder(): IWorkspaceFolder | undefined { return this._source.workspaceFolder; } - public getTelemetryKind(): string { + public override getTelemetryKind(): string { return 'extension'; } @@ -935,7 +935,7 @@ export class InMemoryTask extends CommonTask { /** * Indicated the source of the task (e.g. tasks.json or extension) */ - _source: InMemoryTaskSource; + override _source: InMemoryTaskSource; instance: number | undefined; @@ -947,7 +947,7 @@ export class InMemoryTask extends CommonTask { this._source = source; } - public clone(): InMemoryTask { + public override clone(): InMemoryTask { return new InMemoryTask(this._id, this._source, this._label, this.type, this.runOptions, this.configurationProperties); } @@ -955,11 +955,11 @@ export class InMemoryTask extends CommonTask { return value instanceof InMemoryTask; } - public getTelemetryKind(): string { + public override getTelemetryKind(): string { return 'composite'; } - public getMapKey(): string { + public override getMapKey(): string { return `${this._id}|${this.instance}`; } diff --git a/src/vs/workbench/contrib/tasks/test/common/configuration.test.ts b/src/vs/workbench/contrib/tasks/test/common/configuration.test.ts index b7fae91924d84f..5f4ab95416fee7 100644 --- a/src/vs/workbench/contrib/tasks/test/common/configuration.test.ts +++ b/src/vs/workbench/contrib/tasks/test/common/configuration.test.ts @@ -361,7 +361,7 @@ class PatternBuilder { } class TasksMockContextKeyService extends MockContextKeyService { - public getContext(domNode: HTMLElement): IContext { + public override getContext(domNode: HTMLElement): IContext { return { getValue: (_key: string) => { return true; diff --git a/src/vs/workbench/contrib/terminal/browser/links/terminalLink.ts b/src/vs/workbench/contrib/terminal/browser/links/terminalLink.ts index 19521e14c4197e..6c382e0e04a1a7 100644 --- a/src/vs/workbench/contrib/terminal/browser/links/terminalLink.ts +++ b/src/vs/workbench/contrib/terminal/browser/links/terminalLink.ts @@ -44,7 +44,7 @@ export class TerminalLink extends DisposableStore implements ILink { }; } - dispose(): void { + override dispose(): void { super.dispose(); this._hoverListeners?.dispose(); this._hoverListeners = undefined; diff --git a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts index dcad36009a6762..b6605889c85a51 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts @@ -100,7 +100,7 @@ export class TerminalLaunchHelpAction extends Action { super('workbench.action.terminal.launchHelp', localize('terminalLaunchHelp', "Open Help")); } - async run(): Promise { + async override run(): Promise { this._openerService.open('https://aka.ms/vscode-troubleshoot-terminal-launch'); } } diff --git a/src/vs/workbench/contrib/terminal/browser/terminalFindWidget.ts b/src/vs/workbench/contrib/terminal/browser/terminalFindWidget.ts index ce03ffc98575e5..038c3424f808ce 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalFindWidget.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalFindWidget.ts @@ -39,7 +39,7 @@ export class TerminalFindWidget extends SimpleFindWidget { } } - public hide() { + public override hide() { super.hide(); const instance = this._terminalService.getActiveInstance(); if (instance) { diff --git a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts index c8a9d2ed03cde5..6450ad88010483 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts @@ -808,7 +808,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance { this._terminalAltBufferActiveContextKey.set(!!(this._xterm && this._xterm.buffer.active === this._xterm.buffer.alternate)); } - public dispose(immediate?: boolean): void { + public override dispose(immediate?: boolean): void { this._logService.trace(`terminalInstance#dispose (instanceId: ${this.instanceId})`); dispose(this._linkManager); diff --git a/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts b/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts index c147aaf12e28fb..5f1cb27eb9dd1c 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts @@ -148,7 +148,7 @@ export class TerminalProcessManager extends Disposable implements ITerminalProce }); } - public dispose(immediate: boolean = false): void { + public override dispose(immediate: boolean = false): void { this._isDisposed = true; if (this._process) { // If the process was still connected this dispose came from diff --git a/src/vs/workbench/contrib/terminal/browser/terminalTab.ts b/src/vs/workbench/contrib/terminal/browser/terminalTab.ts index 95599ea105f5a5..73415c7939b73e 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalTab.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalTab.ts @@ -281,7 +281,7 @@ export class TerminalTab extends Disposable implements ITerminalTab { this._onInstancesChanged.fire(); } - public dispose(): void { + public override dispose(): void { super.dispose(); if (this._container && this._tabElement) { this._container.removeChild(this._tabElement); diff --git a/src/vs/workbench/contrib/terminal/browser/terminalTypeAheadAddon.ts b/src/vs/workbench/contrib/terminal/browser/terminalTypeAheadAddon.ts index efe2e6fd63974d..e665a3b6b4a64a 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalTypeAheadAddon.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalTypeAheadAddon.ts @@ -516,13 +516,13 @@ class NewlinePrediction implements IPrediction { * prediction, but shells handle it slightly differently. */ class LinewrapPrediction extends NewlinePrediction implements IPrediction { - public apply(_: IBuffer, cursor: Cursor) { + public override apply(_: IBuffer, cursor: Cursor) { this.prevPosition = cursor.coordinate; cursor.move(0, cursor.y + 1); return ' \r'; } - public matches(input: StringReader) { + public override matches(input: StringReader) { // bash and zshell add a space which wraps in the terminal, then a CR const r = input.eatGradually(' \r'); if (r !== MatchResult.Failure) { diff --git a/src/vs/workbench/contrib/terminal/browser/terminalView.ts b/src/vs/workbench/contrib/terminal/browser/terminalView.ts index 5015ca7a63e703..880b019066b07d 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalView.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalView.ts @@ -89,7 +89,7 @@ export class TerminalViewPane extends ViewPane { }); } - protected renderBody(container: HTMLElement): void { + protected override renderBody(container: HTMLElement): void { super.renderBody(container); this._parentDomElement = container; @@ -160,7 +160,7 @@ export class TerminalViewPane extends ViewPane { this.layoutBody(this._terminalContainer.offsetHeight, this._terminalContainer.offsetWidth); } - protected layoutBody(height: number, width: number): void { + protected override layoutBody(height: number, width: number): void { super.layoutBody(height, width); this._bodyDimensions.width = width; @@ -168,7 +168,7 @@ export class TerminalViewPane extends ViewPane { this._terminalService.terminalTabs.forEach(t => t.layout(width, height)); } - public getActionViewItem(action: Action): IActionViewItem | undefined { + public override getActionViewItem(action: Action): IActionViewItem | undefined { if (action.id === TERMINAL_COMMAND_ID.SWITCH_TERMINAL) { return this._instantiationService.createInstance(SwitchTerminalActionViewItem, action); } @@ -176,7 +176,7 @@ export class TerminalViewPane extends ViewPane { return super.getActionViewItem(action); } - public focus() { + public override focus() { if (this._terminalService.connectionState === TerminalConnectionState.Connecting) { // If the terminal is waiting to reconnect to remote terminals, then there is no TerminalInstance yet that can // be focused. So wait for connection to finish, then focus. @@ -347,7 +347,7 @@ export class TerminalViewPane extends ViewPane { this._findWidget?.updateTheme(theme); } - shouldShowWelcome(): boolean { + override shouldShowWelcome(): boolean { this._isWelcomeShowing = !this._terminalService.isProcessSupportRegistered && this._terminalService.terminalInstances.length === 0; return this._isWelcomeShowing; } @@ -385,7 +385,7 @@ class SwitchTerminalActionViewItem extends SelectActionViewItem { this._register(attachSelectBoxStyler(this.selectBox, this._themeService)); } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { super.render(container); container.classList.add('switch-terminal'); this._register(attachStylerCallback(this._themeService, { selectBorder }, colors => { diff --git a/src/vs/workbench/contrib/terminal/browser/widgets/environmentVariableInfoWidget.ts b/src/vs/workbench/contrib/terminal/browser/widgets/environmentVariableInfoWidget.ts index b13ff32f460bac..f843f08e0ad834 100644 --- a/src/vs/workbench/contrib/terminal/browser/widgets/environmentVariableInfoWidget.ts +++ b/src/vs/workbench/contrib/terminal/browser/widgets/environmentVariableInfoWidget.ts @@ -65,7 +65,7 @@ export class EnvironmentVariableInfoWidget extends Widget implements ITerminalWi }); } - dispose() { + override dispose() { super.dispose(); this._domNode?.parentElement?.removeChild(this._domNode); this._mouseMoveListener?.dispose(); diff --git a/src/vs/workbench/contrib/terminal/browser/widgets/terminalHoverWidget.ts b/src/vs/workbench/contrib/terminal/browser/widgets/terminalHoverWidget.ts index fcf02fb583eecf..dd8904d0df2d2e 100644 --- a/src/vs/workbench/contrib/terminal/browser/widgets/terminalHoverWidget.ts +++ b/src/vs/workbench/contrib/terminal/browser/widgets/terminalHoverWidget.ts @@ -35,7 +35,7 @@ export class TerminalHover extends Disposable implements ITerminalWidget { super(); } - dispose() { + override dispose() { super.dispose(); } @@ -117,7 +117,7 @@ class CellHoverTarget extends Widget implements IHoverTarget { container.appendChild(this._domNode); } - dispose(): void { + override dispose(): void { this._domNode?.parentElement?.removeChild(this._domNode); super.dispose(); } diff --git a/src/vs/workbench/contrib/terminal/electron-sandbox/terminalRemote.ts b/src/vs/workbench/contrib/terminal/electron-sandbox/terminalRemote.ts index 030ede3dd1dccd..3df718ab3ec30a 100644 --- a/src/vs/workbench/contrib/terminal/electron-sandbox/terminalRemote.ts +++ b/src/vs/workbench/contrib/terminal/electron-sandbox/terminalRemote.ts @@ -29,7 +29,7 @@ export class CreateNewLocalTerminalAction extends Action { super(id, label); } - public run(): Promise { + public override run(): Promise { const instance = this._terminalService.createTerminal({ cwd: this._nativeEnvironmentService.userHome }); if (!instance) { return Promise.resolve(undefined); diff --git a/src/vs/workbench/contrib/testing/browser/explorerProjections/hierarchalByName.ts b/src/vs/workbench/contrib/testing/browser/explorerProjections/hierarchalByName.ts index 4e379d918c5407..41a5824a3a57aa 100644 --- a/src/vs/workbench/contrib/testing/browser/explorerProjections/hierarchalByName.ts +++ b/src/vs/workbench/contrib/testing/browser/explorerProjections/hierarchalByName.ts @@ -34,7 +34,7 @@ export class HierarchicalByNameElement extends HierarchicalElement { public readonly isTestRoot = !this.actualParent; public readonly actualChildren = new Set(); - public get expandable() { + public override get expandable() { return TestItemExpandState.NotExpandable; } @@ -68,7 +68,7 @@ export class HierarchicalByNameElement extends HierarchicalElement { /** * @override */ - public update(patch: ITestItemUpdate) { + public override update(patch: ITestItemUpdate) { super.update(patch); if (patch.item?.runnable !== undefined) { @@ -136,7 +136,7 @@ export class HierarchicalByNameProjection extends HierarchicalByLocationProjecti /** * @override */ - protected createItem(item: InternalTestItem, folder: IWorkspaceFolder): HierarchicalElement { + protected override createItem(item: InternalTestItem, folder: IWorkspaceFolder): HierarchicalElement { const parent = this.getOrCreateFolderElement(folder); const actualParent = item.parent ? this.items.get(item.parent) as HierarchicalByNameElement : undefined; for (const testRoot of parent.children) { @@ -151,7 +151,7 @@ export class HierarchicalByNameProjection extends HierarchicalByLocationProjecti /** * @override */ - protected unstoreItem(item: HierarchicalElement) { + protected override unstoreItem(item: HierarchicalElement) { const treeChildren = super.unstoreItem(item); if (item instanceof HierarchicalByNameElement) { item.remove(); @@ -164,7 +164,7 @@ export class HierarchicalByNameProjection extends HierarchicalByLocationProjecti /** * @override */ - protected getRevealDepth(element: HierarchicalElement) { + protected override getRevealDepth(element: HierarchicalElement) { return element.depth === 1 ? Infinity : undefined; } } diff --git a/src/vs/workbench/contrib/testing/browser/testExplorerActions.ts b/src/vs/workbench/contrib/testing/browser/testExplorerActions.ts index 6fb5b296ee14cf..d1f066f0e009d8 100644 --- a/src/vs/workbench/contrib/testing/browser/testExplorerActions.ts +++ b/src/vs/workbench/contrib/testing/browser/testExplorerActions.ts @@ -72,7 +72,7 @@ export class HideOrShowTestAction extends Action { /** * @override */ - public run() { + public override run() { this.testService.setTestExcluded(this.testId); return Promise.resolve(); } @@ -95,7 +95,7 @@ export class DebugAction extends Action { /** * @override */ - public run(): Promise { + public override run(): Promise { return this.testService.runTests({ tests: [...this.tests], debug: true, @@ -120,7 +120,7 @@ export class RunAction extends Action { /** * @override */ - public run(): Promise { + public override run(): Promise { return this.testService.runTests({ tests: [...this.tests], debug: false, @@ -520,7 +520,7 @@ export class EditFocusedTest extends ViewAction { }); } - public async run(accessor: ServicesAccessor, test?: ITestItem, preserveFocus?: boolean) { + public async override run(accessor: ServicesAccessor, test?: ITestItem, preserveFocus?: boolean) { if (test) { await this.runForTest(accessor, test, preserveFocus); } else { diff --git a/src/vs/workbench/contrib/testing/browser/testingDecorations.ts b/src/vs/workbench/contrib/testing/browser/testingDecorations.ts index cd1e0fd3292e08..5360799a39c61c 100644 --- a/src/vs/workbench/contrib/testing/browser/testingDecorations.ts +++ b/src/vs/workbench/contrib/testing/browser/testingDecorations.ts @@ -311,7 +311,7 @@ class RunTestDecoration extends Disposable implements ITestDecoration { return true; } - public dispose() { + public override dispose() { // no-op } diff --git a/src/vs/workbench/contrib/testing/browser/testingExplorerFilter.ts b/src/vs/workbench/contrib/testing/browser/testingExplorerFilter.ts index aa31df731aa8e1..04f12a92609bda 100644 --- a/src/vs/workbench/contrib/testing/browser/testingExplorerFilter.ts +++ b/src/vs/workbench/contrib/testing/browser/testingExplorerFilter.ts @@ -104,7 +104,7 @@ export class TestingExplorerFilter extends BaseActionViewItem { /** * @override */ - public render(container: HTMLElement) { + public override render(container: HTMLElement) { container.classList.add('testing-filter-action-item'); const updateDelayer = this._register(new Delayer(400)); @@ -154,7 +154,7 @@ export class TestingExplorerFilter extends BaseActionViewItem { /** * Focuses the filter input. */ - public focus(): void { + public override focus(): void { this.input.focus(); } @@ -173,7 +173,7 @@ export class TestingExplorerFilter extends BaseActionViewItem { /** * @override */ - public dispose() { + public override dispose() { this.saveState(); super.dispose(); } @@ -209,7 +209,7 @@ class FiltersDropdownMenuActionViewItem extends DropdownMenuActionViewItem { ); } - render(container: HTMLElement): void { + override render(container: HTMLElement): void { super.render(container); this.updateChecked(); } @@ -267,7 +267,7 @@ class FiltersDropdownMenuActionViewItem extends DropdownMenuActionViewItem { ]; } - updateChecked(): void { + override updateChecked(): void { this.element!.classList.toggle('checked', this._action.checked); } } diff --git a/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts b/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts index e9e3f2021765d0..542763578e0fe5 100644 --- a/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts +++ b/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts @@ -94,14 +94,14 @@ export class TestingExplorerView extends ViewPane { /** * @override */ - public shouldShowWelcome() { + public override shouldShowWelcome() { return this.testService.providers === 0; } /** * @override */ - protected renderBody(container: HTMLElement): void { + protected override renderBody(container: HTMLElement): void { super.renderBody(container); this.container = dom.append(container, dom.$('.test-explorer')); @@ -145,7 +145,7 @@ export class TestingExplorerView extends ViewPane { /** * @override */ - public getActionViewItem(action: IAction): IActionViewItem | undefined { + public override getActionViewItem(action: IAction): IActionViewItem | undefined { if (action.id === Testing.FilterActionId) { return this.instantiationService.createInstance(TestingExplorerFilter, action); } @@ -156,7 +156,7 @@ export class TestingExplorerView extends ViewPane { /** * @override */ - public saveState() { + public override saveState() { super.saveState(); } @@ -181,7 +181,7 @@ export class TestingExplorerView extends ViewPane { /** * @override */ - protected layoutBody(height: number, width: number): void { + protected override layoutBody(height: number, width: number): void { super.layoutBody(height, width); this.container.style.height = `${height}px`; this.viewModel.layout(height, width); diff --git a/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts b/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts index e23bd334eb20a4..4a778721adb235 100644 --- a/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts +++ b/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts @@ -329,7 +329,7 @@ abstract class TestingOutputPeek extends PeekViewWidget { /** * @override */ - protected _doLayoutBody(height: number, width: number) { + protected override _doLayoutBody(height: number, width: number) { super._doLayoutBody(height, width); this.dimension = new dom.Dimension(width, height); } @@ -415,7 +415,7 @@ class TestingDiffOutputPeek extends TestingOutputPeek { /** * @override */ - protected _doLayoutBody(height: number, width: number) { + protected override _doLayoutBody(height: number, width: number) { super._doLayoutBody(height, width); this.diff.value?.layout(this.dimension); } @@ -468,7 +468,7 @@ class TestingMessageOutputPeek extends TestingOutputPeek { /** * @override */ - protected _doLayoutBody(height: number, width: number) { + protected override _doLayoutBody(height: number, width: number) { super._doLayoutBody(height, width); this.preview.value?.layout(this.dimension); } @@ -490,7 +490,7 @@ class SimpleDiffEditorModel extends EditorModel { super(); } - public dispose() { + public override dispose() { super.dispose(); this._original.dispose(); this._modified.dispose(); diff --git a/src/vs/workbench/contrib/testing/browser/testingViewPaneContainer.ts b/src/vs/workbench/contrib/testing/browser/testingViewPaneContainer.ts index 974f93ba539042..783093f9f78467 100644 --- a/src/vs/workbench/contrib/testing/browser/testingViewPaneContainer.ts +++ b/src/vs/workbench/contrib/testing/browser/testingViewPaneContainer.ts @@ -34,16 +34,16 @@ export class TestingViewPaneContainer extends ViewPaneContainer { super(Testing.ViewletId, { mergeViewWithContainerWhenSingleView: true }, instantiationService, configurationService, layoutService, contextMenuService, telemetryService, extensionService, themeService, storageService, contextService, viewDescriptorService); } - create(parent: HTMLElement): void { + override create(parent: HTMLElement): void { super.create(parent); parent.classList.add('testing-view-pane'); } - getOptimalWidth(): number { + override getOptimalWidth(): number { return 400; } - getTitle(): string { + override getTitle(): string { return localize('testing', "Testing"); } } diff --git a/src/vs/workbench/contrib/testing/common/testServiceImpl.ts b/src/vs/workbench/contrib/testing/common/testServiceImpl.ts index 069e5efc788f50..d9aed4e08a785d 100644 --- a/src/vs/workbench/contrib/testing/common/testServiceImpl.ts +++ b/src/vs/workbench/contrib/testing/common/testServiceImpl.ts @@ -456,7 +456,7 @@ export class MainThreadTestCollection extends AbstractIncrementalTestCollection< /** * Applies the diff to the collection. */ - public apply(diff: TestsDiff) { + public override apply(diff: TestsDiff) { let prevBusy = this.busyProviderCount; let prevPendingRoots = this.pendingRootCount; super.apply(diff); @@ -495,7 +495,7 @@ export class MainThreadTestCollection extends AbstractIncrementalTestCollection< /** * @override */ - protected retireTest(testId: string) { + protected override retireTest(testId: string) { this.retireTestEmitter.fire(testId); } diff --git a/src/vs/workbench/contrib/testing/common/testStubs.ts b/src/vs/workbench/contrib/testing/common/testStubs.ts index 1e4af97bf6af21..5c0e5241df64f9 100644 --- a/src/vs/workbench/contrib/testing/common/testStubs.ts +++ b/src/vs/workbench/contrib/testing/common/testStubs.ts @@ -14,7 +14,7 @@ export class StubTestItem extends TestItem { super(id, label, URI.file('/'), pendingChildren.length > 0); } - public discoverChildren(progress: IProgress<{ busy: boolean }>) { + public override discoverChildren(progress: IProgress<{ busy: boolean }>) { for (const child of this.pendingChildren) { this.children.add(child); } diff --git a/src/vs/workbench/contrib/testing/test/common/ownedTestCollection.ts b/src/vs/workbench/contrib/testing/test/common/ownedTestCollection.ts index 87b248eab5ee24..8ac8a8d22ce0a6 100644 --- a/src/vs/workbench/contrib/testing/test/common/ownedTestCollection.ts +++ b/src/vs/workbench/contrib/testing/test/common/ownedTestCollection.ts @@ -28,7 +28,7 @@ export class TestOwnedTestCollection extends OwnedTestCollection { return Iterable.first(this.testIdsToInternal.values())!; } - public createForHierarchy(publishDiff: (diff: TestsDiff) => void = () => undefined) { + public override createForHierarchy(publishDiff: (diff: TestsDiff) => void = () => undefined) { return new TestSingleUseCollection(this.createIdMap(0), publishDiff); } } diff --git a/src/vs/workbench/contrib/testing/test/common/testResultService.test.ts b/src/vs/workbench/contrib/testing/test/common/testResultService.test.ts index 7372f4dc969c89..061261b83e284d 100644 --- a/src/vs/workbench/contrib/testing/test/common/testResultService.test.ts +++ b/src/vs/workbench/contrib/testing/test/common/testResultService.test.ts @@ -136,7 +136,7 @@ suite('Workbench - Test Results Service', () => { let results: TestResultService; class TestTestResultService extends TestResultService { - persistScheduler = { schedule: () => this.persistImmediately() } as any; + override persistScheduler = { schedule: () => this.persistImmediately() } as any; } setup(() => { diff --git a/src/vs/workbench/contrib/themes/browser/themes.contribution.ts b/src/vs/workbench/contrib/themes/browser/themes.contribution.ts index 9c00aae3317540..5ce51eb1821c10 100644 --- a/src/vs/workbench/contrib/themes/browser/themes.contribution.ts +++ b/src/vs/workbench/contrib/themes/browser/themes.contribution.ts @@ -39,7 +39,7 @@ export class SelectColorThemeAction extends Action { super(id, label); } - run(): Promise { + override run(): Promise { return this.themeService.getColorThemes().then(themes => { const currentTheme = this.themeService.getColorTheme(); @@ -203,7 +203,7 @@ class SelectFileIconThemeAction extends AbstractIconThemeAction { return this.themeService.setFileIconTheme(id, settingsTarget); } - async run(): Promise { + async override run(): Promise { this.pick(await this.themeService.getFileIconThemes(), this.themeService.getFileIconTheme()); } } @@ -234,7 +234,7 @@ class SelectProductIconThemeAction extends AbstractIconThemeAction { return this.themeService.setProductIconTheme(id, settingsTarget); } - async run(): Promise { + async override run(): Promise { this.pick(await this.themeService.getProductIconThemes(), this.themeService.getProductIconTheme()); } } @@ -298,7 +298,7 @@ class GenerateColorThemeAction extends Action { super(id, label); } - run(): Promise { + override run(): Promise { let theme = this.themeService.getColorTheme(); let colors = Registry.as(ColorRegistryExtensions.ColorContribution).getColors(); let colorIds = colors.map(c => c.id).sort(); diff --git a/src/vs/workbench/contrib/timeline/browser/timelinePane.ts b/src/vs/workbench/contrib/timeline/browser/timelinePane.ts index 4b0994af97028d..a7050bd2aa67ff 100644 --- a/src/vs/workbench/contrib/timeline/browser/timelinePane.ts +++ b/src/vs/workbench/contrib/timeline/browser/timelinePane.ts @@ -797,12 +797,12 @@ export class TimelinePane extends ViewPane { this.refresh(); } - focus(): void { + override focus(): void { super.focus(); this.tree.domFocus(); } - setExpanded(expanded: boolean): boolean { + override setExpanded(expanded: boolean): boolean { const changed = super.setExpanded(expanded); if (changed && this.isBodyVisible()) { @@ -816,7 +816,7 @@ export class TimelinePane extends ViewPane { return changed; } - setVisible(visible: boolean): void { + override setVisible(visible: boolean): void { if (visible) { this.visibilityDisposables = new DisposableStore(); @@ -834,18 +834,18 @@ export class TimelinePane extends ViewPane { } } - protected layoutBody(height: number, width: number): void { + protected override layoutBody(height: number, width: number): void { super.layoutBody(height, width); this.tree.layout(height, width); } - protected renderHeaderTitle(container: HTMLElement): void { + protected override renderHeaderTitle(container: HTMLElement): void { super.renderHeaderTitle(container, this.title); container.classList.add('timeline-view'); } - protected renderBody(container: HTMLElement): void { + protected override renderBody(container: HTMLElement): void { super.renderBody(container); this.$container = container; @@ -1051,7 +1051,7 @@ export class TimelineIdentityProvider implements IIdentityProvider class TimelineActionRunner extends ActionRunner { - runAction(action: IAction, { uri, item }: TimelineActionContext): Promise { + override runAction(action: IAction, { uri, item }: TimelineActionContext): Promise { if (!isTimelineItem(item)) { // TODO@eamodio do we need to do anything else? return action.run(); diff --git a/src/vs/workbench/contrib/update/browser/update.ts b/src/vs/workbench/contrib/update/browser/update.ts index 2315cdb25b0662..e32f8e2a9ca5b0 100644 --- a/src/vs/workbench/contrib/update/browser/update.ts +++ b/src/vs/workbench/contrib/update/browser/update.ts @@ -54,7 +54,7 @@ export class OpenLatestReleaseNotesInBrowserAction extends Action { super('update.openLatestReleaseNotes', nls.localize('releaseNotes', "Release Notes"), undefined, true); } - async run(): Promise { + async override run(): Promise { if (this.productService.releaseNotesUrl) { const uri = URI.parse(this.productService.releaseNotesUrl); await this.openerService.open(uri); @@ -75,7 +75,7 @@ export abstract class AbstractShowReleaseNotesAction extends Action { super(id, label, undefined, true); } - async run(): Promise { + async override run(): Promise { if (!this.enabled) { return; } @@ -636,7 +636,7 @@ export class CheckForVSCodeUpdateAction extends Action { super(id, label, undefined, true); } - run(): Promise { + override run(): Promise { return this.updateService.checkForUpdates(this.environmentService.sessionId); } } diff --git a/src/vs/workbench/contrib/userDataSync/browser/userDataSync.ts b/src/vs/workbench/contrib/userDataSync/browser/userDataSync.ts index 2a8095c0e9bf01..9e443a31a49a25 100644 --- a/src/vs/workbench/contrib/userDataSync/browser/userDataSync.ts +++ b/src/vs/workbench/contrib/userDataSync/browser/userDataSync.ts @@ -1333,7 +1333,7 @@ class AcceptChangesContribution extends Disposable implements IEditorContributio this.acceptChangesButton = undefined; } - dispose(): void { + override dispose(): void { this.disposeAcceptChangesWidgetRenderer(); super.dispose(); } diff --git a/src/vs/workbench/contrib/userDataSync/browser/userDataSyncMergesView.ts b/src/vs/workbench/contrib/userDataSync/browser/userDataSyncMergesView.ts index cbfc048962f145..cb0c35e2c0d355 100644 --- a/src/vs/workbench/contrib/userDataSync/browser/userDataSyncMergesView.ts +++ b/src/vs/workbench/contrib/userDataSync/browser/userDataSyncMergesView.ts @@ -77,7 +77,7 @@ export class UserDataSyncMergesViewPane extends TreeViewPane { this.registerActions(); } - protected renderTreeView(container: HTMLElement): void { + protected override renderTreeView(container: HTMLElement): void { super.renderTreeView(DOM.append(container, DOM.$(''))); this.createButtons(container); @@ -101,7 +101,7 @@ export class UserDataSyncMergesViewPane extends TreeViewPane { this._register(this.cancelButton.onDidClick(() => this.cancel())); } - protected layoutTreeView(height: number, width: number): void { + protected override layoutTreeView(height: number, width: number): void { const buttonContainerHeight = 78; this.buttonsContainer.style.height = `${buttonContainerHeight}px`; this.buttonsContainer.style.width = `${width}px`; @@ -499,7 +499,7 @@ class AcceptChangesContribution extends Disposable implements IEditorContributio this.acceptChangesButton = undefined; } - dispose(): void { + override dispose(): void { this.disposeAcceptChangesWidgetRenderer(); super.dispose(); } diff --git a/src/vs/workbench/contrib/userDataSync/browser/userDataSyncViews.ts b/src/vs/workbench/contrib/userDataSync/browser/userDataSyncViews.ts index d66cdd4382ac4e..1f00fd952002d6 100644 --- a/src/vs/workbench/contrib/userDataSync/browser/userDataSyncViews.ts +++ b/src/vs/workbench/contrib/userDataSync/browser/userDataSyncViews.ts @@ -339,7 +339,7 @@ class RemoteUserDataSyncActivityViewDataProvider extends UserDataSyncActivityVie super(userDataSyncService, userDataAutoSyncService, userDataSyncWorkbenchService, notificationService); } - async getChildren(element?: ITreeItem): Promise { + async override getChildren(element?: ITreeItem): Promise { if (!element) { this.machinesPromise = undefined; } @@ -357,7 +357,7 @@ class RemoteUserDataSyncActivityViewDataProvider extends UserDataSyncActivityVie return this.userDataSyncService.getRemoteSyncResourceHandles(syncResource); } - protected async getChildrenForSyncResourceTreeItem(element: SyncResourceHandleTreeItem): Promise { + protected async override getChildrenForSyncResourceTreeItem(element: SyncResourceHandleTreeItem): Promise { const children = await super.getChildrenForSyncResourceTreeItem(element); if (children.length) { const machineId = await this.userDataSyncService.getMachineId(element.syncResourceHandle.syncResource, element.syncResourceHandle); diff --git a/src/vs/workbench/contrib/webview/browser/baseWebviewElement.ts b/src/vs/workbench/contrib/webview/browser/baseWebviewElement.ts index 086e64311e5519..3368c3a12ad3de 100644 --- a/src/vs/workbench/contrib/webview/browser/baseWebviewElement.ts +++ b/src/vs/workbench/contrib/webview/browser/baseWebviewElement.ts @@ -171,7 +171,7 @@ export abstract class BaseWebview extends Disposable { this._register(webviewThemeDataProvider.onThemeDataChanged(this.style, this)); } - dispose(): void { + override dispose(): void { if (this.element) { this.element.remove(); } diff --git a/src/vs/workbench/contrib/webview/browser/dynamicWebviewEditorOverlay.ts b/src/vs/workbench/contrib/webview/browser/dynamicWebviewEditorOverlay.ts index 1a9d6c2f1595b9..80cfb3a585116e 100644 --- a/src/vs/workbench/contrib/webview/browser/dynamicWebviewEditorOverlay.ts +++ b/src/vs/workbench/contrib/webview/browser/dynamicWebviewEditorOverlay.ts @@ -65,7 +65,7 @@ export class DynamicWebviewEditorOverlay extends Disposable implements WebviewOv private readonly _onDidDispose = this._register(new Emitter()); public onDidDispose = this._onDidDispose.event; - dispose() { + override dispose() { this._isDisposed = true; this.container.remove(); this._onDidDispose.fire(); diff --git a/src/vs/workbench/contrib/webview/browser/webviewElement.ts b/src/vs/workbench/contrib/webview/browser/webviewElement.ts index 34a48da259aa1b..1858054d63fc6a 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewElement.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewElement.ts @@ -139,7 +139,7 @@ export class IFrameWebview extends BaseWebview implements Web } } - public set html(value: string) { + public override set html(value: string) { super.html = this.preprocessHtml(value); } diff --git a/src/vs/workbench/contrib/webview/browser/webviewFindWidget.ts b/src/vs/workbench/contrib/webview/browser/webviewFindWidget.ts index ed69cb1a7f51b3..109d1e547cedbe 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewFindWidget.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewFindWidget.ts @@ -40,7 +40,7 @@ export class WebviewFindWidget extends SimpleFindWidget { } } - public hide() { + public override hide() { super.hide(); this._delegate.stopFind(true); this._delegate.focus(); diff --git a/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts b/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts index d3d4930750cbf8..ce085ef3ce0070 100644 --- a/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts +++ b/src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts @@ -187,13 +187,13 @@ export class ElectronWebviewBasedWebview extends BaseWebview impleme return element; } - public set contentOptions(options: WebviewContentOptions) { + public override set contentOptions(options: WebviewContentOptions) { this._myLogService.debug(`Webview(${this.id}): will set content options`); this._resourceRequestManager.update(options); super.contentOptions = options; } - public set localResourcesRoot(resources: URI[]) { + public override set localResourcesRoot(resources: URI[]) { this._resourceRequestManager.update({ ...this.contentOptions, localResourceRoots: resources, @@ -203,7 +203,7 @@ export class ElectronWebviewBasedWebview extends BaseWebview impleme protected readonly extraContentOptions = {}; - public set html(value: string) { + public override set html(value: string) { this._myLogService.debug(`Webview(${this.id}): will set html`); super.html = rewriteVsCodeResourceUrls(this.id, value); @@ -278,7 +278,7 @@ export class ElectronWebviewBasedWebview extends BaseWebview impleme }); } - protected style(): void { + protected override style(): void { super.style(); this.styledFindWidget(); } @@ -357,27 +357,27 @@ export class ElectronWebviewBasedWebview extends BaseWebview impleme this._webviewFindWidget?.find(previous); } - public selectAll() { + public override selectAll() { this.element?.selectAll(); } - public copy() { + public override copy() { this.element?.copy(); } - public paste() { + public override paste() { this.element?.paste(); } - public cut() { + public override cut() { this.element?.cut(); } - public undo() { + public override undo() { this.element?.undo(); } - public redo() { + public override redo() { this.element?.redo(); } diff --git a/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts b/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts index 70202f572c28f8..0c47969aa805e1 100644 --- a/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts +++ b/src/vs/workbench/contrib/webview/electron-browser/webviewService.ts @@ -21,7 +21,7 @@ export class ElectronWebviewService extends WebviewService { super(instantiationService); } - createWebviewElement( + override createWebviewElement( id: string, options: WebviewOptions, contentOptions: WebviewContentOptions, @@ -33,7 +33,7 @@ export class ElectronWebviewService extends WebviewService { return webview; } - createWebviewOverlay( + override createWebviewOverlay( id: string, options: WebviewOptions, contentOptions: WebviewContentOptions, diff --git a/src/vs/workbench/contrib/webview/electron-sandbox/iframeWebviewElement.ts b/src/vs/workbench/contrib/webview/electron-sandbox/iframeWebviewElement.ts index f39d993e1f025a..5ea23c165d0d5f 100644 --- a/src/vs/workbench/contrib/webview/electron-sandbox/iframeWebviewElement.ts +++ b/src/vs/workbench/contrib/webview/electron-sandbox/iframeWebviewElement.ts @@ -79,16 +79,16 @@ export class ElectronIframeWebview extends IFrameWebview { })); } - protected initElement(extension: WebviewExtensionDescription | undefined, options: WebviewOptions) { + protected override initElement(extension: WebviewExtensionDescription | undefined, options: WebviewOptions) { super.initElement(extension, options, { platform: 'electron' }); } - public set contentOptions(options: WebviewContentOptions) { + public override set contentOptions(options: WebviewContentOptions) { this._resourceRequestManager.update(options); super.contentOptions = options; } - public set localResourcesRoot(resources: URI[]) { + public override set localResourcesRoot(resources: URI[]) { this._resourceRequestManager.update({ ...this.contentOptions, localResourceRoots: resources, @@ -96,11 +96,11 @@ export class ElectronIframeWebview extends IFrameWebview { super.localResourcesRoot = resources; } - protected get extraContentOptions() { + protected override get extraContentOptions() { return {}; } - protected async doPostMessage(channel: string, data?: any): Promise { + protected async override doPostMessage(channel: string, data?: any): Promise { if (!this._isWebviewReadyForMessages) { this._pendingMessages.push({ channel, data }); return; @@ -109,7 +109,7 @@ export class ElectronIframeWebview extends IFrameWebview { this.element?.contentWindow!.postMessage({ channel, args: data }, '*'); } - protected preprocessHtml(value: string): string { + protected override preprocessHtml(value: string): string { return rewriteVsCodeResourceUrls(this.id, value); } } diff --git a/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.ts b/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.ts index f4b7e44cd682ac..e49039b7a21e1f 100644 --- a/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.ts +++ b/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.ts @@ -37,7 +37,7 @@ export class WebviewEditor extends EditorPane { private readonly _onFocusWindowHandler = this._register(new MutableDisposable()); private readonly _onDidFocusWebview = this._register(new Emitter()); - public get onDidFocus(): Event { return this._onDidFocusWebview.event; } + public override get onDidFocus(): Event { return this._onDidFocusWebview.event; } private readonly _scopedContextKeyService = this._register(new MutableDisposable()); @@ -58,7 +58,7 @@ export class WebviewEditor extends EditorPane { return this.input instanceof WebviewInput ? this.input.webview : undefined; } - get scopedContextKeyService(): IContextKeyService | undefined { + override get scopedContextKeyService(): IContextKeyService | undefined { return this._scopedContextKeyService.value; } @@ -71,7 +71,7 @@ export class WebviewEditor extends EditorPane { this._scopedContextKeyService.value = this._contextKeyService.createScoped(element); } - public dispose(): void { + public override dispose(): void { this._isDisposed = true; this._element?.remove(); @@ -87,7 +87,7 @@ export class WebviewEditor extends EditorPane { } } - public focus(): void { + public override focus(): void { super.focus(); if (!this._onFocusWindowHandler.value && !isWeb) { // Make sure we restore focus when switching back to a VS Code window @@ -100,7 +100,7 @@ export class WebviewEditor extends EditorPane { this.webview?.focus(); } - protected setEditorVisible(visible: boolean, group: IEditorGroup | undefined): void { + protected override setEditorVisible(visible: boolean, group: IEditorGroup | undefined): void { this._visible = visible; if (this.input instanceof WebviewInput && this.webview) { if (visible) { @@ -112,7 +112,7 @@ export class WebviewEditor extends EditorPane { super.setEditorVisible(visible, group); } - public clearInput() { + public override clearInput() { if (this.webview) { this.webview.release(this); this._webviewVisibleDisposables.clear(); @@ -121,7 +121,7 @@ export class WebviewEditor extends EditorPane { super.clearInput(); } - public async setInput(input: EditorInput, options: EditorOptions, context: IEditorOpenContext, token: CancellationToken): Promise { + public async override setInput(input: EditorInput, options: EditorOptions, context: IEditorOpenContext, token: CancellationToken): Promise { if (input.matches(this.input)) { return; } diff --git a/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.ts b/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.ts index ff6904c3134f43..1a1754029f8ce0 100644 --- a/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.ts +++ b/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.ts @@ -40,7 +40,7 @@ export class WebviewInput extends EditorInput { this._webview = webview; } - dispose() { + override dispose() { if (!this.isDisposed()) { if (!this._hasTransfered) { this._webview?.dispose(); @@ -53,15 +53,15 @@ export class WebviewInput extends EditorInput { return WebviewInput.typeId; } - public getName(): string { + public override getName(): string { return this._name; } - public getTitle(_verbosity?: Verbosity): string { + public override getTitle(_verbosity?: Verbosity): string { return this.getName(); } - public getDescription(): string | undefined { + public override getDescription(): string | undefined { return undefined; } @@ -87,7 +87,7 @@ export class WebviewInput extends EditorInput { this._iconManager.setIcons(this.id, value); } - public matches(other: IEditorInput): boolean { + public override matches(other: IEditorInput): boolean { return other === this; } @@ -99,7 +99,7 @@ export class WebviewInput extends EditorInput { this._group = group; } - public supportsSplitEditor() { + public override supportsSplitEditor() { return false; } diff --git a/src/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.ts b/src/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.ts index 1ff457bf6ee9b5..5ba2cc8e5cf9e6 100644 --- a/src/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.ts +++ b/src/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.ts @@ -107,14 +107,14 @@ export class LazilyResolvedWebviewEditorInput extends WebviewInput { super(id, viewType, name, webview, _webviewWorkbenchService.iconManager); } - dispose() { + override dispose() { super.dispose(); this.#resolvePromise?.cancel(); this.#resolvePromise = undefined; } @memoize - public async resolve() { + public async override resolve() { if (!this.#resolved) { this.#resolved = true; this.#resolvePromise = this._webviewWorkbenchService.resolveWebview(this); @@ -129,7 +129,7 @@ export class LazilyResolvedWebviewEditorInput extends WebviewInput { return super.resolve(); } - protected transfer(other: LazilyResolvedWebviewEditorInput): WebviewInput | undefined { + protected override transfer(other: LazilyResolvedWebviewEditorInput): WebviewInput | undefined { if (!super.transfer(other)) { return; } diff --git a/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.ts b/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.ts index eed36d2b0a9f45..f1291d26032f3a 100644 --- a/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.ts +++ b/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.ts @@ -91,18 +91,18 @@ export class WebviewViewPane extends ViewPane { private readonly _onDispose = this._register(new Emitter()); readonly onDispose = this._onDispose.event; - dispose() { + override dispose() { this._onDispose.fire(); super.dispose(); } - focus(): void { + override focus(): void { super.focus(); this._webview.value?.focus(); } - renderBody(container: HTMLElement): void { + override renderBody(container: HTMLElement): void { super.renderBody(container); this._container = container; @@ -123,7 +123,7 @@ export class WebviewViewPane extends ViewPane { } } - public saveState() { + public override saveState() { if (this._webview.value) { this.viewState[storageKeys.webviewState] = this._webview.value.state; } @@ -132,7 +132,7 @@ export class WebviewViewPane extends ViewPane { super.saveState(); } - protected layoutBody(height: number, width: number): void { + protected override layoutBody(height: number, width: number): void { super.layoutBody(height, width); if (!this._webview.value) { @@ -210,7 +210,7 @@ export class WebviewViewPane extends ViewPane { } } - protected updateTitle(value: string | undefined) { + protected override updateTitle(value: string | undefined) { this.setTitle = value; super.updateTitle(typeof value === 'string' ? value : this.defaultTitle); } diff --git a/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStarted.ts b/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStarted.ts index 80aa88662c95cc..c683be4742a4a6 100644 --- a/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStarted.ts +++ b/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStarted.ts @@ -175,7 +175,7 @@ export class GettingStartedPage extends EditorPane { this.recentlyOpened = workspacesService.getRecentlyOpened(); } - async setInput(newInput: GettingStartedInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken) { + async override setInput(newInput: GettingStartedInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken) { this.container.classList.remove('animationReady'); this.editorInput = newInput; await super.setInput(newInput, options, context, token); diff --git a/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStartedInput.ts b/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStartedInput.ts index 2bd489a8832799..c36bc2eec0d5a5 100644 --- a/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStartedInput.ts +++ b/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStartedInput.ts @@ -22,7 +22,7 @@ export class GettingStartedInput extends EditorInput { return GettingStartedInput.ID; } - matches(other: unknown) { + override matches(other: unknown) { if (other instanceof GettingStartedInput) { return other.selectedCategory === this.selectedCategory; } @@ -37,7 +37,7 @@ export class GettingStartedInput extends EditorInput { this.selectedTask = options.selectedTask; } - getName() { + override getName() { return localize('gettingStarted', "Getting Started"); } diff --git a/src/vs/workbench/contrib/welcome/overlay/browser/welcomeOverlay.ts b/src/vs/workbench/contrib/welcome/overlay/browser/welcomeOverlay.ts index 301cd634ae0b29..671530ca3eb9cc 100644 --- a/src/vs/workbench/contrib/welcome/overlay/browser/welcomeOverlay.ts +++ b/src/vs/workbench/contrib/welcome/overlay/browser/welcomeOverlay.ts @@ -122,7 +122,7 @@ export class WelcomeOverlayAction extends Action { super(id, label); } - public run(): Promise { + public override run(): Promise { if (!welcomeOverlay) { welcomeOverlay = this.instantiationService.createInstance(WelcomeOverlay); } @@ -143,7 +143,7 @@ export class HideWelcomeOverlayAction extends Action { super(id, label); } - public run(): Promise { + public override run(): Promise { if (welcomeOverlay) { welcomeOverlay.hide(); } diff --git a/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts b/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts index cac9823f7e200d..9d80508fcb33f2 100644 --- a/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts +++ b/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts @@ -269,7 +269,7 @@ export class WelcomePageAction extends Action { super(id, label); } - public run(): Promise { + public override run(): Promise { return this.instantiationService.createInstance(WelcomePage) .openEditor() .then(() => undefined); diff --git a/src/vs/workbench/contrib/welcome/walkThrough/browser/editor/editorWalkThrough.ts b/src/vs/workbench/contrib/welcome/walkThrough/browser/editor/editorWalkThrough.ts index c77c5bf9491682..4c055d9f81ee0a 100644 --- a/src/vs/workbench/contrib/welcome/walkThrough/browser/editor/editorWalkThrough.ts +++ b/src/vs/workbench/contrib/welcome/walkThrough/browser/editor/editorWalkThrough.ts @@ -39,7 +39,7 @@ export class EditorWalkThroughAction extends Action { super(id, label); } - public run(): Promise { + public override run(): Promise { const input = this.instantiationService.createInstance(WalkThroughInput, inputOptions); return this.editorService.openEditor(input, { pinned: true, override: EditorOverride.DISABLED }) .then(() => void (0)); diff --git a/src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughInput.ts b/src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughInput.ts index 09d5c3df118720..2c6a4a59804cfa 100644 --- a/src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughInput.ts +++ b/src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughInput.ts @@ -30,7 +30,7 @@ export class WalkThroughModel extends EditorModel { return this.snippetRefs.map(snippet => snippet.object); } - dispose() { + override dispose() { this.snippetRefs.forEach(ref => ref.dispose()); super.dispose(); } @@ -66,11 +66,11 @@ export class WalkThroughInput extends EditorInput { return this.options.typeId; } - getName(): string { + override getName(): string { return this.options.name; } - getDescription(): string { + override getDescription(): string { return this.options.description || ''; } @@ -78,7 +78,7 @@ export class WalkThroughInput extends EditorInput { return this.options.telemetryFrom; } - getTelemetryDescriptor(): { [key: string]: unknown; } { + override getTelemetryDescriptor(): { [key: string]: unknown; } { const descriptor = super.getTelemetryDescriptor(); descriptor['target'] = this.getTelemetryFrom(); /* __GDPR__FRAGMENT__ @@ -97,7 +97,7 @@ export class WalkThroughInput extends EditorInput { return this.options.layout; } - resolve(): Promise { + override resolve(): Promise { if (!this.promise) { this.promise = requireToContent(this.options.resource) .then(content => { @@ -124,7 +124,7 @@ export class WalkThroughInput extends EditorInput { return this.promise; } - matches(otherInput: unknown): boolean { + override matches(otherInput: unknown): boolean { if (super.matches(otherInput) === true) { return true; } @@ -139,7 +139,7 @@ export class WalkThroughInput extends EditorInput { return false; } - dispose(): void { + override dispose(): void { if (this.promise) { this.promise.then(model => model.dispose()); this.promise = null; diff --git a/src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart.ts b/src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart.ts index 5dc0c290601217..e6bdd4688c82de 100644 --- a/src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart.ts +++ b/src/vs/workbench/contrib/welcome/walkThrough/browser/walkThroughPart.ts @@ -226,7 +226,7 @@ export class WalkThroughPart extends EditorPane { } } - focus(): void { + override focus(): void { let active = document.activeElement; while (active && active !== this.content) { active = active.parentElement; @@ -267,7 +267,7 @@ export class WalkThroughPart extends EditorPane { this.scrollbar.setScrollPosition({ scrollTop: scrollPosition.scrollTop + scrollDimensions.height }); } - setInput(input: WalkThroughInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { + override setInput(input: WalkThroughInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { if (this.input instanceof WalkThroughInput) { this.saveTextEditorViewState(this.input); } @@ -499,7 +499,7 @@ export class WalkThroughPart extends EditorPane { } } - public clearInput(): void { + public override clearInput(): void { if (this.input instanceof WalkThroughInput) { this.saveTextEditorViewState(this.input); } @@ -507,7 +507,7 @@ export class WalkThroughPart extends EditorPane { super.clearInput(); } - protected saveState(): void { + protected override saveState(): void { if (this.input instanceof WalkThroughInput) { this.saveTextEditorViewState(this.input); } @@ -515,7 +515,7 @@ export class WalkThroughPart extends EditorPane { super.saveState(); } - dispose(): void { + override dispose(): void { this.editorFocus.reset(); this.contentDisposables = dispose(this.contentDisposables); this.disposables.dispose(); diff --git a/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts b/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts index 2cf9305c386d77..312cb21d93518e 100644 --- a/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts +++ b/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts @@ -51,7 +51,7 @@ const trustedIcon = registerCodicon('workspace-trusted-icon', Codicon.workspaceT const unspecified = registerCodicon('workspace-unspecified-icon', Codicon.workspaceUnspecified); class WorkspaceTrustExtensionDelegate extends Delegate { - getHeight() { return super.getHeight() + 36; } + override getHeight() { return super.getHeight() + 36; } } export class WorkspaceTrustEditor extends EditorPane { @@ -114,7 +114,7 @@ export class WorkspaceTrustEditor extends EditorPane { })); } - async setInput(input: WorkspaceTrustEditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { + async override setInput(input: WorkspaceTrustEditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { await super.setInput(input, options, context, token); if (token.isCancellationRequested) { return; } diff --git a/src/vs/workbench/contrib/workspace/browser/workspaceTrustTree.ts b/src/vs/workbench/contrib/workspace/browser/workspaceTrustTree.ts index 8856bc28795401..71e235f4f82afc 100644 --- a/src/vs/workbench/contrib/workspace/browser/workspaceTrustTree.ts +++ b/src/vs/workbench/contrib/workspace/browser/workspaceTrustTree.ts @@ -109,7 +109,7 @@ class WorkspaceTrustFolderSettingWidget extends AbstractListSettingWidget>, options: IObjectTreeOptions): ITreeModel { + protected override createModel(user: string, view: IList>, options: IObjectTreeOptions): ITreeModel { return new NonCollapsibleObjectTreeModel(user, view, options); } } diff --git a/src/vs/workbench/electron-browser/desktop.main.ts b/src/vs/workbench/electron-browser/desktop.main.ts index ff859c92df14c6..0a5803131a154a 100644 --- a/src/vs/workbench/electron-browser/desktop.main.ts +++ b/src/vs/workbench/electron-browser/desktop.main.ts @@ -27,7 +27,7 @@ class DesktopMain extends SharedDesktopMain { gracefulify(fs); } - protected joinOpen(instantiationService: IInstantiationService): void { + protected override joinOpen(instantiationService: IInstantiationService): void { // Driver if (this.configuration.driver) { diff --git a/src/vs/workbench/electron-sandbox/actions/windowActions.ts b/src/vs/workbench/electron-sandbox/actions/windowActions.ts index c6567c33e0627c..afed7f3eb0f1db 100644 --- a/src/vs/workbench/electron-sandbox/actions/windowActions.ts +++ b/src/vs/workbench/electron-sandbox/actions/windowActions.ts @@ -35,7 +35,7 @@ export class CloseCurrentWindowAction extends Action { super(id, label); } - async run(): Promise { + async override run(): Promise { this.nativeHostService.closeWindow(); } } @@ -81,7 +81,7 @@ export class ZoomInAction extends BaseZoomAction { super(id, label, configurationService); } - async run(): Promise { + async override run(): Promise { this.setConfiguredZoomLevel(getZoomLevel() + 1); } } @@ -99,7 +99,7 @@ export class ZoomOutAction extends BaseZoomAction { super(id, label, configurationService); } - async run(): Promise { + async override run(): Promise { this.setConfiguredZoomLevel(getZoomLevel() - 1); } } @@ -117,7 +117,7 @@ export class ZoomResetAction extends BaseZoomAction { super(id, label, configurationService); } - async run(): Promise { + async override run(): Promise { this.setConfiguredZoomLevel(0); } } @@ -149,7 +149,7 @@ export abstract class BaseSwitchWindow extends Action { protected abstract isQuickNavigate(): boolean; - async run(): Promise { + async override run(): Promise { const currentWindowId = this.nativeHostService.windowId; const windows = await this.nativeHostService.getWindows(); diff --git a/src/vs/workbench/electron-sandbox/parts/titlebar/titlebarPart.ts b/src/vs/workbench/electron-sandbox/parts/titlebar/titlebarPart.ts index e6caf086a148cf..0ae18af065f501 100644 --- a/src/vs/workbench/electron-sandbox/parts/titlebar/titlebarPart.ts +++ b/src/vs/workbench/electron-sandbox/parts/titlebar/titlebarPart.ts @@ -41,8 +41,8 @@ export class TitlebarPart extends BrowserTitleBarPart { return 22; } - get minimumHeight(): number { return isMacintosh ? this.getMacTitlebarSize() / getZoomFactor() : super.minimumHeight; } - get maximumHeight(): number { return this.minimumHeight; } + override get minimumHeight(): number { return isMacintosh ? this.getMacTitlebarSize() / getZoomFactor() : super.minimumHeight; } + override get maximumHeight(): number { return this.minimumHeight; } constructor( @IContextMenuService contextMenuService: IContextMenuService, @@ -105,7 +105,7 @@ export class TitlebarPart extends BrowserTitleBarPart { } } - protected onMenubarVisibilityChanged(visible: boolean): void { + protected override onMenubarVisibilityChanged(visible: boolean): void { // Hide title when toggling menu bar if ((isWindows || isLinux) && this.currentMenubarVisibility === 'toggle' && visible) { // Hack to fix issue #52522 with layered webkit-app-region elements appearing under cursor @@ -118,7 +118,7 @@ export class TitlebarPart extends BrowserTitleBarPart { super.onMenubarVisibilityChanged(visible); } - protected onConfigurationChanged(event: IConfigurationChangeEvent): void { + protected override onConfigurationChanged(event: IConfigurationChangeEvent): void { super.onConfigurationChanged(event); if (event.affectsConfiguration('window.doubleClickIconToClose')) { @@ -128,7 +128,7 @@ export class TitlebarPart extends BrowserTitleBarPart { } } - protected adjustTitleMarginToCenter(): void { + protected override adjustTitleMarginToCenter(): void { if (this.customMenubar && this.menubar) { const leftMarker = (this.appIcon ? this.appIcon.clientWidth : 0) + this.menubar.clientWidth + 10; const rightMarker = this.element.clientWidth - (this.windowControls ? this.windowControls.clientWidth : 0) - 10; @@ -150,7 +150,7 @@ export class TitlebarPart extends BrowserTitleBarPart { this.title.style.maxWidth = `calc(100vw - ${2 * ((this.windowControls?.clientWidth || 70) + 10)}px)`; } - protected installMenubar(): void { + protected override installMenubar(): void { super.installMenubar(); if (this.menubar) { @@ -162,7 +162,7 @@ export class TitlebarPart extends BrowserTitleBarPart { } } - createContentArea(parent: HTMLElement): HTMLElement { + override createContentArea(parent: HTMLElement): HTMLElement { const ret = super.createContentArea(parent); // Native menu controller @@ -219,7 +219,7 @@ export class TitlebarPart extends BrowserTitleBarPart { return ret; } - updateLayout(dimension: Dimension): void { + override updateLayout(dimension: Dimension): void { this.lastLayoutDimensions = dimension; if (getTitleBarStyle(this.configurationService) === 'custom') { diff --git a/src/vs/workbench/services/accessibility/electron-sandbox/accessibilityService.ts b/src/vs/workbench/services/accessibility/electron-sandbox/accessibilityService.ts index cdf58500913967..236f9c238bf1d6 100644 --- a/src/vs/workbench/services/accessibility/electron-sandbox/accessibilityService.ts +++ b/src/vs/workbench/services/accessibility/electron-sandbox/accessibilityService.ts @@ -42,7 +42,7 @@ export class NativeAccessibilityService extends AccessibilityService implements this.setAccessibilitySupport(environmentService.configuration.accessibilitySupport ? AccessibilitySupport.Enabled : AccessibilitySupport.Disabled); } - async alwaysUnderlineAccessKeys(): Promise { + async override alwaysUnderlineAccessKeys(): Promise { if (!isWindows) { return false; } @@ -55,7 +55,7 @@ export class NativeAccessibilityService extends AccessibilityService implements return this.shouldAlwaysUnderlineAccessKeys; } - setAccessibilitySupport(accessibilitySupport: AccessibilitySupport): void { + override setAccessibilitySupport(accessibilitySupport: AccessibilitySupport): void { super.setAccessibilitySupport(accessibilitySupport); if (!this.didSendTelemetry && accessibilitySupport === AccessibilitySupport.Enabled) { diff --git a/src/vs/workbench/services/activity/browser/activityService.ts b/src/vs/workbench/services/activity/browser/activityService.ts index 8a3e3c59931430..a3a9eace600345 100644 --- a/src/vs/workbench/services/activity/browser/activityService.ts +++ b/src/vs/workbench/services/activity/browser/activityService.ts @@ -46,7 +46,7 @@ class ViewContainerActivityByView extends Disposable { } } - dispose() { + override dispose() { this.activityDisposable.dispose(); } } diff --git a/src/vs/workbench/services/activity/common/activity.ts b/src/vs/workbench/services/activity/common/activity.ts index b7665e85069bbc..8eda8c67e8eb3d 100644 --- a/src/vs/workbench/services/activity/common/activity.ts +++ b/src/vs/workbench/services/activity/common/activity.ts @@ -63,7 +63,7 @@ export class NumberBadge extends BaseBadge { this.number = number; } - getDescription(): string { + override getDescription(): string { return this.descriptorFn(this.number); } } diff --git a/src/vs/workbench/services/backup/test/electron-browser/backupFileService.test.ts b/src/vs/workbench/services/backup/test/electron-browser/backupFileService.test.ts index 106fb0a144ffe0..31d0385c63dbd8 100644 --- a/src/vs/workbench/services/backup/test/electron-browser/backupFileService.test.ts +++ b/src/vs/workbench/services/backup/test/electron-browser/backupFileService.test.ts @@ -41,7 +41,7 @@ class TestWorkbenchEnvironmentService extends NativeWorkbenchEnvironmentService export class NodeTestBackupFileService extends NativeBackupFileService { - readonly fileService: IFileService; + override readonly fileService: IFileService; private backupResourceJoiners: Function[]; private discardBackupJoiners: Function[]; @@ -73,7 +73,7 @@ export class NodeTestBackupFileService extends NativeBackupFileService { return new Promise(resolve => this.backupResourceJoiners.push(resolve)); } - async backup(resource: URI, content?: ITextSnapshot, versionId?: number, meta?: any, token?: CancellationToken): Promise { + async override backup(resource: URI, content?: ITextSnapshot, versionId?: number, meta?: any, token?: CancellationToken): Promise { const p = super.backup(resource, content, versionId, meta, token); const removeFromPendingBackups = insert(this.pendingBackupsArr, p.then(undefined, undefined)); @@ -92,7 +92,7 @@ export class NodeTestBackupFileService extends NativeBackupFileService { return new Promise(resolve => this.discardBackupJoiners.push(resolve)); } - async discardBackup(resource: URI): Promise { + async override discardBackup(resource: URI): Promise { await super.discardBackup(resource); this.discardedBackups.push(resource); diff --git a/src/vs/workbench/services/clipboard/browser/clipboardService.ts b/src/vs/workbench/services/clipboard/browser/clipboardService.ts index 7475c744b7b268..295cc7bfae8b1c 100644 --- a/src/vs/workbench/services/clipboard/browser/clipboardService.ts +++ b/src/vs/workbench/services/clipboard/browser/clipboardService.ts @@ -23,7 +23,7 @@ export class BrowserClipboardService extends BaseBrowserClipboardService { super(); } - async readText(type?: string): Promise { + async override readText(type?: string): Promise { if (type) { return super.readText(type); } diff --git a/src/vs/workbench/services/commands/test/common/commandService.test.ts b/src/vs/workbench/services/commands/test/common/commandService.test.ts index ef6962caccc4eb..e4e13a410debcd 100644 --- a/src/vs/workbench/services/commands/test/common/commandService.test.ts +++ b/src/vs/workbench/services/commands/test/common/commandService.test.ts @@ -27,7 +27,7 @@ suite('CommandService', function () { let lastEvent: string; let service = new CommandService(new InstantiationService(), new class extends NullExtensionService { - activateByEvent(activationEvent: string): Promise { + override activateByEvent(activationEvent: string): Promise { lastEvent = activationEvent; return super.activateByEvent(activationEvent); } @@ -46,7 +46,7 @@ suite('CommandService', function () { test('fwd activation error', async function () { const extensionService = new class extends NullExtensionService { - activateByEvent(activationEvent: string): Promise { + override activateByEvent(activationEvent: string): Promise { return Promise.reject(new Error('bad_activate')); } }; @@ -66,7 +66,7 @@ suite('CommandService', function () { let reg = CommandsRegistry.registerCommand('bar', () => callCounter += 1); let service = new CommandService(new InstantiationService(), new class extends NullExtensionService { - whenInstalledExtensionsRegistered() { + override whenInstalledExtensionsRegistered() { return new Promise(_resolve => { /*ignore*/ }); } }, new NullLogService()); @@ -83,7 +83,7 @@ suite('CommandService', function () { const whenInstalledExtensionsRegistered = new Promise(_resolve => { resolveFunc = _resolve; }); let service = new CommandService(new InstantiationService(), new class extends NullExtensionService { - whenInstalledExtensionsRegistered() { + override whenInstalledExtensionsRegistered() { return whenInstalledExtensionsRegistered; } }, new NullLogService()); @@ -107,7 +107,7 @@ suite('CommandService', function () { let events: string[] = []; let service = new CommandService(new InstantiationService(), new class extends NullExtensionService { - activateByEvent(event: string): Promise { + override activateByEvent(event: string): Promise { events.push(event); if (event === '*') { return new Promise(() => { }); //forever promise... @@ -142,7 +142,7 @@ suite('CommandService', function () { const disposables = new DisposableStore(); let service = new CommandService(new InstantiationService(), new class extends NullExtensionService { - activateByEvent(event: string): Promise { + override activateByEvent(event: string): Promise { if (event === '*') { return new Promise(() => { }); //forever promise... } diff --git a/src/vs/workbench/services/configuration/common/configurationModels.ts b/src/vs/workbench/services/configuration/common/configurationModels.ts index ad60a05ab72a76..c2ee0980e888df 100644 --- a/src/vs/workbench/services/configuration/common/configurationModels.ts +++ b/src/vs/workbench/services/configuration/common/configurationModels.ts @@ -47,7 +47,7 @@ export class WorkspaceConfigurationModelParser extends ConfigurationModelParser this._settingsModelParser.parse(); } - protected doParseRaw(raw: any): IConfigurationModel { + protected override doParseRaw(raw: any): IConfigurationModel { this._folders = (raw['folders'] || []) as IStoredWorkspaceFolder[]; this._settingsModelParser.parseRaw(raw['settings']); this._launchModel = this.createConfigurationModelFrom(raw, 'launch'); @@ -74,7 +74,7 @@ export class StandaloneConfigurationModelParser extends ConfigurationModelParser super(name); } - protected doParseRaw(raw: any): IConfigurationModel { + protected override doParseRaw(raw: any): IConfigurationModel { const contents = toValuesTree(raw, message => console.error(`Conflict in settings file ${this._name}: ${message}`)); const scopedContents = Object.create(null); scopedContents[this.scope] = contents; @@ -98,15 +98,15 @@ export class Configuration extends BaseConfiguration { super(defaults, localUser, remoteUser, workspaceConfiguration, folders, memoryConfiguration, memoryConfigurationByResource); } - getValue(key: string | undefined, overrides: IConfigurationOverrides = {}): any { + override getValue(key: string | undefined, overrides: IConfigurationOverrides = {}): any { return super.getValue(key, overrides, this._workspace); } - inspect(key: string, overrides: IConfigurationOverrides = {}): IConfigurationValue { + override inspect(key: string, overrides: IConfigurationOverrides = {}): IConfigurationValue { return super.inspect(key, overrides, this._workspace); } - keys(): { + override keys(): { default: string[]; user: string[]; workspace: string[]; @@ -115,7 +115,7 @@ export class Configuration extends BaseConfiguration { return super.keys(this._workspace); } - compareAndDeleteFolderConfiguration(folder: URI): IConfigurationChange { + override compareAndDeleteFolderConfiguration(folder: URI): IConfigurationChange { if (this._workspace && this._workspace.folders.length > 0 && this._workspace.folders[0].uri.toString() === folder.toString()) { // Do not remove workspace configuration return { keys: [], overrides: [] }; diff --git a/src/vs/workbench/services/configuration/test/browser/configurationService.test.ts b/src/vs/workbench/services/configuration/test/browser/configurationService.test.ts index 245883de666cf7..ec703c352808d5 100644 --- a/src/vs/workbench/services/configuration/test/browser/configurationService.test.ts +++ b/src/vs/workbench/services/configuration/test/browser/configurationService.test.ts @@ -54,7 +54,7 @@ function convertToWorkspacePayload(folder: URI): ISingleFolderWorkspaceIdentifie } class ConfigurationCache extends BrowserConfigurationCache { - needsCaching() { return false; } + override needsCaching() { return false; } } const ROOT = URI.file('tests').with({ scheme: 'vscode-tests' }); diff --git a/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.ts b/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.ts index bc564af8e2e4de..3bae9221acdf81 100644 --- a/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.ts +++ b/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.ts @@ -105,7 +105,7 @@ export abstract class BaseConfigurationResolverService extends AbstractVariableR }, labelService, envVariables, envVariablesPromise); } - public async resolveWithInteractionReplace(folder: IWorkspaceFolder | undefined, config: any, section?: string, variables?: IStringDictionary, target?: ConfigurationTarget): Promise { + public async override resolveWithInteractionReplace(folder: IWorkspaceFolder | undefined, config: any, section?: string, variables?: IStringDictionary, target?: ConfigurationTarget): Promise { // resolve any non-interactive variables and any contributed variables config = this.resolveAny(folder, config); @@ -122,7 +122,7 @@ export abstract class BaseConfigurationResolverService extends AbstractVariableR }); } - public async resolveWithInteraction(folder: IWorkspaceFolder | undefined, config: any, section?: string, variables?: IStringDictionary, target?: ConfigurationTarget): Promise | undefined> { + public async override resolveWithInteraction(folder: IWorkspaceFolder | undefined, config: any, section?: string, variables?: IStringDictionary, target?: ConfigurationTarget): Promise | undefined> { // resolve any non-interactive variables and any contributed variables const resolved = await this.resolveAnyMap(folder, config); config = resolved.newConfig; diff --git a/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts b/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts index 9ee824edc6686f..bb151aef5fd101 100644 --- a/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts +++ b/src/vs/workbench/services/configurationResolver/test/electron-browser/configurationResolverService.test.ts @@ -28,7 +28,7 @@ import { TestWorkbenchConfiguration, TestEnvironmentPaths } from 'vs/workbench/t const mockLineNumber = 10; class TestEditorServiceWithActiveEditor extends TestEditorService { - get activeTextEditorControl(): any { + override get activeTextEditorControl(): any { return { getEditorType() { return EditorType.ICodeEditor; @@ -38,7 +38,7 @@ class TestEditorServiceWithActiveEditor extends TestEditorService { } }; } - get activeEditor(): any { + override get activeEditor(): any { return { get resource(): any { return uri.parse('file:///VSCode/workspaceLocation/file'); @@ -676,7 +676,7 @@ class MockLabelService implements ILabelService { } class MockInputsConfigurationService extends TestConfigurationService { - public getValue(arg1?: any, arg2?: any): any { + public override getValue(arg1?: any, arg2?: any): any { let configuration; if (arg1 === 'tasks') { configuration = { diff --git a/src/vs/workbench/services/decorations/test/browser/decorationsService.test.ts b/src/vs/workbench/services/decorations/test/browser/decorationsService.test.ts index c3127aa4d827ee..834ffca6e2c307 100644 --- a/src/vs/workbench/services/decorations/test/browser/decorationsService.test.ts +++ b/src/vs/workbench/services/decorations/test/browser/decorationsService.test.ts @@ -25,7 +25,7 @@ suite('DecorationsService', function () { service = new DecorationsService( new TestThemeService(), new class extends mock() { - extUri = resources.extUri; + override extUri = resources.extUri; } ); }); diff --git a/src/vs/workbench/services/editor/browser/editorService.ts b/src/vs/workbench/services/editor/browser/editorService.ts index 1f46c7b698b0b6..2452c02f989734 100644 --- a/src/vs/workbench/services/editor/browser/editorService.ts +++ b/src/vs/workbench/services/editor/browser/editorService.ts @@ -1414,7 +1414,7 @@ export class EditorService extends Disposable implements EditorServiceImpl { //#endregion - dispose(): void { + override dispose(): void { super.dispose(); // Dispose remaining watchers if any diff --git a/src/vs/workbench/services/editor/test/browser/editorService.test.ts b/src/vs/workbench/services/editor/test/browser/editorService.test.ts index 698d8abef34251..71d654b4459adb 100644 --- a/src/vs/workbench/services/editor/test/browser/editorService.test.ts +++ b/src/vs/workbench/services/editor/test/browser/editorService.test.ts @@ -383,7 +383,7 @@ suite('EditorService', () => { super(id, undefined!, new TestThemeService(), new TestStorageService()); } - getId(): string { + override getId(): string { return 'myEditor'; } diff --git a/src/vs/workbench/services/environment/electron-sandbox/environmentService.ts b/src/vs/workbench/services/environment/electron-sandbox/environmentService.ts index 30a6f0125a4dd4..1b34f1c56046a4 100644 --- a/src/vs/workbench/services/environment/electron-sandbox/environmentService.ts +++ b/src/vs/workbench/services/environment/electron-sandbox/environmentService.ts @@ -60,7 +60,7 @@ export class NativeWorkbenchEnvironmentService extends AbstractNativeEnvironment get execPath() { return this.configuration.execPath; } @memoize - get userRoamingDataHome(): URI { return this.appSettingsHome.with({ scheme: Schemas.userData }); } + override get userRoamingDataHome(): URI { return this.appSettingsHome.with({ scheme: Schemas.userData }); } @memoize get logFile(): URI { return URI.file(join(this.logsPath, `renderer${this.configuration.windowId}.log`)); } diff --git a/src/vs/workbench/services/extensionManagement/common/remoteExtensionManagementService.ts b/src/vs/workbench/services/extensionManagement/common/remoteExtensionManagementService.ts index a16c16fe2b4015..588bccce94e38b 100644 --- a/src/vs/workbench/services/extensionManagement/common/remoteExtensionManagementService.ts +++ b/src/vs/workbench/services/extensionManagement/common/remoteExtensionManagementService.ts @@ -26,7 +26,7 @@ export class WebRemoteExtensionManagementService extends ExtensionManagementChan this.extensionKindController = new ExtensionKindController(productService, configurationService); } - async canInstall(extension: IGalleryExtension): Promise { + async override canInstall(extension: IGalleryExtension): Promise { const manifest = await this.galleryService.getManifest(extension, CancellationToken.None); return !!manifest && this.extensionKindController.canExecuteOnWorkspace(manifest); } diff --git a/src/vs/workbench/services/extensionManagement/electron-sandbox/extensionManagementService.ts b/src/vs/workbench/services/extensionManagement/electron-sandbox/extensionManagementService.ts index 3a052402d98cdd..7b3c8a638f031a 100644 --- a/src/vs/workbench/services/extensionManagement/electron-sandbox/extensionManagementService.ts +++ b/src/vs/workbench/services/extensionManagement/electron-sandbox/extensionManagementService.ts @@ -36,7 +36,7 @@ export class ExtensionManagementService extends BaseExtensionManagementService { super(extensionManagementServerService, extensionGalleryService, configurationService, productService, downloadService, userDataAutoSyncEnablementService, userDataSyncResourceEnablementService, dialogService, workspaceTrustService); } - protected async installVSIX(vsix: URI, server: IExtensionManagementServer): Promise { + protected async override installVSIX(vsix: URI, server: IExtensionManagementServer): Promise { if (vsix.scheme === Schemas.vscodeRemote && server === this.extensionManagementServerService.localExtensionManagementServer) { const downloadedLocation = joinPath(this.environmentService.tmpDir, generateUuid()); await this.downloadService.download(vsix, downloadedLocation); diff --git a/src/vs/workbench/services/extensionManagement/electron-sandbox/extensionTipsService.ts b/src/vs/workbench/services/extensionManagement/electron-sandbox/extensionTipsService.ts index df25bdb6ef89d3..35f7415d48b582 100644 --- a/src/vs/workbench/services/extensionManagement/electron-sandbox/extensionTipsService.ts +++ b/src/vs/workbench/services/extensionManagement/electron-sandbox/extensionTipsService.ts @@ -17,7 +17,7 @@ import { Schemas } from 'vs/base/common/network'; class NativeExtensionTipsService extends ExtensionTipsService implements IExtensionTipsService { - _serviceBrand: any; + override _serviceBrand: any; private readonly channel: IChannel; @@ -32,22 +32,22 @@ class NativeExtensionTipsService extends ExtensionTipsService implements IExtens this.channel = sharedProcessService.getChannel('extensionTipsService'); } - getConfigBasedTips(folder: URI): Promise { + override getConfigBasedTips(folder: URI): Promise { if (folder.scheme === Schemas.file) { return this.channel.call('getConfigBasedTips', [folder]); } return super.getConfigBasedTips(folder); } - getImportantExecutableBasedTips(): Promise { + override getImportantExecutableBasedTips(): Promise { return this.channel.call('getImportantExecutableBasedTips'); } - getOtherExecutableBasedTips(): Promise { + override getOtherExecutableBasedTips(): Promise { return this.channel.call('getOtherExecutableBasedTips'); } - getAllWorkspacesTips(): Promise { + override getAllWorkspacesTips(): Promise { return this.channel.call('getAllWorkspacesTips'); } diff --git a/src/vs/workbench/services/extensionManagement/electron-sandbox/remoteExtensionManagementService.ts b/src/vs/workbench/services/extensionManagement/electron-sandbox/remoteExtensionManagementService.ts index 5a467603f12b16..2457ecfb80b846 100644 --- a/src/vs/workbench/services/extensionManagement/electron-sandbox/remoteExtensionManagementService.ts +++ b/src/vs/workbench/services/extensionManagement/electron-sandbox/remoteExtensionManagementService.ts @@ -39,13 +39,13 @@ export class NativeRemoteExtensionManagementService extends WebRemoteExtensionMa this.localExtensionManagementService = localExtensionManagementServer.extensionManagementService; } - async install(vsix: URI): Promise { + async override install(vsix: URI): Promise { const local = await super.install(vsix); await this.installUIDependenciesAndPackedExtensions(local); return local; } - async installFromGallery(extension: IGalleryExtension, installOptions?: InstallOptions): Promise { + async override installFromGallery(extension: IGalleryExtension, installOptions?: InstallOptions): Promise { const local = await this.doInstallFromGallery(extension, installOptions); await this.installUIDependenciesAndPackedExtensions(local); return local; diff --git a/src/vs/workbench/services/extensions/browser/extensionService.ts b/src/vs/workbench/services/extensions/browser/extensionService.ts index 16717d1fdc6308..ff766f4de59032 100644 --- a/src/vs/workbench/services/extensions/browser/extensionService.ts +++ b/src/vs/workbench/services/extensions/browser/extensionService.ts @@ -73,7 +73,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten this._initFetchFileSystem(); } - dispose(): void { + override dispose(): void { this._disposables.dispose(); super.dispose(); } diff --git a/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts b/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts index 681e77fa6c78d9..fee40e289d8e03 100644 --- a/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts +++ b/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts @@ -325,7 +325,7 @@ export class WebWorkerExtensionHost extends Disposable implements IExtensionHost return protocol; } - public dispose(): void { + public override dispose(): void { if (this._isTerminating) { return; } diff --git a/src/vs/workbench/services/extensions/common/extensionHostManager.ts b/src/vs/workbench/services/extensions/common/extensionHostManager.ts index 41e5a22288031d..5d158e414bf1eb 100644 --- a/src/vs/workbench/services/extensions/common/extensionHostManager.ts +++ b/src/vs/workbench/services/extensions/common/extensionHostManager.ts @@ -85,7 +85,7 @@ export class ExtensionHostManager extends Disposable { this._resolveAuthorityAttempt = 0; } - public dispose(): void { + public override dispose(): void { if (this._extensionHost) { this._extensionHost.dispose(); } diff --git a/src/vs/workbench/services/extensions/common/remoteExtensionHost.ts b/src/vs/workbench/services/extensions/common/remoteExtensionHost.ts index 24ee4f4a791199..4b07928a83d599 100644 --- a/src/vs/workbench/services/extensions/common/remoteExtensionHost.ts +++ b/src/vs/workbench/services/extensions/common/remoteExtensionHost.ts @@ -269,7 +269,7 @@ export class RemoteExtensionHost extends Disposable implements IExtensionHost { return Promise.resolve(false); } - dispose(): void { + override dispose(): void { super.dispose(); this._terminating = true; diff --git a/src/vs/workbench/services/extensions/common/rpcProtocol.ts b/src/vs/workbench/services/extensions/common/rpcProtocol.ts index a9fef74ecec25e..096c87fd5f6385 100644 --- a/src/vs/workbench/services/extensions/common/rpcProtocol.ts +++ b/src/vs/workbench/services/extensions/common/rpcProtocol.ts @@ -110,7 +110,7 @@ export class RPCProtocol extends Disposable implements IRPCProtocol { this._protocol.onMessage((msg) => this._receiveOneMessage(msg)); } - public dispose(): void { + public override dispose(): void { this._isDisposed = true; // Release all outstanding promises with a canceled error diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts index ce6a554d8bb106..47ba56a9a4941d 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts @@ -225,7 +225,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten return result; } - protected _onExtensionHostCrashed(extensionHost: ExtensionHostManager, code: number, signal: string | null): void { + protected override _onExtensionHostCrashed(extensionHost: ExtensionHostManager, code: number, signal: string | null): void { const activatedExtensions = Array.from(this._extensionHostActiveExtensions.values()); super._onExtensionHostCrashed(extensionHost, code, signal); @@ -429,7 +429,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten } } - public async getInspectPort(tryEnableInspector: boolean): Promise { + public async override getInspectPort(tryEnableInspector: boolean): Promise { const localProcessExtensionHost = this._getExtensionHostManager(ExtensionHostKind.LocalProcess); if (localProcessExtensionHost) { return localProcessExtensionHost.getInspectPort(tryEnableInspector); diff --git a/src/vs/workbench/services/hover/browser/hoverWidget.ts b/src/vs/workbench/services/hover/browser/hoverWidget.ts index fe21b0cc7422f8..252fdfc3c0d037 100644 --- a/src/vs/workbench/services/hover/browser/hoverWidget.ts +++ b/src/vs/workbench/services/hover/browser/hoverWidget.ts @@ -204,7 +204,7 @@ export class HoverWidget extends Widget { this.dispose(); } - public dispose(): void { + public override dispose(): void { if (!this._isDisposed) { this._onDispose.fire(); this._hover.containerDomNode.parentElement?.removeChild(this.domNode); diff --git a/src/vs/workbench/services/keybinding/browser/keybindingService.ts b/src/vs/workbench/services/keybinding/browser/keybindingService.ts index 728be660d35751..b7c015d51256d2 100644 --- a/src/vs/workbench/services/keybinding/browser/keybindingService.ts +++ b/src/vs/workbench/services/keybinding/browser/keybindingService.ts @@ -353,7 +353,7 @@ export class WorkbenchKeybindingService extends AbstractKeybindingService { return JSON.stringify(info, null, '\t'); } - public customKeybindingsCount(): number { + public override customKeybindingsCount(): number { return this.userKeybindings.keybindings.length; } @@ -578,7 +578,7 @@ export class WorkbenchKeybindingService extends AbstractKeybindingService { return desc; } - public getDefaultKeybindingsContent(): string { + public override getDefaultKeybindingsContent(): string { const resolver = this._getResolver(); const defaultKeybindings = resolver.getDefaultKeybindings(); const boundCommands = resolver.getDefaultBoundCommands(); @@ -612,7 +612,7 @@ export class WorkbenchKeybindingService extends AbstractKeybindingService { return '// ' + nls.localize('unboundCommands', "Here are other available commands: ") + '\n// - ' + pretty; } - mightProducePrintableCharacter(event: IKeyboardEvent): boolean { + override mightProducePrintableCharacter(event: IKeyboardEvent): boolean { if (event.ctrlKey || event.metaKey || event.altKey) { // ignore ctrl/cmd/alt-combination but not shift-combinatios return false; diff --git a/src/vs/workbench/services/mode/common/workbenchModeService.ts b/src/vs/workbench/services/mode/common/workbenchModeService.ts index c6033d4ef98515..7294d4617813c6 100644 --- a/src/vs/workbench/services/mode/common/workbenchModeService.ts +++ b/src/vs/workbench/services/mode/common/workbenchModeService.ts @@ -156,7 +156,7 @@ export class WorkbenchModeServiceImpl extends ModeServiceImpl { }); } - protected _onReady(): Promise { + protected override _onReady(): Promise { if (!this._onReadyPromise) { this._onReadyPromise = Promise.resolve( this._extensionService.whenInstalledExtensionsRegistered().then(() => true) diff --git a/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.ts b/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.ts index 1b9c1c74ae7372..2df514f63aae5c 100644 --- a/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.ts +++ b/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.ts @@ -140,7 +140,7 @@ export class KeybindingsEditorModel extends EditorModel { return result; } - async resolve(actionLabels = new Map()): Promise { + async override resolve(actionLabels = new Map()): Promise { const workbenchActionsRegistry = Registry.as(ActionExtensions.WorkbenchActions); this._keybindingItemsSortedByPrecedence = []; diff --git a/src/vs/workbench/services/preferences/browser/preferencesEditorInput.ts b/src/vs/workbench/services/preferences/browser/preferencesEditorInput.ts index f679a2c6dae868..5e3d03877e46ca 100644 --- a/src/vs/workbench/services/preferences/browser/preferencesEditorInput.ts +++ b/src/vs/workbench/services/preferences/browser/preferencesEditorInput.ts @@ -24,11 +24,11 @@ import { Schemas } from 'vs/base/common/network'; export class PreferencesEditorInput extends SideBySideEditorInput { static readonly ID: string = 'workbench.editorinputs.preferencesEditorInput'; - getTypeId(): string { + override getTypeId(): string { return PreferencesEditorInput.ID; } - getTitle(verbosity: Verbosity): string { + override getTitle(verbosity: Verbosity): string { return this.primary.getTitle(verbosity); } } @@ -48,11 +48,11 @@ export class DefaultPreferencesEditorInput extends ResourceEditorInput { super(defaultSettingsResource, nls.localize('settingsEditorName', "Default Settings"), '', undefined, textModelResolverService, textFileService, editorService, editorGroupService, fileService, labelService, filesConfigurationService); } - getTypeId(): string { + override getTypeId(): string { return DefaultPreferencesEditorInput.ID; } - matches(other: unknown): boolean { + override matches(other: unknown): boolean { if (other instanceof DefaultPreferencesEditorInput) { return true; } @@ -88,19 +88,19 @@ export class KeybindingsEditorInput extends EditorInput { return KeybindingsEditorInput.ID; } - getName(): string { + override getName(): string { return nls.localize('keybindingsInputName', "Keyboard Shortcuts"); } - async resolve(): Promise { + async override resolve(): Promise { return this.keybindingsModel; } - matches(otherInput: unknown): boolean { + override matches(otherInput: unknown): boolean { return otherInput instanceof KeybindingsEditorInput; } - dispose(): void { + override dispose(): void { this.keybindingsModel.dispose(); super.dispose(); @@ -125,7 +125,7 @@ export class SettingsEditor2Input extends EditorInput { this._settingsModel = _preferencesService.createSettings2EditorModel(); } - matches(otherInput: unknown): boolean { + override matches(otherInput: unknown): boolean { return otherInput instanceof SettingsEditor2Input; } @@ -133,15 +133,15 @@ export class SettingsEditor2Input extends EditorInput { return SettingsEditor2Input.ID; } - getName(): string { + override getName(): string { return nls.localize('settingsEditor2InputName', "Settings"); } - async resolve(): Promise { + async override resolve(): Promise { return this._settingsModel; } - dispose(): void { + override dispose(): void { this._settingsModel.dispose(); super.dispose(); diff --git a/src/vs/workbench/services/preferences/browser/preferencesService.ts b/src/vs/workbench/services/preferences/browser/preferencesService.ts index 31a041a6274902..62c6cda5a33e11 100644 --- a/src/vs/workbench/services/preferences/browser/preferencesService.ts +++ b/src/vs/workbench/services/preferences/browser/preferencesService.ts @@ -650,7 +650,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic return position; } - public dispose(): void { + public override dispose(): void { this._onDispose.fire(); super.dispose(); } diff --git a/src/vs/workbench/services/preferences/common/preferencesModels.ts b/src/vs/workbench/services/preferences/common/preferencesModels.ts index e7ed150f44f16d..49c49dc56342a4 100644 --- a/src/vs/workbench/services/preferences/common/preferencesModels.ts +++ b/src/vs/workbench/services/preferences/common/preferencesModels.ts @@ -235,7 +235,7 @@ export class Settings2EditorModel extends AbstractSettingsModel implements ISett })); } - protected get filterGroups(): ISettingsGroup[] { + protected override get filterGroups(): ISettingsGroup[] { // Don't filter "commonly used" return this.settingsGroups.slice(1); } @@ -434,12 +434,12 @@ export class WorkspaceConfigurationEditorModel extends SettingsEditorModel { return this._configurationGroups; } - protected parse(): void { + protected override parse(): void { super.parse(); this._configurationGroups = parse(this.settingsModel, (property: string, previousParents: string[]): boolean => previousParents.length === 0); } - protected isSettingsProperty(property: string, previousParents: string[]): boolean { + protected override isSettingsProperty(property: string, previousParents: string[]): boolean { return property === 'settings' && previousParents.length === 1; } @@ -740,7 +740,7 @@ export class DefaultSettingsEditorModel extends AbstractSettingsModel implements return this.defaultSettings.getSettingsGroups(); } - protected get filterGroups(): ISettingsGroup[] { + protected override get filterGroups(): ISettingsGroup[] { // Don't look at "commonly used" for filter return this.settingsGroups.slice(1); } @@ -868,7 +868,7 @@ export class DefaultSettingsEditorModel extends AbstractSettingsModel implements return []; } - getPreference(key: string): ISetting | undefined { + override getPreference(key: string): ISetting | undefined { for (const group of this.settingsGroups) { for (const section of group.sections) { for (const setting of section.settings) { @@ -1043,7 +1043,7 @@ class RawSettingsContentBuilder extends SettingsContentBuilder { super(0); } - pushGroup(settingsGroups: ISettingsGroup): void { + override pushGroup(settingsGroups: ISettingsGroup): void { this._pushGroup(settingsGroups, this.indent); } diff --git a/src/vs/workbench/services/preferences/test/browser/preferencesService.test.ts b/src/vs/workbench/services/preferences/test/browser/preferencesService.test.ts index 79c20bb4b4fd08..1b1c65b518f391 100644 --- a/src/vs/workbench/services/preferences/test/browser/preferencesService.test.ts +++ b/src/vs/workbench/services/preferences/test/browser/preferencesService.test.ts @@ -58,7 +58,7 @@ suite('PreferencesService', () => { class TestEditorService2 extends TestEditorService { lastOpenEditorOptions: any; - async openEditor(editor: any, optionsOrGroup?: any): Promise { + async override openEditor(editor: any, optionsOrGroup?: any): Promise { this.lastOpenEditorOptions = optionsOrGroup; return undefined; } diff --git a/src/vs/workbench/services/progress/browser/progressIndicator.ts b/src/vs/workbench/services/progress/browser/progressIndicator.ts index 79ad961bd5ae6c..89cbbf5999b892 100644 --- a/src/vs/workbench/services/progress/browser/progressIndicator.ts +++ b/src/vs/workbench/services/progress/browser/progressIndicator.ts @@ -77,9 +77,9 @@ export class EditorProgressIndicator extends ProgressBarIndicator { })); } - show(infinite: true, delay?: number): IProgressRunner; - show(total: number, delay?: number): IProgressRunner; - show(infiniteOrTotal: true | number, delay?: number): IProgressRunner { + override show(infinite: true, delay?: number): IProgressRunner; + override show(total: number, delay?: number): IProgressRunner; + override show(infiniteOrTotal: true | number, delay?: number): IProgressRunner { // No editor open: ignore any progress reporting if (this.group.isEmpty) { @@ -93,7 +93,7 @@ export class EditorProgressIndicator extends ProgressBarIndicator { return super.show(infiniteOrTotal, delay); } - async showWhile(promise: Promise, delay?: number): Promise { + async override showWhile(promise: Promise, delay?: number): Promise { // No editor open: ignore any progress reporting if (this.group.isEmpty) { diff --git a/src/vs/workbench/services/progress/browser/progressService.ts b/src/vs/workbench/services/progress/browser/progressService.ts index 36af9db211c669..a8752e7c4c3726 100644 --- a/src/vs/workbench/services/progress/browser/progressService.ts +++ b/src/vs/workbench/services/progress/browser/progressService.ts @@ -213,7 +213,7 @@ export class ProgressService extends Disposable implements IProgressService { this.dispose(); } - dispose(): void { + override dispose(): void { this._done = true; this._onWillDispose.fire(); @@ -274,7 +274,7 @@ export class ProgressService extends Disposable implements IProgressService { super(`progress.button.${button}`, button, undefined, true); } - async run(): Promise { + async override run(): Promise { progressStateModel.cancel(index); } }; @@ -290,7 +290,7 @@ export class ProgressService extends Disposable implements IProgressService { super('progress.cancel', localize('cancel', "Cancel"), undefined, true); } - async run(): Promise { + async override run(): Promise { progressStateModel.cancel(); } }; diff --git a/src/vs/workbench/services/quickinput/browser/quickInputService.ts b/src/vs/workbench/services/quickinput/browser/quickInputService.ts index fcdad25645e4a5..50b96fa6b179c4 100644 --- a/src/vs/workbench/services/quickinput/browser/quickInputService.ts +++ b/src/vs/workbench/services/quickinput/browser/quickInputService.ts @@ -39,7 +39,7 @@ export class QuickInputService extends BaseQuickInputService { this._register(this.onHide(() => this.inQuickInputContext.set(false))); } - protected createController(): QuickInputController { + protected override createController(): QuickInputController { return super.createController(this.layoutService, { ignoreFocusOut: () => !this.configurationService.getValue('workbench.quickOpen.closeOnFocusLost'), backKeybindingLabel: () => this.keybindingService.lookupKeybinding('workbench.action.quickInputBack')?.getLabel() || undefined, diff --git a/src/vs/workbench/services/remote/browser/tunnelServiceImpl.ts b/src/vs/workbench/services/remote/browser/tunnelServiceImpl.ts index 2f88ae5e1d8fac..029c2e53d035ff 100644 --- a/src/vs/workbench/services/remote/browser/tunnelServiceImpl.ts +++ b/src/vs/workbench/services/remote/browser/tunnelServiceImpl.ts @@ -31,7 +31,7 @@ export class TunnelService extends AbstractTunnelService { return undefined; } - canTunnel(uri: URI): boolean { + override canTunnel(uri: URI): boolean { return super.canTunnel(uri) && !!this.environmentService.remoteAuthority; } } diff --git a/src/vs/workbench/services/remote/electron-browser/tunnelServiceImpl.ts b/src/vs/workbench/services/remote/electron-browser/tunnelServiceImpl.ts index e3c74cd9f8243e..41921078bdb54f 100644 --- a/src/vs/workbench/services/remote/electron-browser/tunnelServiceImpl.ts +++ b/src/vs/workbench/services/remote/electron-browser/tunnelServiceImpl.ts @@ -25,7 +25,7 @@ export class TunnelService extends BaseTunnelService { super(nodeSocketFactory, logService, signService, productService); } - canTunnel(uri: URI): boolean { + override canTunnel(uri: URI): boolean { return super.canTunnel(uri) && !!this.environmentService.remoteAuthority; } } diff --git a/src/vs/workbench/services/request/browser/requestService.ts b/src/vs/workbench/services/request/browser/requestService.ts index 16aa984a3f3285..507c358999ded8 100644 --- a/src/vs/workbench/services/request/browser/requestService.ts +++ b/src/vs/workbench/services/request/browser/requestService.ts @@ -21,7 +21,7 @@ export class BrowserRequestService extends RequestService { super(configurationService, logService); } - async request(options: IRequestOptions, token: CancellationToken): Promise { + async override request(options: IRequestOptions, token: CancellationToken): Promise { try { const context = await super.request(options, token); const connection = this.remoteAgentService.getConnection(); diff --git a/src/vs/workbench/services/request/electron-sandbox/requestService.ts b/src/vs/workbench/services/request/electron-sandbox/requestService.ts index 86d4700ef054e1..698a8db391683d 100644 --- a/src/vs/workbench/services/request/electron-sandbox/requestService.ts +++ b/src/vs/workbench/services/request/electron-sandbox/requestService.ts @@ -20,7 +20,7 @@ export class NativeRequestService extends RequestService { super(configurationService, logService); } - async resolveProxy(url: string): Promise { + async override resolveProxy(url: string): Promise { return this.nativeHostService.resolveProxy(url); } } diff --git a/src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts b/src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts index da0483de317d23..d871f4ab545e27 100644 --- a/src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts +++ b/src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts @@ -199,9 +199,9 @@ export class RipgrepParser extends EventEmitter { } - on(event: 'result', listener: (result: TextSearchResult) => void): this; - on(event: 'hitLimit', listener: () => void): this; - on(event: string, listener: (...args: any[]) => void): this { + override on(event: 'result', listener: (result: TextSearchResult) => void): this; + override on(event: 'hitLimit', listener: () => void): this; + override on(event: string, listener: (...args: any[]) => void): this { super.on(event, listener); return this; } diff --git a/src/vs/workbench/services/textMate/electron-sandbox/textMateService.ts b/src/vs/workbench/services/textMate/electron-sandbox/textMateService.ts index 209e19fbb5bcfe..59ba481695dc01 100644 --- a/src/vs/workbench/services/textMate/electron-sandbox/textMateService.ts +++ b/src/vs/workbench/services/textMate/electron-sandbox/textMateService.ts @@ -88,7 +88,7 @@ class ModelWorkerTextMateTokenizer extends Disposable { this._worker.acceptRemovedModel(this._model.uri.toString()); } - public dispose() { + public override dispose() { super.dispose(); this._endSync(); } @@ -189,7 +189,7 @@ export class TextMateService extends AbstractTextMateService { return response; } - protected _onDidCreateGrammarFactory(grammarDefinitions: IValidGrammarDefinition[]): void { + protected override _onDidCreateGrammarFactory(grammarDefinitions: IValidGrammarDefinition[]): void { this._killWorker(); if (RUN_TEXTMATE_IN_WORKER) { @@ -218,14 +218,14 @@ export class TextMateService extends AbstractTextMateService { } } - protected _doUpdateTheme(grammarFactory: TMGrammarFactory, theme: IRawTheme, colorMap: string[]): void { + protected override _doUpdateTheme(grammarFactory: TMGrammarFactory, theme: IRawTheme, colorMap: string[]): void { super._doUpdateTheme(grammarFactory, theme, colorMap); if (this._currentTheme && this._currentTokenColorMap && this._workerProxy) { this._workerProxy.acceptTheme(this._currentTheme, this._currentTokenColorMap); } } - protected _onDidDisposeGrammarFactory(): void { + protected override _onDidDisposeGrammarFactory(): void { this._killWorker(); } diff --git a/src/vs/workbench/services/textMate/electron-sandbox/textMateWorker.ts b/src/vs/workbench/services/textMate/electron-sandbox/textMateWorker.ts index 5b811274fbcc04..c4af0042757d50 100644 --- a/src/vs/workbench/services/textMate/electron-sandbox/textMateWorker.ts +++ b/src/vs/workbench/services/textMate/electron-sandbox/textMateWorker.ts @@ -55,7 +55,7 @@ class TextMateWorkerModel extends MirrorTextModel { this._resetTokenization(); } - public dispose(): void { + public override dispose(): void { this._isDisposed = true; super.dispose(); } @@ -65,7 +65,7 @@ class TextMateWorkerModel extends MirrorTextModel { this._resetTokenization(); } - onEvents(e: IModelChangedEvent): void { + override onEvents(e: IModelChangedEvent): void { super.onEvents(e); for (let i = 0; i < e.changes.length; i++) { const change = e.changes[i]; diff --git a/src/vs/workbench/services/textfile/browser/browserTextFileService.ts b/src/vs/workbench/services/textfile/browser/browserTextFileService.ts index ad654cd4dcf3ab..ade0b17718f2a1 100644 --- a/src/vs/workbench/services/textfile/browser/browserTextFileService.ts +++ b/src/vs/workbench/services/textfile/browser/browserTextFileService.ts @@ -9,7 +9,7 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; export class BrowserTextFileService extends AbstractTextFileService { - protected registerListeners(): void { + protected override registerListeners(): void { super.registerListeners(); // Lifecycle diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts index ce6cdd87bdc43b..fc2a3c781342cc 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts @@ -179,7 +179,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil this.modelService.setMode(this.textEditorModel, languageSelection); } - setMode(mode: string): void { + override setMode(mode: string): void { super.setMode(mode); this.preferredMode = mode; @@ -248,7 +248,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil //#region Resolve - async resolve(options?: ITextFileResolveOptions): Promise { + async override resolve(options?: ITextFileResolveOptions): Promise { this.logService.trace('[text file model] resolve() - enter', this.resource.toString(true)); // Return early if we are disposed @@ -910,9 +910,9 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil return this.saveSequentializer.pending ?? Promise.resolve(); } - getMode(this: IResolvedTextFileEditorModel): string; - getMode(): string | undefined; - getMode(): string | undefined { + override getMode(this: IResolvedTextFileEditorModel): string; + override getMode(): string | undefined; + override getMode(): string | undefined { if (this.textEditorModel) { return this.textEditorModel.getModeId(); } @@ -987,15 +987,15 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil //#endregion - isResolved(): this is IResolvedTextFileEditorModel { + override isResolved(): this is IResolvedTextFileEditorModel { return !!this.textEditorModel; } - isReadonly(): boolean { + override isReadonly(): boolean { return this.fileService.hasCapability(this.resource, FileSystemProviderCapabilities.Readonly); } - dispose(): void { + override dispose(): void { this.logService.trace('[text file model] dispose()', this.resource.toString(true)); this.inConflictMode = false; diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts b/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts index 402b69ae6fb2ba..1b2efab582e99d 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts @@ -479,7 +479,7 @@ export class TextFileEditorModelManager extends Disposable implements ITextFileE return true; } - dispose(): void { + override dispose(): void { super.dispose(); this.clear(); diff --git a/src/vs/workbench/services/textfile/common/textFileSaveParticipant.ts b/src/vs/workbench/services/textfile/common/textFileSaveParticipant.ts index 037f389fed8936..c2fde636ccd8e0 100644 --- a/src/vs/workbench/services/textfile/common/textFileSaveParticipant.ts +++ b/src/vs/workbench/services/textfile/common/textFileSaveParticipant.ts @@ -64,7 +64,7 @@ export class TextFileSaveParticipant extends Disposable { }); } - dispose(): void { + override dispose(): void { this.saveParticipants.splice(0, this.saveParticipants.length); } } diff --git a/src/vs/workbench/services/textfile/electron-sandbox/nativeTextFileService.ts b/src/vs/workbench/services/textfile/electron-sandbox/nativeTextFileService.ts index e6e23106a86e01..80930d5fd4c010 100644 --- a/src/vs/workbench/services/textfile/electron-sandbox/nativeTextFileService.ts +++ b/src/vs/workbench/services/textfile/electron-sandbox/nativeTextFileService.ts @@ -56,7 +56,7 @@ export class NativeTextFileService extends AbstractTextFileService { super(fileService, untitledTextEditorService, lifecycleService, instantiationService, modelService, environmentService, dialogService, fileDialogService, textResourceConfigurationService, filesConfigurationService, textModelService, codeEditorService, pathService, workingCopyFileService, uriIdentityService, modeService, logService); } - protected registerListeners(): void { + protected override registerListeners(): void { super.registerListeners(); // Lifecycle @@ -75,7 +75,7 @@ export class NativeTextFileService extends AbstractTextFileService { } } - async read(resource: URI, options?: IReadTextFileOptions): Promise { + async override read(resource: URI, options?: IReadTextFileOptions): Promise { // ensure size & memory limits options = this.ensureLimits(options); @@ -83,7 +83,7 @@ export class NativeTextFileService extends AbstractTextFileService { return super.read(resource, options); } - async readStream(resource: URI, options?: IReadTextFileOptions): Promise { + async override readStream(resource: URI, options?: IReadTextFileOptions): Promise { // ensure size & memory limits options = this.ensureLimits(options); @@ -119,7 +119,7 @@ export class NativeTextFileService extends AbstractTextFileService { return ensuredOptions; } - async write(resource: URI, value: string | ITextSnapshot, options?: IWriteTextFileOptions): Promise { + async override write(resource: URI, value: string | ITextSnapshot, options?: IWriteTextFileOptions): Promise { // check for `writeElevated property` to write elevated // (file:// only: https://github.com/microsoft/vscode/issues/48659) diff --git a/src/vs/workbench/services/untitled/common/untitledTextEditorInput.ts b/src/vs/workbench/services/untitled/common/untitledTextEditorInput.ts index 171c9e185c94a8..12e2fa4b1d10b8 100644 --- a/src/vs/workbench/services/untitled/common/untitledTextEditorInput.ts +++ b/src/vs/workbench/services/untitled/common/untitledTextEditorInput.ts @@ -51,11 +51,11 @@ export class UntitledTextEditorInput extends AbstractTextResourceEditorInput imp return UntitledTextEditorInput.ID; } - getName(): string { + override getName(): string { return this.model.name; } - getDescription(verbosity: Verbosity = Verbosity.MEDIUM): string | undefined { + override getDescription(verbosity: Verbosity = Verbosity.MEDIUM): string | undefined { // Without associated path: only use if name and description differ if (!this.model.hasAssociatedFilePath) { @@ -71,7 +71,7 @@ export class UntitledTextEditorInput extends AbstractTextResourceEditorInput imp return super.getDescription(verbosity); } - getTitle(verbosity: Verbosity): string { + override getTitle(verbosity: Verbosity): string { // Without associated path: check if name and description differ to decide // if description should appear besides the name to distinguish better @@ -89,7 +89,7 @@ export class UntitledTextEditorInput extends AbstractTextResourceEditorInput imp return super.getTitle(verbosity); } - isDirty(): boolean { + override isDirty(): boolean { return this.model.isDirty(); } @@ -109,7 +109,7 @@ export class UntitledTextEditorInput extends AbstractTextResourceEditorInput imp return this.model.getMode(); } - async resolve(): Promise { + async override resolve(): Promise { if (!this.modelResolve) { this.modelResolve = this.model.resolve(); } @@ -119,7 +119,7 @@ export class UntitledTextEditorInput extends AbstractTextResourceEditorInput imp return this.model; } - matches(otherInput: unknown): boolean { + override matches(otherInput: unknown): boolean { if (otherInput === this) { return true; } @@ -131,7 +131,7 @@ export class UntitledTextEditorInput extends AbstractTextResourceEditorInput imp return false; } - dispose(): void { + override dispose(): void { this.modelResolve = undefined; super.dispose(); diff --git a/src/vs/workbench/services/untitled/common/untitledTextEditorModel.ts b/src/vs/workbench/services/untitled/common/untitledTextEditorModel.ts index 261c565f1b88aa..c1f446a2f7bd4d 100644 --- a/src/vs/workbench/services/untitled/common/untitledTextEditorModel.ts +++ b/src/vs/workbench/services/untitled/common/untitledTextEditorModel.ts @@ -177,7 +177,7 @@ export class UntitledTextEditorModel extends BaseTextEditorModel implements IUnt private _hasModeSetExplicitly: boolean = false; get hasModeSetExplicitly(): boolean { return this._hasModeSetExplicitly; } - setMode(mode: string): void { + override setMode(mode: string): void { // Remember that an explicit mode was set this._hasModeSetExplicitly = true; @@ -199,7 +199,7 @@ export class UntitledTextEditorModel extends BaseTextEditorModel implements IUnt } } - getMode(): string | undefined { + override getMode(): string | undefined { if (this.textEditorModel) { return this.textEditorModel.getModeId(); } @@ -233,7 +233,7 @@ export class UntitledTextEditorModel extends BaseTextEditorModel implements IUnt } } - isReadonly(): boolean { + override isReadonly(): boolean { return false; } @@ -272,7 +272,7 @@ export class UntitledTextEditorModel extends BaseTextEditorModel implements IUnt return { content: withNullAsUndefined(this.createSnapshot()) }; } - async resolve(): Promise { + async override resolve(): Promise { // Check for backups const backup = await this.backupFileService.resolve(this.resource); diff --git a/src/vs/workbench/services/uriIdentity/test/common/uriIdentityService.test.ts b/src/vs/workbench/services/uriIdentity/test/common/uriIdentityService.test.ts index 09e956b2930315..ad03c1f05483ec 100644 --- a/src/vs/workbench/services/uriIdentity/test/common/uriIdentityService.test.ts +++ b/src/vs/workbench/services/uriIdentity/test/common/uriIdentityService.test.ts @@ -14,16 +14,16 @@ suite('URI Identity', function () { class FakeFileService extends mock() { - onDidChangeFileSystemProviderCapabilities = Event.None; - onDidChangeFileSystemProviderRegistrations = Event.None; + override onDidChangeFileSystemProviderCapabilities = Event.None; + override onDidChangeFileSystemProviderRegistrations = Event.None; constructor(readonly data: Map) { super(); } - canHandleResource(uri: URI) { + override canHandleResource(uri: URI) { return this.data.has(uri.scheme); } - hasCapability(uri: URI, flag: FileSystemProviderCapabilities): boolean { + override hasCapability(uri: URI, flag: FileSystemProviderCapabilities): boolean { const mask = this.data.get(uri.scheme) ?? 0; return Boolean(mask & flag); } diff --git a/src/vs/workbench/services/url/electron-sandbox/urlService.ts b/src/vs/workbench/services/url/electron-sandbox/urlService.ts index 79220df33de895..4e8594d7f65c27 100644 --- a/src/vs/workbench/services/url/electron-sandbox/urlService.ts +++ b/src/vs/workbench/services/url/electron-sandbox/urlService.ts @@ -37,7 +37,7 @@ export class RelayURLService extends NativeURLService implements IURLHandler, IO openerService.registerOpener(this); } - create(options?: Partial): URI { + override create(options?: Partial): URI { const uri = super.create(options); let query = uri.query; @@ -50,7 +50,7 @@ export class RelayURLService extends NativeURLService implements IURLHandler, IO return uri.with({ query }); } - async open(resource: URI | string, options?: IRelayOpenURLOptions): Promise { + async override open(resource: URI | string, options?: IRelayOpenURLOptions): Promise { if (!matchesScheme(resource, this.productService.urlProtocol)) { return false; diff --git a/src/vs/workbench/services/userData/browser/userDataInit.ts b/src/vs/workbench/services/userData/browser/userDataInit.ts index 45a05b802d7d4c..843f48d365765f 100644 --- a/src/vs/workbench/services/userData/browser/userDataInit.ts +++ b/src/vs/workbench/services/userData/browser/userDataInit.ts @@ -232,7 +232,7 @@ class WorkbenchExtensionsInitializer extends ExtensionsInitializer { super(extensionManagementService, galleryService, extensionEnablementService, storageService, ignoredExtensionsManagementService, fileService, environmentService, logService); } - protected async initializeRemoteExtensions(remoteExtensions: ISyncExtension[]): Promise { + protected async override initializeRemoteExtensions(remoteExtensions: ISyncExtension[]): Promise { const newlyEnabledExtensions = (await super.initializeRemoteExtensions(remoteExtensions)); const canEnabledExtensions = newlyEnabledExtensions.filter(e => this.extensionService.canAddExtension(toExtensionDescription(e))); if (!(await this.areExtensionsRunning(canEnabledExtensions))) { diff --git a/src/vs/workbench/services/userData/test/browser/fileUserDataProvider.test.ts b/src/vs/workbench/services/userData/test/browser/fileUserDataProvider.test.ts index cd427f4a2b0c44..0c8685ce36c614 100644 --- a/src/vs/workbench/services/userData/test/browser/fileUserDataProvider.test.ts +++ b/src/vs/workbench/services/userData/test/browser/fileUserDataProvider.test.ts @@ -25,7 +25,7 @@ class TestWorkbenchEnvironmentService extends BrowserWorkbenchEnvironmentService constructor(private readonly appSettingsHome: URI) { super(Object.create(null), TestProductService); } - get userRoamingDataHome() { return this.appSettingsHome.with({ scheme: Schemas.userData }); } + override get userRoamingDataHome() { return this.appSettingsHome.with({ scheme: Schemas.userData }); } } suite('FileUserDataProvider', () => { diff --git a/src/vs/workbench/services/userDataSync/browser/userDataAutoSyncEnablementService.ts b/src/vs/workbench/services/userDataSync/browser/userDataAutoSyncEnablementService.ts index 9684c842da21cd..7d4c6ffbb1a5b1 100644 --- a/src/vs/workbench/services/userDataSync/browser/userDataAutoSyncEnablementService.ts +++ b/src/vs/workbench/services/userDataSync/browser/userDataAutoSyncEnablementService.ts @@ -13,11 +13,11 @@ export class WebUserDataAutoSyncEnablementService extends UserDataAutoSyncEnable private get workbenchEnvironmentService(): IWorkbenchEnvironmentService { return this.environmentService; } private enabled: boolean | undefined = undefined; - canToggleEnablement(): boolean { + override canToggleEnablement(): boolean { return this.isTrusted() && super.canToggleEnablement(); } - isEnabled(): boolean { + override isEnabled(): boolean { if (!this.isTrusted()) { return false; } @@ -30,7 +30,7 @@ export class WebUserDataAutoSyncEnablementService extends UserDataAutoSyncEnable return this.enabled; } - setEnablement(enabled: boolean) { + override setEnablement(enabled: boolean) { if (enabled && !this.canToggleEnablement()) { return; } diff --git a/src/vs/workbench/services/userDataSync/browser/userDataSyncResourceEnablementService.ts b/src/vs/workbench/services/userDataSync/browser/userDataSyncResourceEnablementService.ts index 8c361845bda908..203ff7ebea7fd9 100644 --- a/src/vs/workbench/services/userDataSync/browser/userDataSyncResourceEnablementService.ts +++ b/src/vs/workbench/services/userDataSync/browser/userDataSyncResourceEnablementService.ts @@ -20,7 +20,7 @@ export class UserDataSyncResourceEnablementService extends BaseUserDataSyncResou super(storageService, telemetryService); } - getResourceSyncStateVersion(resource: SyncResource): string | undefined { + override getResourceSyncStateVersion(resource: SyncResource): string | undefined { return resource === SyncResource.Extensions ? this.environmentService.options?.settingsSyncOptions?.extensionsSyncStateVersion : undefined; } diff --git a/src/vs/workbench/services/workingCopy/common/fileWorkingCopy.ts b/src/vs/workbench/services/workingCopy/common/fileWorkingCopy.ts index 8fc4a3d398a599..0cd81e200104ac 100644 --- a/src/vs/workbench/services/workingCopy/common/fileWorkingCopy.ts +++ b/src/vs/workbench/services/workingCopy/common/fileWorkingCopy.ts @@ -1214,7 +1214,7 @@ export class FileWorkingCopy extends Disposable return this.disposed; } - dispose(): void { + override dispose(): void { this.logService.trace('[file working copy] dispose()', this.resource.toString(true)); // State diff --git a/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.ts b/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.ts index bef0d22e2c56ac..57a7c5e8decfc6 100644 --- a/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.ts +++ b/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.ts @@ -703,7 +703,7 @@ export class FileWorkingCopyManager extends Dis return true; } - dispose(): void { + override dispose(): void { super.dispose(); this.clear(); diff --git a/src/vs/workbench/services/workingCopy/common/workingCopyFileOperationParticipant.ts b/src/vs/workbench/services/workingCopy/common/workingCopyFileOperationParticipant.ts index 5c6cc8194596de..741f1d512195ec 100644 --- a/src/vs/workbench/services/workingCopy/common/workingCopyFileOperationParticipant.ts +++ b/src/vs/workbench/services/workingCopy/common/workingCopyFileOperationParticipant.ts @@ -43,7 +43,7 @@ export class WorkingCopyFileOperationParticipant extends Disposable { } } - dispose(): void { + override dispose(): void { this.participants.clear(); } } diff --git a/src/vs/workbench/services/workingCopy/test/browser/fileWorkingCopy.test.ts b/src/vs/workbench/services/workingCopy/test/browser/fileWorkingCopy.test.ts index 263e0350d6ee46..d963eb46afb14c 100644 --- a/src/vs/workbench/services/workingCopy/test/browser/fileWorkingCopy.test.ts +++ b/src/vs/workbench/services/workingCopy/test/browser/fileWorkingCopy.test.ts @@ -68,7 +68,7 @@ export class TestFileWorkingCopyModel extends Disposable implements IFileWorking this.pushedStackElement = true; } - dispose(): void { + override dispose(): void { this._onWillDispose.fire(); super.dispose(); diff --git a/src/vs/workbench/services/workspaces/browser/workspaceTrustEditorInput.ts b/src/vs/workbench/services/workspaces/browser/workspaceTrustEditorInput.ts index 78181c577ee71c..eae52f311b2f0b 100644 --- a/src/vs/workbench/services/workspaces/browser/workspaceTrustEditorInput.ts +++ b/src/vs/workbench/services/workspaces/browser/workspaceTrustEditorInput.ts @@ -28,15 +28,15 @@ export class WorkspaceTrustEditorInput extends EditorInput { return WorkspaceTrustEditorInput.ID; } - matches(otherInput: unknown): boolean { + override matches(otherInput: unknown): boolean { return otherInput instanceof WorkspaceTrustEditorInput; } - getName(): string { + override getName(): string { return localize('workspaceTrustEditorInputName', "Workspace Trust"); } - async resolve(): Promise { + async override resolve(): Promise { return this.workspaceTrustService.workspaceTrustEditorModel; } } diff --git a/src/vs/workbench/services/workspaces/electron-sandbox/workspaceEditingService.ts b/src/vs/workbench/services/workspaces/electron-sandbox/workspaceEditingService.ts index 486e9e290b51fd..a6e8dac55e24fa 100644 --- a/src/vs/workbench/services/workspaces/electron-sandbox/workspaceEditingService.ts +++ b/src/vs/workbench/services/workspaces/electron-sandbox/workspaceEditingService.ts @@ -139,7 +139,7 @@ export class NativeWorkspaceEditingService extends AbstractWorkspaceEditingServi } } - async isValidTargetWorkspacePath(path: URI): Promise { + async override isValidTargetWorkspacePath(path: URI): Promise { const windows = await this.nativeHostService.getWindows(); // Prevent overwriting a workspace that is currently opened in another window diff --git a/src/vs/workbench/test/browser/api/extHostApiCommands.test.ts b/src/vs/workbench/test/browser/api/extHostApiCommands.test.ts index 499997b5d27d89..8cce22132c47f3 100644 --- a/src/vs/workbench/test/browser/api/extHostApiCommands.test.ts +++ b/src/vs/workbench/test/browser/api/extHostApiCommands.test.ts @@ -90,14 +90,14 @@ suite('ExtHostLanguageFeatureCommands', function () { rpcProtocol = new TestRPCProtocol(); const services = new ServiceCollection(); services.set(IExtensionService, new class extends mock() { - async activateByEvent() { + async override activateByEvent() { } }); services.set(ICommandService, new SyncDescriptor(class extends mock() { - executeCommand(id: string, ...args: any): any { + override executeCommand(id: string, ...args: any): any { const command = CommandsRegistry.getCommands().get(id); if (!command) { return Promise.reject(new Error(id + ' NOT known')); @@ -108,17 +108,17 @@ suite('ExtHostLanguageFeatureCommands', function () { })); services.set(IMarkerService, new MarkerService()); services.set(IModelService, new class extends mock() { - getModel() { return model; } + override getModel() { return model; } }); services.set(ITextModelService, new class extends mock() { - async createModelReference() { + async override createModelReference() { return new ImmortalReference(new class extends mock() { - textEditorModel = model; + override textEditorModel = model; }); } }); services.set(IEditorWorkerService, new class extends mock() { - async computeMoreMinimalEdits(_uri: any, edits: any) { + async override computeMoreMinimalEdits(_uri: any, edits: any) { return edits || undefined; } }); diff --git a/src/vs/workbench/test/browser/api/extHostBulkEdits.test.ts b/src/vs/workbench/test/browser/api/extHostBulkEdits.test.ts index 88a25eea8bbaf7..a77e9d63c8d3ad 100644 --- a/src/vs/workbench/test/browser/api/extHostBulkEdits.test.ts +++ b/src/vs/workbench/test/browser/api/extHostBulkEdits.test.ts @@ -24,7 +24,7 @@ suite('ExtHostBulkEdits.applyWorkspaceEdit', () => { let rpcProtocol = new TestRPCProtocol(); rpcProtocol.set(MainContext.MainThreadBulkEdits, new class extends mock() { - $tryApplyWorkspaceEdit(_workspaceResourceEdits: IWorkspaceEditDto): Promise { + override $tryApplyWorkspaceEdit(_workspaceResourceEdits: IWorkspaceEditDto): Promise { workspaceResourceEdits = _workspaceResourceEdits; return Promise.resolve(true); } diff --git a/src/vs/workbench/test/browser/api/extHostCommands.test.ts b/src/vs/workbench/test/browser/api/extHostCommands.test.ts index 2ecab2e8d610bb..f20ed5033a6022 100644 --- a/src/vs/workbench/test/browser/api/extHostCommands.test.ts +++ b/src/vs/workbench/test/browser/api/extHostCommands.test.ts @@ -18,10 +18,10 @@ suite('ExtHostCommands', function () { let lastUnregister: string; const shape = new class extends mock() { - $registerCommand(id: string): void { + override $registerCommand(id: string): void { // } - $unregisterCommand(id: string): void { + override $unregisterCommand(id: string): void { lastUnregister = id; } }; @@ -41,10 +41,10 @@ suite('ExtHostCommands', function () { let unregisterCounter = 0; const shape = new class extends mock() { - $registerCommand(id: string): void { + override $registerCommand(id: string): void { // } - $unregisterCommand(id: string): void { + override $unregisterCommand(id: string): void { unregisterCounter += 1; } }; @@ -65,10 +65,10 @@ suite('ExtHostCommands', function () { let count = 0; const shape = new class extends mock() { - $registerCommand(id: string): void { + override $registerCommand(id: string): void { // } - async $executeCommand(id: string, args: any[], retry: boolean): Promise { + async override $executeCommand(id: string, args: any[], retry: boolean): Promise { count++; assert.strictEqual(retry, count === 1); if (count === 1) { diff --git a/src/vs/workbench/test/browser/api/extHostConfiguration.test.ts b/src/vs/workbench/test/browser/api/extHostConfiguration.test.ts index 6c27e95c9e0025..08a15f45ed2ce4 100644 --- a/src/vs/workbench/test/browser/api/extHostConfiguration.test.ts +++ b/src/vs/workbench/test/browser/api/extHostConfiguration.test.ts @@ -24,7 +24,7 @@ suite('ExtHostConfiguration', function () { class RecordingShape extends mock() { lastArgs!: [ConfigurationTarget, string, any]; - $updateConfigurationOption(target: ConfigurationTarget, key: string, value: any): Promise { + override $updateConfigurationOption(target: ConfigurationTarget, key: string, value: any): Promise { this.lastArgs = [target, key, value]; return Promise.resolve(undefined); } @@ -657,7 +657,7 @@ suite('ExtHostConfiguration', function () { test('update/error-state not OK', function () { const shape = new class extends mock() { - $updateConfigurationOption(target: ConfigurationTarget, key: string, value: any): Promise { + override $updateConfigurationOption(target: ConfigurationTarget, key: string, value: any): Promise { return Promise.reject(new Error('Unknown Key')); // something !== OK } }; diff --git a/src/vs/workbench/test/browser/api/extHostDecorations.test.ts b/src/vs/workbench/test/browser/api/extHostDecorations.test.ts index 0c926b5041054e..4dc01fc51d330e 100644 --- a/src/vs/workbench/test/browser/api/extHostDecorations.test.ts +++ b/src/vs/workbench/test/browser/api/extHostDecorations.test.ts @@ -25,14 +25,14 @@ suite('ExtHostDecorations', function () { providers.clear(); mainThreadShape = new class extends mock() { - $registerDecorationProvider(handle: number) { + override $registerDecorationProvider(handle: number) { providers.add(handle); } }; extHostDecorations = new ExtHostDecorations( new class extends mock() { - getProxy(): any { + override getProxy(): any { return mainThreadShape; } }, diff --git a/src/vs/workbench/test/browser/api/extHostDiagnostics.test.ts b/src/vs/workbench/test/browser/api/extHostDiagnostics.test.ts index 68fd8bca049ca5..241e6413a23df3 100644 --- a/src/vs/workbench/test/browser/api/extHostDiagnostics.test.ts +++ b/src/vs/workbench/test/browser/api/extHostDiagnostics.test.ts @@ -18,10 +18,10 @@ import { nullExtensionDescription } from 'vs/workbench/services/extensions/commo suite('ExtHostDiagnostics', () => { class DiagnosticsShape extends mock() { - $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): void { + override $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): void { // } - $clear(owner: string): void { + override $clear(owner: string): void { // } } @@ -164,7 +164,7 @@ suite('ExtHostDiagnostics', () => { let lastEntries!: [UriComponents, IMarkerData[]][]; let collection = new DiagnosticCollection('test', 'test', 100, new class extends DiagnosticsShape { - $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): void { + override $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): void { lastEntries = entries; return super.$changeMany(owner, entries); } @@ -198,7 +198,7 @@ suite('ExtHostDiagnostics', () => { const emitter = new Emitter(); emitter.event(_ => eventCount += 1); const collection = new DiagnosticCollection('test', 'test', 100, new class extends DiagnosticsShape { - $changeMany() { + override $changeMany() { changeCount += 1; } }, emitter); @@ -263,7 +263,7 @@ suite('ExtHostDiagnostics', () => { let lastEntries!: [UriComponents, IMarkerData[]][]; let collection = new DiagnosticCollection('test', 'test', 250, new class extends DiagnosticsShape { - $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): void { + override $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): void { lastEntries = entries; return super.$changeMany(owner, entries); } @@ -350,7 +350,7 @@ suite('ExtHostDiagnostics', () => { test('diagnostics with related information', function (done) { let collection = new DiagnosticCollection('ddd', 'test', 100, new class extends DiagnosticsShape { - $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]) { + override $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]) { let [[, data]] = entries; assert.strictEqual(entries.length, 1); @@ -408,7 +408,7 @@ suite('ExtHostDiagnostics', () => { test('Error updating diagnostics from extension #60394', function () { let callCount = 0; let collection = new DiagnosticCollection('ddd', 'test', 100, new class extends DiagnosticsShape { - $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]) { + override $changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]) { callCount += 1; } }, new Emitter()); diff --git a/src/vs/workbench/test/browser/api/extHostDocumentData.test.ts b/src/vs/workbench/test/browser/api/extHostDocumentData.test.ts index 4fc76b0dd1d215..c1a5af90538a4c 100644 --- a/src/vs/workbench/test/browser/api/extHostDocumentData.test.ts +++ b/src/vs/workbench/test/browser/api/extHostDocumentData.test.ts @@ -50,7 +50,7 @@ suite('ExtHostDocumentData', () => { test('save, when disposed', function () { let saved: URI; let data = new ExtHostDocumentData(new class extends mock() { - $trySaveDocument(uri: URI) { + override $trySaveDocument(uri: URI) { assert.ok(!saved); saved = uri; return Promise.resolve(true); diff --git a/src/vs/workbench/test/browser/api/extHostDocumentSaveParticipant.test.ts b/src/vs/workbench/test/browser/api/extHostDocumentSaveParticipant.test.ts index a89f12a7a19c09..b41dc067fb32b0 100644 --- a/src/vs/workbench/test/browser/api/extHostDocumentSaveParticipant.test.ts +++ b/src/vs/workbench/test/browser/api/extHostDocumentSaveParticipant.test.ts @@ -379,7 +379,7 @@ suite('ExtHostDocumentSaveParticipant', () => { test('Log failing listener', function () { let didLogSomething = false; let participant = new ExtHostDocumentSaveParticipant(new class extends NullLogService { - error(message: string | Error, ...args: any[]): void { + override error(message: string | Error, ...args: any[]): void { didLogSomething = true; } }, documents, mainThreadBulkEdits); diff --git a/src/vs/workbench/test/browser/api/extHostLanguageFeatures.test.ts b/src/vs/workbench/test/browser/api/extHostLanguageFeatures.test.ts index da09f925ada9ed..2338d947e238cd 100644 --- a/src/vs/workbench/test/browser/api/extHostLanguageFeatures.test.ts +++ b/src/vs/workbench/test/browser/api/extHostLanguageFeatures.test.ts @@ -966,7 +966,7 @@ suite('ExtHostLanguageFeatures', function () { // --- format const NullWorkerService = new class extends mock() { - computeMoreMinimalEdits(resource: URI, edits: modes.TextEdit[] | null | undefined): Promise { + override computeMoreMinimalEdits(resource: URI, edits: modes.TextEdit[] | null | undefined): Promise { return Promise.resolve(withNullAsUndefined(edits)); } }; diff --git a/src/vs/workbench/test/browser/api/extHostMessagerService.test.ts b/src/vs/workbench/test/browser/api/extHostMessagerService.test.ts index 0c6ce4dc9596fb..d0965fecdb1d49 100644 --- a/src/vs/workbench/test/browser/api/extHostMessagerService.test.ts +++ b/src/vs/workbench/test/browser/api/extHostMessagerService.test.ts @@ -117,7 +117,7 @@ suite('ExtHostMessageService', function () { suite('modal', () => { test('calls dialog service', async () => { const service = new MainThreadMessageService(null!, emptyNotificationService, emptyCommandService, new class extends mock() { - show(severity: Severity, message: string, buttons: string[]) { + override show(severity: Severity, message: string, buttons: string[]) { assert.strictEqual(severity, 1); assert.strictEqual(message, 'h'); assert.strictEqual(buttons.length, 2); @@ -132,7 +132,7 @@ suite('ExtHostMessageService', function () { test('returns undefined when cancelled', async () => { const service = new MainThreadMessageService(null!, emptyNotificationService, emptyCommandService, new class extends mock() { - show() { + override show() { return Promise.resolve({ choice: 1 }); } } as IDialogService); @@ -143,7 +143,7 @@ suite('ExtHostMessageService', function () { test('hides Cancel button when not needed', async () => { const service = new MainThreadMessageService(null!, emptyNotificationService, emptyCommandService, new class extends mock() { - show(severity: Severity, message: string, buttons: string[]) { + override show(severity: Severity, message: string, buttons: string[]) { assert.strictEqual(buttons.length, 1); return Promise.resolve({ choice: 0 }); } diff --git a/src/vs/workbench/test/browser/api/extHostNotebook.test.ts b/src/vs/workbench/test/browser/api/extHostNotebook.test.ts index e725f269c70cf3..32fc3f3ac23f7e 100644 --- a/src/vs/workbench/test/browser/api/extHostNotebook.test.ts +++ b/src/vs/workbench/test/browser/api/extHostNotebook.test.ts @@ -41,16 +41,16 @@ suite('NotebookCell#Document', function () { setup(async function () { rpcProtocol = new TestRPCProtocol(); rpcProtocol.set(MainContext.MainThreadCommands, new class extends mock() { - $registerCommand() { } + override $registerCommand() { } }); rpcProtocol.set(MainContext.MainThreadNotebook, new class extends mock() { - async $registerNotebookProvider() { } - async $unregisterNotebookProvider() { } + async override $registerNotebookProvider() { } + async override $unregisterNotebookProvider() { } }); extHostDocumentsAndEditors = new ExtHostDocumentsAndEditors(rpcProtocol, new NullLogService()); extHostDocuments = new ExtHostDocuments(rpcProtocol, extHostDocumentsAndEditors); const extHostStoragePaths = new class extends mock() { - workspaceValue() { + override workspaceValue() { return URI.from({ scheme: 'test', path: generateUuid() }); } }; diff --git a/src/vs/workbench/test/browser/api/extHostNotebookConcatDocument.test.ts b/src/vs/workbench/test/browser/api/extHostNotebookConcatDocument.test.ts index 3aacd9f7df60b4..9815e17162885b 100644 --- a/src/vs/workbench/test/browser/api/extHostNotebookConcatDocument.test.ts +++ b/src/vs/workbench/test/browser/api/extHostNotebookConcatDocument.test.ts @@ -38,16 +38,16 @@ suite('NotebookConcatDocument', function () { rpcProtocol = new TestRPCProtocol(); rpcProtocol.set(MainContext.MainThreadCommands, new class extends mock() { - $registerCommand() { } + override $registerCommand() { } }); rpcProtocol.set(MainContext.MainThreadNotebook, new class extends mock() { - async $registerNotebookProvider() { } - async $unregisterNotebookProvider() { } + async override $registerNotebookProvider() { } + async override $unregisterNotebookProvider() { } }); extHostDocumentsAndEditors = new ExtHostDocumentsAndEditors(rpcProtocol, new NullLogService()); extHostDocuments = new ExtHostDocuments(rpcProtocol, extHostDocumentsAndEditors); const extHostStoragePaths = new class extends mock() { - workspaceValue() { + override workspaceValue() { return URI.from({ scheme: 'test', path: generateUuid() }); } }; diff --git a/src/vs/workbench/test/browser/api/extHostNotebookKernel.test.ts b/src/vs/workbench/test/browser/api/extHostNotebookKernel.test.ts index 24afbcca7493fa..0cb05595301fe4 100644 --- a/src/vs/workbench/test/browser/api/extHostNotebookKernel.test.ts +++ b/src/vs/workbench/test/browser/api/extHostNotebookKernel.test.ts @@ -37,18 +37,18 @@ suite('NotebookKernel', function () { rpcProtocol = new TestRPCProtocol(); rpcProtocol.set(MainContext.MainThreadCommands, new class extends mock() { - $registerCommand() { } + override $registerCommand() { } }); rpcProtocol.set(MainContext.MainThreadNotebook, new class extends mock() { - async $registerNotebookProvider() { } - async $unregisterNotebookProvider() { } - async $registerNotebookKernelProvider() { } - async $unregisterNotebookKernelProvider() { } + async override $registerNotebookProvider() { } + async override $unregisterNotebookProvider() { } + async override $registerNotebookKernelProvider() { } + async override $unregisterNotebookKernelProvider() { } }); extHostDocumentsAndEditors = new ExtHostDocumentsAndEditors(rpcProtocol, new NullLogService()); extHostDocuments = new ExtHostDocuments(rpcProtocol, extHostDocumentsAndEditors); const extHostStoragePaths = new class extends mock() { - workspaceValue() { + override workspaceValue() { return URI.from({ scheme: 'test', path: generateUuid() }); } }; @@ -58,13 +58,13 @@ suite('NotebookKernel', function () { }); const kernels = [new class extends mock() { - id = 'first'; + override id = 'first'; }, new class extends mock() { - id = 'second'; + override id = 'second'; }]; let kernelReg = extHostNotebooks.registerNotebookKernelProvider(nullExtensionDescription, { viewType: 'test' }, new class extends mock() { - async provideKernels() { return kernels; } + async override provideKernels() { return kernels; } }); // init diff --git a/src/vs/workbench/test/browser/api/extHostTextEditor.test.ts b/src/vs/workbench/test/browser/api/extHostTextEditor.test.ts index ca9a7f7999daf8..9d69ae5753703e 100644 --- a/src/vs/workbench/test/browser/api/extHostTextEditor.test.ts +++ b/src/vs/workbench/test/browser/api/extHostTextEditor.test.ts @@ -44,7 +44,7 @@ suite('ExtHostTextEditor', () => { let applyCount = 0; let editor = new ExtHostTextEditor('edt1', new class extends mock() { - $tryApplyEdits(): Promise { + override $tryApplyEdits(): Promise { applyCount += 1; return Promise.resolve(true); } diff --git a/src/vs/workbench/test/browser/api/extHostTreeViews.test.ts b/src/vs/workbench/test/browser/api/extHostTreeViews.test.ts index 134e347dd65323..6f722d175865d8 100644 --- a/src/vs/workbench/test/browser/api/extHostTreeViews.test.ts +++ b/src/vs/workbench/test/browser/api/extHostTreeViews.test.ts @@ -26,16 +26,16 @@ suite('ExtHostTreeView', function () { onRefresh = new Emitter<{ [treeItemHandle: string]: ITreeItem }>(); - async $registerTreeViewDataProvider(treeViewId: string): Promise { + async override $registerTreeViewDataProvider(treeViewId: string): Promise { } - $refresh(viewId: string, itemsToRefresh: { [treeItemHandle: string]: ITreeItem }): Promise { + override $refresh(viewId: string, itemsToRefresh: { [treeItemHandle: string]: ITreeItem }): Promise { return Promise.resolve(null).then(() => { this.onRefresh.fire(itemsToRefresh); }); } - $reveal(): Promise { + override $reveal(): Promise { return Promise.resolve(); } diff --git a/src/vs/workbench/test/browser/api/extHostWorkspace.test.ts b/src/vs/workbench/test/browser/api/extHostWorkspace.test.ts index 7305f39937e0d4..f90643430bebe3 100644 --- a/src/vs/workbench/test/browser/api/extHostWorkspace.test.ts +++ b/src/vs/workbench/test/browser/api/extHostWorkspace.test.ts @@ -590,7 +590,7 @@ suite('ExtHostWorkspace', function () { let mainThreadCalled = false; rpcProtocol.set(MainContext.MainThreadWorkspace, new class extends mock() { - $startFileSearch(includePattern: string, _includeFolder: UriComponents | null, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise { + override $startFileSearch(includePattern: string, _includeFolder: UriComponents | null, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise { mainThreadCalled = true; assert.strictEqual(includePattern, 'foo'); assert.strictEqual(_includeFolder, null); @@ -612,7 +612,7 @@ suite('ExtHostWorkspace', function () { let mainThreadCalled = false; rpcProtocol.set(MainContext.MainThreadWorkspace, new class extends mock() { - $startFileSearch(includePattern: string, _includeFolder: UriComponents | null, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise { + override $startFileSearch(includePattern: string, _includeFolder: UriComponents | null, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise { mainThreadCalled = true; assert.strictEqual(includePattern, 'glob/**'); assert.deepStrictEqual(_includeFolder ? URI.from(_includeFolder).toJSON() : null, URI.file('/other/folder').toJSON()); @@ -641,7 +641,7 @@ suite('ExtHostWorkspace', function () { let mainThreadCalled = false; rpcProtocol.set(MainContext.MainThreadWorkspace, new class extends mock() { - $startFileSearch(includePattern: string, _includeFolder: UriComponents | null, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise { + override $startFileSearch(includePattern: string, _includeFolder: UriComponents | null, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise { mainThreadCalled = true; assert.strictEqual(includePattern, 'glob/**'); assert.deepStrictEqual(_includeFolder, URI.file('/other/folder').toJSON()); @@ -662,7 +662,7 @@ suite('ExtHostWorkspace', function () { let mainThreadCalled = false; rpcProtocol.set(MainContext.MainThreadWorkspace, new class extends mock() { - $startFileSearch(includePattern: string, _includeFolder: UriComponents | null, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise { + override $startFileSearch(includePattern: string, _includeFolder: UriComponents | null, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise { mainThreadCalled = true; return Promise.resolve(null); } @@ -682,7 +682,7 @@ suite('ExtHostWorkspace', function () { let mainThreadCalled = false; rpcProtocol.set(MainContext.MainThreadWorkspace, new class extends mock() { - $startFileSearch(includePattern: string, _includeFolder: UriComponents | null, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise { + override $startFileSearch(includePattern: string, _includeFolder: UriComponents | null, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise { mainThreadCalled = true; assert(excludePatternOrDisregardExcludes, 'glob/**'); // Note that the base portion is ignored, see #52651 return Promise.resolve(null); @@ -701,7 +701,7 @@ suite('ExtHostWorkspace', function () { let mainThreadCalled = false; rpcProtocol.set(MainContext.MainThreadWorkspace, new class extends mock() { - async $startTextSearch(query: IPatternInfo, folder: UriComponents | null, options: ITextQueryBuilderOptions, requestId: number, token: CancellationToken): Promise { + async override $startTextSearch(query: IPatternInfo, folder: UriComponents | null, options: ITextQueryBuilderOptions, requestId: number, token: CancellationToken): Promise { mainThreadCalled = true; assert.strictEqual(query.pattern, 'foo'); assert.strictEqual(folder, null); @@ -722,7 +722,7 @@ suite('ExtHostWorkspace', function () { let mainThreadCalled = false; rpcProtocol.set(MainContext.MainThreadWorkspace, new class extends mock() { - async $startTextSearch(query: IPatternInfo, folder: UriComponents | null, options: ITextQueryBuilderOptions, requestId: number, token: CancellationToken): Promise { + async override $startTextSearch(query: IPatternInfo, folder: UriComponents | null, options: ITextQueryBuilderOptions, requestId: number, token: CancellationToken): Promise { mainThreadCalled = true; assert.strictEqual(query.pattern, 'foo'); assert.strictEqual(folder, null); @@ -743,7 +743,7 @@ suite('ExtHostWorkspace', function () { let mainThreadCalled = false; rpcProtocol.set(MainContext.MainThreadWorkspace, new class extends mock() { - async $startTextSearch(query: IPatternInfo, folder: UriComponents | null, options: ITextQueryBuilderOptions, requestId: number, token: CancellationToken): Promise { + async override $startTextSearch(query: IPatternInfo, folder: UriComponents | null, options: ITextQueryBuilderOptions, requestId: number, token: CancellationToken): Promise { mainThreadCalled = true; assert.strictEqual(query.pattern, 'foo'); assert.deepStrictEqual(folder, URI.file('/other/folder').toJSON()); @@ -764,7 +764,7 @@ suite('ExtHostWorkspace', function () { let mainThreadCalled = false; rpcProtocol.set(MainContext.MainThreadWorkspace, new class extends mock() { - async $startTextSearch(query: IPatternInfo, folder: UriComponents | null, options: ITextQueryBuilderOptions, requestId: number, token: CancellationToken): Promise { + async override $startTextSearch(query: IPatternInfo, folder: UriComponents | null, options: ITextQueryBuilderOptions, requestId: number, token: CancellationToken): Promise { mainThreadCalled = true; return null; } @@ -782,7 +782,7 @@ suite('ExtHostWorkspace', function () { let mainThreadCalled = false; rpcProtocol.set(MainContext.MainThreadWorkspace, new class extends mock() { - async $startTextSearch(query: IPatternInfo, folder: UriComponents | null, options: ITextQueryBuilderOptions, requestId: number, token: CancellationToken): Promise { + async override $startTextSearch(query: IPatternInfo, folder: UriComponents | null, options: ITextQueryBuilderOptions, requestId: number, token: CancellationToken): Promise { mainThreadCalled = true; assert.strictEqual(query.pattern, 'foo'); assert.deepStrictEqual(folder, null); diff --git a/src/vs/workbench/test/browser/api/mainThreadCommands.test.ts b/src/vs/workbench/test/browser/api/mainThreadCommands.test.ts index 65dc8e42be38ac..3b2f85bdaffefb 100644 --- a/src/vs/workbench/test/browser/api/mainThreadCommands.test.ts +++ b/src/vs/workbench/test/browser/api/mainThreadCommands.test.ts @@ -51,13 +51,13 @@ suite('MainThreadCommands', function () { const commands = new MainThreadCommands( SingleProxyRPCProtocol(null), new class extends mock() { - executeCommand(id: string): Promise { + override executeCommand(id: string): Promise { runs.push(id); return Promise.resolve(undefined); } }, new class extends mock() { - activateByEvent(id: string) { + override activateByEvent(id: string) { activations.push(id); return Promise.resolve(); } diff --git a/src/vs/workbench/test/browser/api/mainThreadDiagnostics.test.ts b/src/vs/workbench/test/browser/api/mainThreadDiagnostics.test.ts index 6f28fccec7b8ed..13d6510969de19 100644 --- a/src/vs/workbench/test/browser/api/mainThreadDiagnostics.test.ts +++ b/src/vs/workbench/test/browser/api/mainThreadDiagnostics.test.ts @@ -38,7 +38,7 @@ suite('MainThreadDiagnostics', function () { }, markerService, new class extends mock() { - asCanonicalUri(uri: URI) { return uri; } + override asCanonicalUri(uri: URI) { return uri; } } ); diff --git a/src/vs/workbench/test/browser/api/mainThreadDocumentContentProviders.test.ts b/src/vs/workbench/test/browser/api/mainThreadDocumentContentProviders.test.ts index 44e7a8a7e0841d..526e1769199046 100644 --- a/src/vs/workbench/test/browser/api/mainThreadDocumentContentProviders.test.ts +++ b/src/vs/workbench/test/browser/api/mainThreadDocumentContentProviders.test.ts @@ -22,13 +22,13 @@ suite('MainThreadDocumentContentProviders', function () { let providers = new MainThreadDocumentContentProviders(new TestRPCProtocol(), null!, null!, new class extends mock() { - getModel(_uri: URI) { + override getModel(_uri: URI) { assert.strictEqual(uri.toString(), _uri.toString()); return model; } }, new class extends mock() { - computeMoreMinimalEdits(_uri: URI, data: TextEdit[] | undefined) { + override computeMoreMinimalEdits(_uri: URI, data: TextEdit[] | undefined) { assert.strictEqual(model.getValue(), '1'); return Promise.resolve(data); } diff --git a/src/vs/workbench/test/browser/api/mainThreadDocumentsAndEditors.test.ts b/src/vs/workbench/test/browser/api/mainThreadDocumentsAndEditors.test.ts index c282692f85734b..70739001aa37b9 100644 --- a/src/vs/workbench/test/browser/api/mainThreadDocumentsAndEditors.test.ts +++ b/src/vs/workbench/test/browser/api/mainThreadDocumentsAndEditors.test.ts @@ -57,8 +57,8 @@ suite('MainThreadDocumentsAndEditors', () => { modelService = new ModelServiceImpl(configService, new TestTextResourcePropertiesService(configService), new TestThemeService(), new NullLogService(), undoRedoService); codeEditorService = new TestCodeEditorService(); textFileService = new class extends mock() { - isDirty() { return false; } - files = { + override isDirty() { return false; } + override files = { onDidSave: Event.None, onDidRevert: Event.None, onDidChangeDirty: Event.None @@ -68,14 +68,14 @@ suite('MainThreadDocumentsAndEditors', () => { const editorGroupService = new TestEditorGroupsService(); const fileService = new class extends mock() { - onDidRunOperation = Event.None; - onDidChangeFileSystemProviderCapabilities = Event.None; - onDidChangeFileSystemProviderRegistrations = Event.None; + override onDidRunOperation = Event.None; + override onDidChangeFileSystemProviderCapabilities = Event.None; + override onDidChangeFileSystemProviderRegistrations = Event.None; }; new MainThreadDocumentsAndEditors( SingleProxyRPCProtocol(new class extends mock() { - $acceptDocumentsAndEditorsDelta(delta: IDocumentsAndEditorsDelta) { deltas.push(delta); } + override $acceptDocumentsAndEditorsDelta(delta: IDocumentsAndEditorsDelta) { deltas.push(delta); } }), modelService, textFileService, @@ -87,9 +87,9 @@ suite('MainThreadDocumentsAndEditors', () => { null!, new class extends mock() implements IPanelService { declare readonly _serviceBrand: undefined; - onDidPanelOpen = Event.None; - onDidPanelClose = Event.None; - getActivePanel() { + override onDidPanelOpen = Event.None; + override onDidPanelClose = Event.None; + override getActivePanel() { return undefined; } }, @@ -97,7 +97,7 @@ suite('MainThreadDocumentsAndEditors', () => { new TestWorkingCopyFileService(), new UriIdentityService(fileService), new class extends mock() { - readText() { + override readText() { return Promise.resolve('clipboard_contents'); } }, diff --git a/src/vs/workbench/test/browser/api/mainThreadEditors.test.ts b/src/vs/workbench/test/browser/api/mainThreadEditors.test.ts index bd8224ef67d20d..b72ea54d694e2d 100644 --- a/src/vs/workbench/test/browser/api/mainThreadEditors.test.ts +++ b/src/vs/workbench/test/browser/api/mainThreadEditors.test.ts @@ -100,44 +100,44 @@ suite('MainThreadEditors', () => { services.set(ILifecycleService, new TestLifecycleService()); services.set(IEditorGroupsService, new TestEditorGroupsService()); services.set(ITextFileService, new class extends mock() { - isDirty() { return false; } - files = { + override isDirty() { return false; } + override files = { onDidSave: Event.None, onDidRevert: Event.None, onDidChangeDirty: Event.None }; - create(operations: { resource: URI }[]) { + override create(operations: { resource: URI }[]) { for (const o of operations) { createdResources.add(o.resource); } return Promise.resolve(Object.create(null)); } - async getEncodedReadable(resource: URI, value?: string | ITextSnapshot): Promise { + async override getEncodedReadable(resource: URI, value?: string | ITextSnapshot): Promise { return undefined; } }); services.set(IWorkingCopyFileService, new class extends mock() { - onDidRunWorkingCopyFileOperation = Event.None; - createFolder(operations: ICreateOperation[]): any { + override onDidRunWorkingCopyFileOperation = Event.None; + override createFolder(operations: ICreateOperation[]): any { this.create(operations); } - create(operations: ICreateFileOperation[]) { + override create(operations: ICreateFileOperation[]) { for (const operation of operations) { createdResources.add(operation.resource); } return Promise.resolve(Object.create(null)); } - move(operations: IMoveOperation[]) { + override move(operations: IMoveOperation[]) { const { source, target } = operations[0].file; movedResources.set(source, target); return Promise.resolve(Object.create(null)); } - copy(operations: ICopyOperation[]) { + override copy(operations: ICopyOperation[]) { const { source, target } = operations[0].file; copiedResources.set(source, target); return Promise.resolve(Object.create(null)); } - delete(operations: IDeleteOperation[]) { + override delete(operations: IDeleteOperation[]) { for (const operation of operations) { deletedResources.add(operation.resource); } @@ -145,9 +145,9 @@ suite('MainThreadEditors', () => { } }); services.set(ITextModelService, new class extends mock() { - createModelReference(resource: URI): Promise> { + override createModelReference(resource: URI): Promise> { const textEditorModel = new class extends mock() { - textEditorModel = modelService.getModel(resource)!; + override textEditorModel = modelService.getModel(resource)!; }; textEditorModel.isReadonly = () => false; return Promise.resolve(new ImmortalReference(textEditorModel)); @@ -158,25 +158,25 @@ suite('MainThreadEditors', () => { }); services.set(IPanelService, new class extends mock() implements IPanelService { declare readonly _serviceBrand: undefined; - onDidPanelOpen = Event.None; - onDidPanelClose = Event.None; - getActivePanel() { + override onDidPanelOpen = Event.None; + override onDidPanelClose = Event.None; + override getActivePanel() { return undefined; } }); services.set(IUriIdentityService, new class extends mock() { - get extUri() { return extUri; } + override get extUri() { return extUri; } }); const instaService = new InstantiationService(services); const rpcProtocol = new TestRPCProtocol(); rpcProtocol.set(ExtHostContext.ExtHostDocuments, new class extends mock() { - $acceptModelChanged(): void { + override $acceptModelChanged(): void { } }); rpcProtocol.set(ExtHostContext.ExtHostDocumentsAndEditors, new class extends mock() { - $acceptDocumentsAndEditorsDelta(): void { + override $acceptDocumentsAndEditorsDelta(): void { } }); diff --git a/src/vs/workbench/test/browser/api/mainThreadTreeViews.test.ts b/src/vs/workbench/test/browser/api/mainThreadTreeViews.test.ts index 6b8365ec3bf41e..71e5d22fd5e060 100644 --- a/src/vs/workbench/test/browser/api/mainThreadTreeViews.test.ts +++ b/src/vs/workbench/test/browser/api/mainThreadTreeViews.test.ts @@ -29,15 +29,15 @@ suite('MainThreadHostTreeView', function () { } class MockExtHostTreeViewsShape extends mock() { - async $getChildren(treeViewId: string, treeItemHandle?: string): Promise { + async override $getChildren(treeViewId: string, treeItemHandle?: string): Promise { return [{ handle: 'testItem1', collapsibleState: TreeItemCollapsibleState.Expanded, customProp: customValue }]; } - async $hasResolve(): Promise { + async override $hasResolve(): Promise { return false; } - $setVisible(): void { } + override $setVisible(): void { } } let container: ViewContainer; diff --git a/src/vs/workbench/test/browser/part.test.ts b/src/vs/workbench/test/browser/part.test.ts index 016bc8a65b9076..60925fea20e471 100644 --- a/src/vs/workbench/test/browser/part.test.ts +++ b/src/vs/workbench/test/browser/part.test.ts @@ -21,7 +21,7 @@ suite('Workbench parts', () => { minimumHeight: number = 50; maximumHeight: number = 50; - layout(width: number, height: number): void { + override layout(width: number, height: number): void { throw new Error('Method not implemented.'); } @@ -36,21 +36,21 @@ suite('Workbench parts', () => { super('myPart', { hasTitle: true }, new TestThemeService(), new TestStorageService(), new TestLayoutService()); } - createTitleArea(parent: HTMLElement): HTMLElement { + override createTitleArea(parent: HTMLElement): HTMLElement { assert.strictEqual(parent, this.expectedParent); return super.createTitleArea(parent)!; } - createContentArea(parent: HTMLElement): HTMLElement { + override createContentArea(parent: HTMLElement): HTMLElement { assert.strictEqual(parent, this.expectedParent); return super.createContentArea(parent)!; } - getMemento(scope: StorageScope, target: StorageTarget) { + override getMemento(scope: StorageScope, target: StorageTarget) { return super.getMemento(scope, target); } - saveState(): void { + override saveState(): void { return super.saveState(); } } @@ -61,7 +61,7 @@ suite('Workbench parts', () => { super('myPart2', { hasTitle: true }, new TestThemeService(), new TestStorageService(), new TestLayoutService()); } - createTitleArea(parent: HTMLElement): HTMLElement { + override createTitleArea(parent: HTMLElement): HTMLElement { const titleContainer = append(parent, $('div')); const titleLabel = append(titleContainer, $('span')); titleLabel.id = 'myPart.title'; @@ -70,7 +70,7 @@ suite('Workbench parts', () => { return titleContainer; } - createContentArea(parent: HTMLElement): HTMLElement { + override createContentArea(parent: HTMLElement): HTMLElement { const contentContainer = append(parent, $('div')); const contentSpan = append(contentContainer, $('span')); contentSpan.id = 'myPart.content'; @@ -86,11 +86,11 @@ suite('Workbench parts', () => { super('myPart2', { hasTitle: false }, new TestThemeService(), new TestStorageService(), new TestLayoutService()); } - createTitleArea(parent: HTMLElement): HTMLElement { + override createTitleArea(parent: HTMLElement): HTMLElement { return null!; } - createContentArea(parent: HTMLElement): HTMLElement { + override createContentArea(parent: HTMLElement): HTMLElement { const contentContainer = append(parent, $('div')); const contentSpan = append(contentContainer, $('span')); contentSpan.id = 'myPart.content'; diff --git a/src/vs/workbench/test/browser/parts/editor/breadcrumbModel.test.ts b/src/vs/workbench/test/browser/parts/editor/breadcrumbModel.test.ts index e9b6962a953eca..8e20b9b710c097 100644 --- a/src/vs/workbench/test/browser/parts/editor/breadcrumbModel.test.ts +++ b/src/vs/workbench/test/browser/parts/editor/breadcrumbModel.test.ts @@ -18,7 +18,7 @@ suite('Breadcrumb Model', function () { const workspaceService = new TestContextService(new Workspace('ffff', [new WorkspaceFolder({ uri: URI.parse('foo:/bar/baz/ws'), name: 'ws', index: 0 })])); const configService = new class extends TestConfigurationService { - getValue(...args: any[]) { + override getValue(...args: any[]) { if (args[0] === 'breadcrumbs.filePath') { return 'on'; } @@ -27,7 +27,7 @@ suite('Breadcrumb Model', function () { } return super.getValue(...args); } - updateValue() { + override updateValue() { return Promise.resolve(); } }; diff --git a/src/vs/workbench/test/browser/parts/editor/editorGroups.test.ts b/src/vs/workbench/test/browser/parts/editor/editorGroups.test.ts index 539711750409b9..5e2ae9b4a3e8d3 100644 --- a/src/vs/workbench/test/browser/parts/editor/editorGroups.test.ts +++ b/src/vs/workbench/test/browser/parts/editor/editorGroups.test.ts @@ -120,9 +120,9 @@ suite('Workbench editor groups', () => { super(); } getTypeId() { return 'testEditorInputForGroups'; } - async resolve(): Promise { return null!; } + async override resolve(): Promise { return null!; } - matches(other: TestEditorInput): boolean { + override matches(other: TestEditorInput): boolean { return other && this.id === other.id && other instanceof TestEditorInput; } @@ -143,9 +143,9 @@ suite('Workbench editor groups', () => { super(); } getTypeId() { return 'testEditorInputForGroups-nonSerializable'; } - async resolve(): Promise { return null; } + async override resolve(): Promise { return null; } - matches(other: NonSerializableTestEditorInput): boolean { + override matches(other: NonSerializableTestEditorInput): boolean { return other && this.id === other.id && other instanceof NonSerializableTestEditorInput; } } @@ -158,7 +158,7 @@ suite('Workbench editor groups', () => { super(); } getTypeId() { return 'testFileEditorInputForGroups'; } - async resolve(): Promise { return null; } + async override resolve(): Promise { return null; } setPreferredName(name: string): void { } setPreferredDescription(description: string): void { } setPreferredResource(resource: URI): void { } @@ -170,7 +170,7 @@ suite('Workbench editor groups', () => { setPreferredMode(mode: string) { } isResolved(): boolean { return false; } - matches(other: TestFileEditorInput): boolean { + override matches(other: TestFileEditorInput): boolean { return other && this.id === other.id && other instanceof TestFileEditorInput; } } diff --git a/src/vs/workbench/test/browser/parts/editor/editorInput.test.ts b/src/vs/workbench/test/browser/parts/editor/editorInput.test.ts index 73facb16edd301..3d144f2ea4ac29 100644 --- a/src/vs/workbench/test/browser/parts/editor/editorInput.test.ts +++ b/src/vs/workbench/test/browser/parts/editor/editorInput.test.ts @@ -14,7 +14,7 @@ suite('Workbench editor input', () => { readonly resource = undefined; getTypeId(): string { return ''; } - resolve(): any { return null; } + override resolve(): any { return null; } } test('EditorInput', () => { diff --git a/src/vs/workbench/test/browser/parts/editor/editorModel.test.ts b/src/vs/workbench/test/browser/parts/editor/editorModel.test.ts index a739759a32d32c..a478426e96cfd3 100644 --- a/src/vs/workbench/test/browser/parts/editor/editorModel.test.ts +++ b/src/vs/workbench/test/browser/parts/editor/editorModel.test.ts @@ -31,11 +31,11 @@ suite('Workbench editor model', () => { class MyEditorModel extends EditorModel { } class MyTextEditorModel extends BaseTextEditorModel { - createTextEditorModel(value: ITextBufferFactory, resource?: URI, preferredMode?: string) { + override createTextEditorModel(value: ITextBufferFactory, resource?: URI, preferredMode?: string) { return super.createTextEditorModel(value, resource, preferredMode); } - isReadonly(): boolean { + override isReadonly(): boolean { return false; } } diff --git a/src/vs/workbench/test/browser/parts/editor/editorPane.test.ts b/src/vs/workbench/test/browser/parts/editor/editorPane.test.ts index 5c74a02332de00..1887aea99eeeb2 100644 --- a/src/vs/workbench/test/browser/parts/editor/editorPane.test.ts +++ b/src/vs/workbench/test/browser/parts/editor/editorPane.test.ts @@ -33,7 +33,7 @@ class TestEditor extends EditorPane { super('TestEditor', NullTelemetryService, NullThemeService, new TestStorageService()); } - getId(): string { return 'testEditor'; } + override getId(): string { return 'testEditor'; } layout(): void { } createEditor(): any { } } @@ -44,7 +44,7 @@ export class OtherTestEditor extends EditorPane { super('testOtherEditor', NullTelemetryService, NullThemeService, new TestStorageService()); } - getId(): string { return 'testOtherEditor'; } + override getId(): string { return 'testOtherEditor'; } layout(): void { } createEditor(): any { } @@ -69,7 +69,7 @@ class TestInput extends EditorInput { readonly resource = undefined; - getPreferredEditorId(ids: string[]) { + override getPreferredEditorId(ids: string[]) { return ids[1]; } @@ -77,7 +77,7 @@ class TestInput extends EditorInput { return ''; } - resolve(): any { + override resolve(): any { return null; } } @@ -90,7 +90,7 @@ class OtherTestInput extends EditorInput { return ''; } - resolve(): any { + override resolve(): any { return null; } } @@ -305,9 +305,9 @@ suite('Workbench EditorPane', () => { super(); } getTypeId() { return 'testEditorInputForMementoTest'; } - async resolve(): Promise { return null; } + async override resolve(): Promise { return null; } - matches(other: TestEditorInput): boolean { + override matches(other: TestEditorInput): boolean { return other && this.id === other.id && other instanceof TestEditorInput; } } @@ -343,9 +343,9 @@ suite('Workbench EditorPane', () => { super(); } getTypeId() { return 'testEditorInputForMementoTest'; } - async resolve(): Promise { return null; } + async override resolve(): Promise { return null; } - matches(other: TestEditorInput): boolean { + override matches(other: TestEditorInput): boolean { return other && this.id === other.id && other instanceof TestEditorInput; } } diff --git a/src/vs/workbench/test/browser/viewlet.test.ts b/src/vs/workbench/test/browser/viewlet.test.ts index d3b57ab52e973c..1ef7b53d07bdcb 100644 --- a/src/vs/workbench/test/browser/viewlet.test.ts +++ b/src/vs/workbench/test/browser/viewlet.test.ts @@ -16,7 +16,7 @@ suite('Viewlets', () => { super('id', null!, null!, null!, null!, null!, null!, null!, null!, null!); } - layout(dimension: any): void { + override layout(dimension: any): void { throw new Error('Method not implemented.'); } diff --git a/src/vs/workbench/test/browser/workbenchTestServices.ts b/src/vs/workbench/test/browser/workbenchTestServices.ts index 6bfa92cebd3163..72cbf19d1a06ed 100644 --- a/src/vs/workbench/test/browser/workbenchTestServices.ts +++ b/src/vs/workbench/test/browser/workbenchTestServices.ts @@ -148,14 +148,14 @@ Registry.as(EditorExtensions.EditorInputFactories). export class TestTextResourceEditor extends TextResourceEditor { - protected createEditorControl(parent: HTMLElement, configuration: any): IEditor { + protected override createEditorControl(parent: HTMLElement, configuration: any): IEditor { return this.instantiationService.createInstance(TestCodeEditor, parent, configuration, {}); } } export class TestTextFileEditor extends TextFileEditor { - protected createEditorControl(parent: HTMLElement, configuration: any): IEditor { + protected override createEditorControl(parent: HTMLElement, configuration: any): IEditor { return this.instantiationService.createInstance(TestCodeEditor, parent, configuration, {}); } } @@ -312,7 +312,7 @@ export class TestTextFileService extends BrowserTextFileService { this.readStreamError = error; } - async readStream(resource: URI, options?: IReadTextFileOptions): Promise { + async override readStream(resource: URI, options?: IReadTextFileOptions): Promise { if (this.readStreamError) { const error = this.readStreamError; this.readStreamError = undefined; @@ -337,7 +337,7 @@ export class TestTextFileService extends BrowserTextFileService { this.writeError = error; } - async write(resource: URI, value: string | ITextSnapshot, options?: IWriteTextFileOptions): Promise { + async override write(resource: URI, value: string | ITextSnapshot, options?: IWriteTextFileOptions): Promise { if (this.writeError) { const error = this.writeError; this.writeError = undefined; @@ -352,7 +352,7 @@ export class TestTextFileService extends BrowserTextFileService { export class TestBrowserTextFileServiceWithEncodingOverrides extends BrowserTextFileService { private _testEncoding: TestEncodingOracle | undefined; - get encoding(): TestEncodingOracle { + override get encoding(): TestEncodingOracle { if (!this._testEncoding) { this._testEncoding = this._register(this.instantiationService.createInstance(TestEncodingOracle)); } @@ -363,7 +363,7 @@ export class TestBrowserTextFileServiceWithEncodingOverrides extends BrowserText export class TestEncodingOracle extends EncodingOracle { - protected get encodingOverrides(): IEncodingOverride[] { + protected override get encodingOverrides(): IEncodingOverride[] { return [ { extension: 'utf16le', encoding: UTF16le }, { extension: 'utf16be', encoding: UTF16be }, @@ -371,7 +371,7 @@ export class TestEncodingOracle extends EncodingOracle { ]; } - protected set encodingOverrides(overrides: IEncodingOverride[]) { } + protected override set encodingOverrides(overrides: IEncodingOverride[]) { } } class TestEnvironmentServiceWithArgs extends BrowserWorkbenchEnvironmentService { @@ -970,7 +970,7 @@ export class TestBackupFileService extends InMemoryBackupFileService { export class InMemoryTestBackupFileService extends BrowserBackupFileService { - readonly fileService: IFileService; + override readonly fileService: IFileService; private backupResourceJoiners: Function[]; private discardBackupJoiners: Function[]; @@ -1000,7 +1000,7 @@ export class InMemoryTestBackupFileService extends BrowserBackupFileService { return new Promise(resolve => this.discardBackupJoiners.push(resolve)); } - async backup(resource: URI, content?: ITextSnapshot, versionId?: number, meta?: any, token?: CancellationToken): Promise { + async override backup(resource: URI, content?: ITextSnapshot, versionId?: number, meta?: any, token?: CancellationToken): Promise { await super.backup(resource, content, versionId, meta, token); while (this.backupResourceJoiners.length) { @@ -1008,7 +1008,7 @@ export class InMemoryTestBackupFileService extends BrowserBackupFileService { } } - async discardBackup(resource: URI): Promise { + async override discardBackup(resource: URI): Promise { await super.discardBackup(resource); this.discardedBackups.push(resource); @@ -1122,7 +1122,7 @@ export class RemoteFileSystemProvider implements IFileSystemProvider { } export class TestInMemoryFileSystemProvider extends InMemoryFileSystemProvider implements IFileSystemProviderWithFileReadStreamCapability { - readonly capabilities: FileSystemProviderCapabilities = + override readonly capabilities: FileSystemProviderCapabilities = FileSystemProviderCapabilities.FileReadWrite | FileSystemProviderCapabilities.PathCaseSensitive | FileSystemProviderCapabilities.FileReadStream; @@ -1188,14 +1188,14 @@ export class TestHostService implements IHostService { export class TestFilesConfigurationService extends FilesConfigurationService { - onFilesConfigurationChange(configuration: any): void { + override onFilesConfigurationChange(configuration: any): void { super.onFilesConfigurationChange(configuration); } } export class TestReadonlyTextFileEditorModel extends TextFileEditorModel { - isReadonly(): boolean { + override isReadonly(): boolean { return true; } } @@ -1210,7 +1210,7 @@ export class TestEditorInput extends EditorInput { return this.typeId; } - resolve(): Promise { + override resolve(): Promise { return Promise.resolve(null); } } @@ -1225,17 +1225,17 @@ export function registerTestEditor(id: string, inputs: SyncDescriptor { + async override setInput(input: EditorInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { super.setInput(input, options, context, token); await input.resolve(); } - getId(): string { return id; } + override getId(): string { return id; } layout(): void { } createEditor(): void { } - get scopedContextKeyService() { + override get scopedContextKeyService() { return this._scopedContextKeyService; } } @@ -1347,8 +1347,8 @@ export class TestFileEditorInput extends EditorInput implements IFileEditorInput } getTypeId() { return this.typeId; } - resolve(): Promise { return !this.fails ? Promise.resolve(null) : Promise.reject(new Error('fails')); } - matches(other: EditorInput): boolean { return !!(other?.resource && this.resource.toString() === other.resource.toString() && other instanceof TestFileEditorInput && other.getTypeId() === this.typeId); } + override resolve(): Promise { return !this.fails ? Promise.resolve(null) : Promise.reject(new Error('fails')); } + override matches(other: EditorInput): boolean { return !!(other?.resource && this.resource.toString() === other.resource.toString() && other instanceof TestFileEditorInput && other.getTypeId() === this.typeId); } setPreferredResource(resource: URI): void { } setEncoding(encoding: string) { } getEncoding() { return undefined; } @@ -1361,40 +1361,40 @@ export class TestFileEditorInput extends EditorInput implements IFileEditorInput setFailToOpen(): void { this.fails = true; } - async save(groupId: GroupIdentifier, options?: ISaveOptions): Promise { + async override save(groupId: GroupIdentifier, options?: ISaveOptions): Promise { this.gotSaved = true; this.dirty = false; return this; } - async saveAs(groupId: GroupIdentifier, options?: ISaveOptions): Promise { + async override saveAs(groupId: GroupIdentifier, options?: ISaveOptions): Promise { this.gotSavedAs = true; return this; } - async revert(group: GroupIdentifier, options?: IRevertOptions): Promise { + async override revert(group: GroupIdentifier, options?: IRevertOptions): Promise { this.gotReverted = true; this.gotSaved = false; this.gotSavedAs = false; this.dirty = false; } setDirty(): void { this.dirty = true; } - isDirty(): boolean { + override isDirty(): boolean { return this.dirty; } - isReadonly(): boolean { + override isReadonly(): boolean { return false; } isResolved(): boolean { return false; } - dispose(): void { + override dispose(): void { super.dispose(); this.gotDisposed = true; } movedEditor: IMoveResult | undefined = undefined; - rename(): IMoveResult | undefined { return this.movedEditor; } + override rename(): IMoveResult | undefined { return this.movedEditor; } } export class TestEditorPart extends EditorPart { - saveState(): void { + override saveState(): void { return super.saveState(); } @@ -1451,11 +1451,11 @@ export class TestPathService implements IPathService { export class TestTextFileEditorModelManager extends TextFileEditorModelManager { - add(resource: URI, model: TextFileEditorModel): void { + override add(resource: URI, model: TextFileEditorModel): void { return super.add(resource, model); } - remove(resource: URI): void { + override remove(resource: URI): void { return super.remove(resource); } } diff --git a/src/vs/workbench/test/common/workbenchTestServices.ts b/src/vs/workbench/test/common/workbenchTestServices.ts index 2ac7cf5c29d1a0..ee61ed1b479662 100644 --- a/src/vs/workbench/test/common/workbenchTestServices.ts +++ b/src/vs/workbench/test/common/workbenchTestServices.ts @@ -121,7 +121,7 @@ export class TestContextService implements IWorkspaceContextService { export class TestStorageService extends InMemoryStorageService { - emitWillSaveState(reason: WillSaveStateReason): void { + override emitWillSaveState(reason: WillSaveStateReason): void { super.emitWillSaveState(reason); } } diff --git a/src/vs/workbench/test/electron-browser/api/extHostSearch.test.ts b/src/vs/workbench/test/electron-browser/api/extHostSearch.test.ts index 8689fe654de0fa..f5b55c70febca2 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostSearch.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostSearch.test.ts @@ -148,7 +148,7 @@ suite('ExtHostSearch', () => { this._pfs = mockPFS as any; } - protected createTextSearchManager(query: ITextQuery, provider: vscode.TextSearchProvider): TextSearchManager { + protected override createTextSearchManager(query: ITextQuery, provider: vscode.TextSearchProvider): TextSearchManager { return new NativeTextSearchManager(query, provider, this._pfs); } }; diff --git a/src/vs/workbench/test/electron-browser/workbenchTestServices.ts b/src/vs/workbench/test/electron-browser/workbenchTestServices.ts index a4c250cc91d3ea..0e25f0a7b8a94c 100644 --- a/src/vs/workbench/test/electron-browser/workbenchTestServices.ts +++ b/src/vs/workbench/test/electron-browser/workbenchTestServices.ts @@ -117,7 +117,7 @@ export class TestTextFileService extends NativeTextFileService { this.resolveTextContentError = error; } - async readStream(resource: URI, options?: IReadTextFileOptions): Promise { + async override readStream(resource: URI, options?: IReadTextFileOptions): Promise { if (this.resolveTextContentError) { const error = this.resolveTextContentError; this.resolveTextContentError = null; @@ -142,7 +142,7 @@ export class TestTextFileService extends NativeTextFileService { export class TestNativeTextFileServiceWithEncodingOverrides extends NativeTextFileService { private _testEncoding: TestEncodingOracle | undefined; - get encoding(): TestEncodingOracle { + override get encoding(): TestEncodingOracle { if (!this._testEncoding) { this._testEncoding = this._register(this.instantiationService.createInstance(TestEncodingOracle)); }