chore(vscode): update to 1.55.2

This commit is contained in:
Akash Satheesan
2021-04-09 11:32:27 +05:30
1102 changed files with 39988 additions and 23544 deletions

View File

@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { EditorInput, Verbosity, GroupIdentifier, IEditorInput, ISaveOptions, IRevertOptions, IEditorInputWithPreferredResource } from 'vs/workbench/common/editor';
import { EditorInput, Verbosity, GroupIdentifier, IEditorInput, IRevertOptions, IEditorInputWithPreferredResource } from 'vs/workbench/common/editor';
import { URI } from 'vs/base/common/uri';
import { ITextFileService, ITextFileSaveOptions } from 'vs/workbench/services/textfile/common/textfiles';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
@@ -164,9 +164,9 @@ export abstract class AbstractTextResourceEditorInput extends EditorInput implem
}
isUntitled(): boolean {
// anyFile: is never untitled as it can be saved
// untitled: is untitled by definition
// anyOther: is untitled because it cannot be saved, as such we expect a "Save As" dialog
// 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);
}
@@ -206,7 +206,7 @@ export abstract class AbstractTextResourceEditorInput extends EditorInput implem
return this.doSave(options, true);
}
private async doSave(options: ISaveOptions | undefined, saveAs: boolean): Promise<IEditorInput | undefined> {
private async doSave(options: ITextFileSaveOptions | undefined, saveAs: boolean): Promise<IEditorInput | undefined> {
// Save / Save As
let target: URI | undefined;

View File

@@ -280,10 +280,12 @@ export interface INotificationViewItem {
readonly silent: boolean;
readonly message: INotificationMessage;
readonly source: string | undefined;
readonly sourceId: string | undefined;
readonly actions: INotificationActions | undefined;
readonly progress: INotificationViewItemProgress;
readonly expanded: boolean;
readonly visible: boolean;
readonly canCollapse: boolean;
readonly hasProgress: boolean;
@@ -502,7 +504,7 @@ export class NotificationViewItem extends Disposable implements INotificationVie
private _sticky: boolean | undefined,
private _silent: boolean | undefined,
private _message: INotificationMessage,
private _source: string | undefined,
private _source: string | { label: string, id: string } | undefined,
progress: INotificationProgressProperties | undefined,
actions?: INotificationActions
) {
@@ -599,13 +601,21 @@ export class NotificationViewItem extends Disposable implements INotificationVie
}
get source(): string | undefined {
return this._source;
return typeof this._source === 'string' ? this._source : (this._source ? this._source.label : undefined);
}
get sourceId(): string | undefined {
return (this._source && typeof this._source !== 'string' && 'id' in this._source) ? this._source.id : undefined;
}
get actions(): INotificationActions | undefined {
return this._actions;
}
get visible(): boolean {
return this._visible;
}
updateSeverity(severity: Severity): void {
this._severity = severity;
this._onDidChangeContent.fire({ kind: NotificationViewItemContentChangeKind.SEVERITY });

View File

@@ -15,7 +15,7 @@ import { getOrSet } from 'vs/base/common/map';
import { Registry } from 'vs/platform/registry/common/platform';
import { IKeybindings } from 'vs/platform/keybinding/common/keybindingsRegistry';
import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
import { flatten, mergeSort } from 'vs/base/common/arrays';
import { flatten } from 'vs/base/common/arrays';
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
import { SetMap } from 'vs/base/common/collections';
import { IProgressIndicator } from 'vs/platform/progress/common/progress';
@@ -381,6 +381,7 @@ export interface IViewsRegistry {
readonly onDidChangeViewWelcomeContent: Event<string>;
registerViewWelcomeContent(id: string, viewContent: IViewContentDescriptor): IDisposable;
registerViewWelcomeContent2<TKey>(id: string, viewContentMap: Map<TKey, IViewContentDescriptor>): Map<TKey, IDisposable>;
getViewWelcomeContent(id: string): IViewContentDescriptor[];
}
@@ -473,11 +474,26 @@ class ViewsRegistry extends Disposable implements IViewsRegistry {
});
}
registerViewWelcomeContent2<TKey>(id: string, viewContentMap: Map<TKey, IViewContentDescriptor>): Map<TKey, IDisposable> {
const disposables = new Map<TKey, IDisposable>();
for (const [key, content] of viewContentMap) {
this._viewWelcomeContents.add(id, content);
disposables.set(key, toDisposable(() => {
this._viewWelcomeContents.delete(id, content);
this._onDidChangeViewWelcomeContent.fire(id);
}));
}
this._onDidChangeViewWelcomeContent.fire(id);
return disposables;
}
getViewWelcomeContent(id: string): IViewContentDescriptor[] {
const result: IViewContentDescriptor[] = [];
this._viewWelcomeContents.forEach(id, descriptor => result.push(descriptor));
mergeSort(result, compareViewContentDescriptors);
return result;
return result.sort(compareViewContentDescriptors);
}
private addViews(viewDescriptors: IViewDescriptor[], viewContainer: ViewContainer): void {