Merge vscode source through 1.62 release (#19981)

* Build breaks 1

* Build breaks

* Build breaks

* Build breaks

* More build breaks

* Build breaks (#2512)

* Runtime breaks

* Build breaks

* Fix dialog location break

* Update typescript

* Fix ASAR break issue

* Unit test breaks

* Update distro

* Fix breaks in ADO builds (#2513)

* Bump to node 16

* Fix hygiene errors

* Bump distro

* Remove reference to node type

* Delete vscode specific extension

* Bump to node 16 in CI yaml

* Skip integration tests in CI builds (while fixing)

* yarn.lock update

* Bump moment dependency in remote yarn

* Fix drop-down chevron style

* Bump to node 16

* Remove playwrite from ci.yaml

* Skip building build scripts in hygine check
This commit is contained in:
Karl Burtram
2022-07-11 14:09:32 -07:00
committed by GitHub
parent fa0fcef303
commit 26455e9113
1876 changed files with 72050 additions and 37997 deletions

View File

@@ -6,7 +6,7 @@
import { Action } from 'vs/base/common/actions';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { FocusedViewContext, IViewDescriptorService, IViewsService, ViewContainerLocation } from 'vs/workbench/common/views';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
// --- Toggle View with Command
export abstract class ToggleViewAction extends Action {
@@ -29,9 +29,9 @@ export abstract class ToggleViewAction extends Action {
if (focusedViewId === this.viewId) {
if (this.viewDescriptorService.getViewLocationById(this.viewId) === ViewContainerLocation.Sidebar) {
this.layoutService.setSideBarHidden(true);
this.layoutService.setPartHidden(true, Parts.SIDEBAR_PART);
} else {
this.layoutService.setPanelHidden(true);
this.layoutService.setPartHidden(true, Parts.PANEL_PART);
}
} else {
this.viewsService.openView(this.viewId, true);

View File

@@ -127,11 +127,11 @@ class TableFilterListRenderer implements IListRenderer<DesignerIssue, DesignerIs
}
templateData.issueIcon.className = `issue-icon ${iconClass}`;
if (element.moreInfoLink) {
const linkElement = this._instantiationService.createInstance(Link, {
label: localize('designer.moreInfoLink', "More information"),
href: element.moreInfoLink
}, undefined);
templateData.issueMoreInfoLink.appendChild(linkElement.el);
this._instantiationService.createInstance(Link, templateData.issueMoreInfoLink,
{
label: localize('designer.moreInfoLink', "More information"),
href: element.moreInfoLink
}, undefined);
} else {
DOM.clearNode(templateData.issueMoreInfoLink);
}

View File

@@ -29,13 +29,14 @@ import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editor
import { CodeEditorWidget } from 'vs/editor/browser/widget/codeEditorWidget';
import { ITextEditorOptions } from 'vs/platform/editor/common/editor';
import { onUnexpectedError } from 'vs/base/common/errors';
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
class DesignerCodeEditor extends CodeEditorWidget {
}
let DesignerScriptEditorInstanceId = 0;
export class DesignerScriptEditor extends BaseTextEditor implements DesignerTextEditor {
export class DesignerScriptEditor extends BaseTextEditor<editorCommon.ICodeEditorViewState> implements DesignerTextEditor {
private _content: string;
private _contentChangeEventEmitter: Emitter<string> = new Emitter<string>();
readonly onDidContentChange: Event<string> = this._contentChangeEventEmitter.event;
@@ -81,7 +82,7 @@ export class DesignerScriptEditor extends BaseTextEditor implements DesignerText
options.folding = false;
options.renderWhitespace = 'all';
options.wordWrap = 'off';
options.renderIndentGuides = false;
options.guides = { indentation: false };
options.rulers = [];
options.glyphMargin = true;
}
@@ -119,4 +120,8 @@ export class DesignerScriptEditor extends BaseTextEditor implements DesignerText
this.layout(new DOM.Dimension(this._container.clientWidth, this._container.clientHeight));
}
}
protected tracksEditorViewState(input: EditorInput): boolean {
return input.typeId === DesignerScriptEditor.ID;
}
}

View File

@@ -3,7 +3,6 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { IEditorInput } from 'vs/workbench/common/editor';
import { IConnectionManagementService, IConnectableInput, INewConnectionParams } from 'sql/platform/connection/common/connectionManagement';
import { IQueryModelService } from 'sql/workbench/services/query/common/queryModel';
import { Event, Emitter } from 'vs/base/common/event';
@@ -115,7 +114,7 @@ export class EditDataInput extends EditorInput implements IConnectableInput {
public get objectType(): string { return this._objectType; }
public showResultsEditor(): void { this._showResultsEditor.fire(undefined); }
public override isDirty(): boolean { return false; }
public override save(): Promise<IEditorInput | undefined> { return Promise.resolve(undefined); }
public override save(): Promise<EditorInput | undefined> { return Promise.resolve(undefined); }
public override get typeId(): string { return EditDataInput.ID; }
public setBootstrappedTrue(): void { this._hasBootstrapped = true; }
public get resource(): URI { return this._uri; }

View File

@@ -9,7 +9,7 @@ import { EditorInput } from 'vs/workbench/common/editor/editorInput';
import { TableDesignerComponentInput } from 'sql/workbench/services/tableDesigner/browser/tableDesignerComponentInput';
import { TableDesignerProvider } from 'sql/workbench/services/tableDesigner/common/interface';
import * as azdata from 'azdata';
import { GroupIdentifier, IEditorInput, IRevertOptions, ISaveOptions } from 'vs/workbench/common/editor';
import { GroupIdentifier, IRevertOptions, ISaveOptions } from 'vs/workbench/common/editor';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { onUnexpectedError } from 'vs/base/common/errors';
import { Schemas } from 'sql/base/common/schemas';
@@ -91,7 +91,7 @@ export class TableDesignerInput extends EditorInput {
return this._designerComponentInput.pendingAction === 'publish';
}
override async save(group: GroupIdentifier, options?: ISaveOptions): Promise<IEditorInput | undefined> {
override async save(group: GroupIdentifier, options?: ISaveOptions): Promise<EditorInput | undefined> {
if (this._designerComponentInput.pendingAction) {
this._notificationService.warn(localize('tableDesigner.OperationInProgressWarning', "The operation cannot be performed while another operation is in progress."));
} else {

View File

@@ -29,8 +29,7 @@ import { IComponent, IComponentDescriptor, IModelStore } from 'sql/platform/dash
import { convertSizeToNumber } from 'sql/base/browser/dom';
import { onUnexpectedError } from 'vs/base/common/errors';
import { ILogService } from 'vs/platform/log/common/log';
import { ILabelService } from 'vs/platform/label/common/label';
import { IFileService } from 'vs/platform/files/common/files';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
@Component({
template: `
@@ -62,8 +61,7 @@ export default class DiffEditorComponent extends ComponentBase<azdata.DiffEditor
@Inject(IModeService) private _modeService: IModeService,
@Inject(ITextModelService) private _textModelService: ITextModelService,
@Inject(ILogService) logService: ILogService,
@Inject(ILabelService) private labelService: ILabelService,
@Inject(IFileService) private fileService: IFileService
@Inject(IEditorService) private _editorService: IEditorService,
) {
super(changeRef, el, logService);
}
@@ -98,8 +96,7 @@ export default class DiffEditorComponent extends ComponentBase<azdata.DiffEditor
let editorinput1 = this._instantiationService.createInstance(TextResourceEditorInput, uri1, 'source', undefined, undefined, undefined);
let editorinput2 = this._instantiationService.createInstance(TextResourceEditorInput, uri2, 'target', undefined, undefined, undefined);
this._editorInput = new DiffEditorInput('DiffEditor', undefined, editorinput1, editorinput2, true,
this.labelService, this.fileService);
this._editorInput = new DiffEditorInput('DiffEditor', undefined, editorinput1, editorinput2, true, this._editorService);
this._editor.setInput(this._editorInput, undefined, undefined, cancellationTokenSource.token);

View File

@@ -70,9 +70,12 @@ export default class EditorComponent extends ComponentBase<azdata.EditorProperti
this._editor.create(this._el.nativeElement);
this._editor.setVisible(true);
let uri = this.createUri();
this._editorInput = this.editorService.createEditorInput({ forceUntitled: true, resource: uri, mode: 'plaintext' }) as UntitledTextEditorInput;
await this._editor.setInput(this._editorInput, undefined, undefined);
const model = await this._editorInput.resolve();
this._editorModel = model.textEditorModel;
this.fireEvent({
eventType: ComponentEventType.onComponentCreated,

View File

@@ -52,7 +52,7 @@ export default class ListBoxComponent extends ComponentBase<azdata.ListBoxProper
const key = e.keyCode;
const ctrlOrCmd = e.ctrlKey || e.metaKey;
if (ctrlOrCmd && key === KeyCode.KEY_C) {
if (ctrlOrCmd && key === KeyCode.KeyC) {
let textToCopy = this._input.selectedOptions[0];
for (let i = 1; i < this._input.selectedOptions.length; i++) {
textToCopy = textToCopy + ', ' + this._input.selectedOptions[i];

View File

@@ -6,7 +6,6 @@
import * as azdata from 'azdata';
import { IEditorModel } from 'vs/platform/editor/common/editor';
import { IEditorInput } from 'vs/workbench/common/editor';
import * as DOM from 'vs/base/browser/dom';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
@@ -141,7 +140,7 @@ export class ModelViewInput extends EditorInput {
/**
* Saves the editor if it is dirty. Subclasses return a promise with a boolean indicating the success of the operation.
*/
override save(): Promise<IEditorInput | undefined> {
override save(): Promise<EditorInput | undefined> {
return this._model.save().then(saved => saved ? this : undefined);
}

View File

@@ -23,11 +23,12 @@ import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editor
import { UntitledTextEditorInput } from 'vs/workbench/services/untitled/common/untitledTextEditorInput';
import { CodeEditorWidget } from 'vs/editor/browser/widget/codeEditorWidget';
import { ITextEditorOptions } from 'vs/platform/editor/common/editor';
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
/**
* Extension of TextResourceEditor that is always readonly rather than only with non UntitledInputs
*/
export class QueryTextEditor extends BaseTextEditor {
export class QueryTextEditor extends BaseTextEditor<editorCommon.ICodeEditorViewState> {
public static ID = 'modelview.editors.textEditor';
private _dimension: DOM.Dimension;
@@ -63,7 +64,7 @@ export class QueryTextEditor extends BaseTextEditor {
options.inDiffEditor = false;
options.scrollBeyondLastLine = false;
options.folding = false;
options.renderIndentGuides = false;
options.guides = { indentation: false };
options.rulers = [];
options.glyphMargin = true;
options.minimap = {
@@ -205,4 +206,8 @@ export class QueryTextEditor extends BaseTextEditor {
let editorSettingsToApply = editorConfiguration;
this.getControl().updateOptions(editorSettingsToApply);
}
protected override tracksEditorViewState(input: EditorInput): boolean {
return input.typeId === QueryTextEditor.ID;
}
}

View File

@@ -182,10 +182,12 @@ export default class TextComponent extends TitledComponent<azdata.TextComponentP
// Now insert the link element
const link = links[i];
const linkElement = this._register(this.instantiationService.createInstance(Link, {
const linkElement = this._register(this.instantiationService.createInstance(Link,
(<HTMLElement>this.textContainer.nativeElement), {
label: link.text,
href: link.url
}, undefined));
if (link.accessibilityInformation) {
linkElement.el.setAttribute('aria-label', link.accessibilityInformation.label);
if (link.accessibilityInformation.role) {

View File

@@ -4,7 +4,6 @@
*--------------------------------------------------------------------------------------------*/
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
import { IEditorInput } from 'vs/workbench/common/editor';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { getCodeEditor } from 'vs/editor/browser/editorBrowser';
import { INotificationService } from 'vs/platform/notification/common/notification';
@@ -13,18 +12,19 @@ import { Registry } from 'vs/platform/registry/common/platform';
import { ILanguageAssociationRegistry, Extensions as LanguageAssociationExtensions } from 'sql/workbench/services/languageAssociation/common/languageAssociation';
import { IModeSupport } from 'vs/workbench/services/textfile/common/textfiles';
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
const languageAssociationRegistry = Registry.as<ILanguageAssociationRegistry>(LanguageAssociationExtensions.LanguageAssociations);
/**
* Handles setting a mode from the editor status and converts inputs if necessary
*/
export async function setMode(accessor: ServicesAccessor, modeSupport: IModeSupport, activeEditor: IEditorInput, language: string): Promise<void> {
export async function setMode(accessor: ServicesAccessor, modeSupport: IModeSupport, activeEditor: EditorInput, language: string): Promise<void> {
const editorService = accessor.get(IEditorService);
const activeWidget = getCodeEditor(editorService.activeTextEditorControl);
const activeControl = editorService.activeEditorPane;
const textModel = activeWidget.getModel();
const oldLanguage = textModel.getLanguageIdentifier().language;
const oldLanguage = textModel.getLanguageId();
if (language !== oldLanguage) {
const oldInputCreator = languageAssociationRegistry.getAssociationForLanguage(oldLanguage); // who knows how to handle the current language
const newInputCreator = languageAssociationRegistry.getAssociationForLanguage(language); // who knows how to handle the requested language
@@ -34,7 +34,7 @@ export async function setMode(accessor: ServicesAccessor, modeSupport: IModeSupp
return;
}
modeSupport.setMode(language);
let input: IEditorInput;
let input: EditorInput;
if (oldInputCreator) { // only transform the input if we have someone who knows how to deal with it (e.x QueryInput -> UntitledInput, etc)
input = oldInputCreator.createBase(activeEditor);
}