mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Vscode merge (#4582)
* Merge from vscode 37cb23d3dd4f9433d56d4ba5ea3203580719a0bd * fix issues with merges * bump node version in azpipe * replace license headers * remove duplicate launch task * fix build errors * fix build errors * fix tslint issues * working through package and linux build issues * more work * wip * fix packaged builds * working through linux build errors * wip * wip * wip * fix mac and linux file limits * iterate linux pipeline * disable editor typing * revert series to parallel * remove optimize vscode from linux * fix linting issues * revert testing change * add work round for new node * readd packaging for extensions * fix issue with angular not resolving decorator dependencies
This commit is contained in:
@@ -24,10 +24,11 @@ import { ILabelService } from 'vs/platform/label/common/label';
|
||||
import { getIconClasses, getConfiguredLangId } from 'vs/editor/common/services/getIconClasses';
|
||||
import { Disposable, dispose, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { withNullAsUndefined } from 'vs/base/common/types';
|
||||
|
||||
export interface IResourceLabelProps {
|
||||
resource?: uri;
|
||||
name: string;
|
||||
name?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
@@ -223,13 +224,13 @@ class ResourceLabelWidget extends IconLabel {
|
||||
private _onDidRender = this._register(new Emitter<void>());
|
||||
get onDidRender(): Event<void> { return this._onDidRender.event; }
|
||||
|
||||
private label: IResourceLabelProps;
|
||||
private options: IResourceLabelOptions;
|
||||
private computedIconClasses: string[];
|
||||
private lastKnownConfiguredLangId: string;
|
||||
private computedPathLabel: string;
|
||||
private label?: IResourceLabelProps;
|
||||
private options?: IResourceLabelOptions;
|
||||
private computedIconClasses?: string[];
|
||||
private lastKnownConfiguredLangId?: string;
|
||||
private computedPathLabel?: string;
|
||||
|
||||
private needsRedraw: Redraw;
|
||||
private needsRedraw?: Redraw;
|
||||
private isHidden: boolean = false;
|
||||
|
||||
constructor(
|
||||
@@ -303,7 +304,7 @@ class ResourceLabelWidget extends IconLabel {
|
||||
this.render(hasResourceChanged);
|
||||
}
|
||||
|
||||
private hasResourceChanged(label: IResourceLabelProps, options: IResourceLabelOptions): boolean {
|
||||
private hasResourceChanged(label: IResourceLabelProps, options?: IResourceLabelOptions): boolean {
|
||||
const newResource = label ? label.resource : undefined;
|
||||
const oldResource = this.label ? this.label.resource : undefined;
|
||||
|
||||
@@ -331,15 +332,15 @@ class ResourceLabelWidget extends IconLabel {
|
||||
|
||||
setEditor(editor: IEditorInput, options?: IResourceLabelOptions): void {
|
||||
this.setResource({
|
||||
resource: toResource(editor, { supportSideBySide: true }),
|
||||
name: editor.getName(),
|
||||
description: editor.getDescription()
|
||||
resource: withNullAsUndefined(toResource(editor, { supportSideBySide: true })),
|
||||
name: withNullAsUndefined(editor.getName()),
|
||||
description: withNullAsUndefined(editor.getDescription())
|
||||
}, options);
|
||||
}
|
||||
|
||||
setFile(resource: uri, options?: IFileLabelOptions): void {
|
||||
const hideLabel = options && options.hideLabel;
|
||||
let name: string;
|
||||
let name: string | undefined;
|
||||
if (!hideLabel) {
|
||||
if (options && options.fileKind === FileKind.ROOT_FOLDER) {
|
||||
const workspaceFolder = this.contextService.getWorkspaceFolder(resource);
|
||||
@@ -353,7 +354,7 @@ class ResourceLabelWidget extends IconLabel {
|
||||
}
|
||||
}
|
||||
|
||||
let description: string;
|
||||
let description: string | undefined;
|
||||
const hidePath = (options && options.hidePath) || (resource.scheme === Schemas.untitled && !this.untitledEditorService.hasAssociatedFilePath(resource));
|
||||
if (!hidePath) {
|
||||
description = this.labelService.getUriLabel(resources.dirname(resource), { relative: true });
|
||||
@@ -386,7 +387,7 @@ class ResourceLabelWidget extends IconLabel {
|
||||
}
|
||||
|
||||
if (this.label) {
|
||||
const configuredLangId = getConfiguredLangId(this.modelService, this.label.resource);
|
||||
const configuredLangId = this.label.resource ? withNullAsUndefined(getConfiguredLangId(this.modelService, this.modeService, this.label.resource)) : undefined;
|
||||
if (this.lastKnownConfiguredLangId !== configuredLangId) {
|
||||
clearIconCache = true;
|
||||
this.lastKnownConfiguredLangId = configuredLangId;
|
||||
@@ -428,7 +429,7 @@ class ResourceLabelWidget extends IconLabel {
|
||||
iconLabelOptions.extraClasses = this.computedIconClasses.slice(0);
|
||||
}
|
||||
if (this.options && this.options.extraClasses) {
|
||||
iconLabelOptions.extraClasses.push(...this.options.extraClasses);
|
||||
iconLabelOptions.extraClasses!.push(...this.options.extraClasses);
|
||||
}
|
||||
|
||||
if (this.options && this.options.fileDecorations && resource) {
|
||||
@@ -444,11 +445,11 @@ class ResourceLabelWidget extends IconLabel {
|
||||
}
|
||||
|
||||
if (this.options.fileDecorations.colors) {
|
||||
iconLabelOptions.extraClasses.push(deco.labelClassName);
|
||||
iconLabelOptions.extraClasses!.push(deco.labelClassName);
|
||||
}
|
||||
|
||||
if (this.options.fileDecorations.badges) {
|
||||
iconLabelOptions.extraClasses.push(deco.badgeClassName);
|
||||
iconLabelOptions.extraClasses!.push(deco.badgeClassName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user