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:
Anthony Dresser
2019-03-19 17:44:35 -07:00
committed by GitHub
parent 833d197412
commit 87765e8673
1879 changed files with 54505 additions and 38058 deletions

View File

@@ -10,12 +10,12 @@ import { URI } from 'vs/base/common/uri';
import { IDisposable, Disposable } from 'vs/base/common/lifecycle';
import { IEditor as ICodeEditor, IEditorViewState, ScrollType, IDiffEditor } from 'vs/editor/common/editorCommon';
import { IEditorModel, IEditorOptions, ITextEditorOptions, IBaseResourceInput } from 'vs/platform/editor/common/editor';
import { IInstantiationService, IConstructorSignature0 } from 'vs/platform/instantiation/common/instantiation';
import { IInstantiationService, IConstructorSignature0, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
import { RawContextKey, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import { Registry } from 'vs/platform/registry/common/platform';
import { ITextModel } from 'vs/editor/common/model';
import { Schemas } from 'vs/base/common/network';
import { IEditorGroup } from 'vs/workbench/services/group/common/editorGroupsService';
import { IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsService';
import { ICompositeControl } from 'vs/workbench/common/composite';
import { ActionRunner, IAction } from 'vs/base/common/actions';
@@ -142,7 +142,7 @@ export interface IEditorControl extends ICompositeControl { }
export interface IFileInputFactory {
createFileInput(resource: URI, encoding: string, instantiationService: IInstantiationService): IFileEditorInput;
createFileInput(resource: URI, encoding: string | undefined, instantiationService: IInstantiationService): IFileEditorInput;
isFileInput(obj: any): obj is IFileEditorInput;
}
@@ -175,7 +175,10 @@ export interface IEditorInputFactoryRegistry {
*/
getEditorInputFactory(editorInputId: string): IEditorInputFactory;
setInstantiationService(service: IInstantiationService): void;
/**
* Starts the registry by providing the required services.
*/
start(accessor: ServicesAccessor): void;
}
export interface IEditorInputFactory {
@@ -184,13 +187,13 @@ export interface IEditorInputFactory {
* Returns a string representation of the provided editor input that contains enough information
* to deserialize back to the original editor input from the deserialize() method.
*/
serialize(editorInput: EditorInput): string;
serialize(editorInput: EditorInput): string | null;
/**
* Returns an editor input from the provided serialized form of the editor input. This form matches
* the value returned from the serialize() method.
*/
deserialize(instantiationService: IInstantiationService, serializedEditorInput: string): EditorInput;
deserialize(instantiationService: IInstantiationService, serializedEditorInput: string): EditorInput | null;
}
export interface IUntitledResourceInput extends IBaseResourceInput {
@@ -541,7 +544,12 @@ export class SideBySideEditorInput extends EditorInput {
static readonly ID: string = 'workbench.editorinputs.sidebysideEditorInput';
constructor(private name: string, private description: string, private _details: EditorInput, private _master: EditorInput) {
constructor(
private readonly name: string,
private readonly description: string | null,
private readonly _details: EditorInput,
private readonly _master: EditorInput
) {
super();
this.registerListeners();
@@ -573,6 +581,7 @@ export class SideBySideEditorInput extends EditorInput {
getTelemetryDescriptor(): object {
const descriptor = this.master.getTelemetryDescriptor();
return objects.assign(descriptor, super.getTelemetryDescriptor());
}
@@ -610,7 +619,7 @@ export class SideBySideEditorInput extends EditorInput {
return this.name;
}
getDescription(): string {
getDescription(): string | null {
return this.description;
}
@@ -649,7 +658,7 @@ export class EditorModel extends Disposable implements IEditorModel {
/**
* Causes this model to load returning a promise when loading is completed.
*/
load(): Promise<EditorModel> {
load(): Promise<IEditorModel> {
return Promise.resolve(this);
}
@@ -699,6 +708,7 @@ export class EditorOptions implements IEditorOptions {
options.pinned = settings.pinned;
options.index = settings.index;
options.inactive = settings.inactive;
options.ignoreError = settings.ignoreError;
return options;
}
@@ -742,6 +752,12 @@ export class EditorOptions implements IEditorOptions {
* in the background.
*/
inactive: boolean | undefined;
/**
* Will not show an error in case opening the editor fails and thus allows to show a custom error
* message as needed. By default, an error will be presented as notification if opening was not possible.
*/
ignoreError: boolean | undefined;
}
/**
@@ -756,9 +772,9 @@ export class TextEditorOptions extends EditorOptions {
private revealInCenterIfOutsideViewport: boolean;
private editorViewState: IEditorViewState | null;
static from(input?: IBaseResourceInput): TextEditorOptions | null {
static from(input?: IBaseResourceInput): TextEditorOptions | undefined {
if (!input || !input.options) {
return null;
return undefined;
}
return TextEditorOptions.create(input.options);
@@ -807,6 +823,10 @@ export class TextEditorOptions extends EditorOptions {
textEditorOptions.inactive = true;
}
if (options.ignoreError) {
textEditorOptions.ignoreError = true;
}
if (typeof options.index === 'number') {
textEditorOptions.index = options.index;
}
@@ -942,12 +962,12 @@ export type GroupIdentifier = number;
export interface IWorkbenchEditorConfiguration {
workbench: {
editor: IWorkbenchEditorPartConfiguration,
editor: IEditorPartConfiguration,
iconTheme: string;
};
}
export interface IWorkbenchEditorPartConfiguration {
interface IEditorPartConfiguration {
showTabs?: boolean;
highlightModifiedTabs?: boolean;
tabCloseButton?: 'left' | 'right' | 'off';
@@ -966,12 +986,16 @@ export interface IWorkbenchEditorPartConfiguration {
restoreViewState?: boolean;
}
export interface IEditorPartOptions extends IEditorPartConfiguration {
iconTheme?: string;
}
export interface IResourceOptions {
supportSideBySide?: boolean;
filter?: string | string[];
}
export function toResource(editor: IEditorInput, options?: IResourceOptions): URI | null {
export function toResource(editor: IEditorInput | null | undefined, options?: IResourceOptions): URI | null {
if (!editor) {
return null;
}
@@ -1032,17 +1056,17 @@ class EditorInputFactoryRegistry implements IEditorInputFactoryRegistry {
private instantiationService: IInstantiationService;
private fileInputFactory: IFileInputFactory;
private editorInputFactoryConstructors: { [editorInputId: string]: IConstructorSignature0<IEditorInputFactory> } = Object.create(null);
private editorInputFactoryInstances: { [editorInputId: string]: IEditorInputFactory } = Object.create(null);
private readonly editorInputFactoryInstances: { [editorInputId: string]: IEditorInputFactory } = Object.create(null);
setInstantiationService(service: IInstantiationService): void {
this.instantiationService = service;
start(accessor: ServicesAccessor): void {
this.instantiationService = accessor.get(IInstantiationService);
for (let key in this.editorInputFactoryConstructors) {
const element = this.editorInputFactoryConstructors[key];
this.createEditorInputFactory(key, element);
}
this.editorInputFactoryConstructors = {};
this.editorInputFactoryConstructors = Object.create(null);
}
private createEditorInputFactory(editorInputId: string, ctor: IConstructorSignature0<IEditorInputFactory>): void {