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

@@ -73,6 +73,7 @@ class ModelData implements IDisposable {
interface IRawEditorConfig {
tabSize?: any;
indentSize?: any;
insertSpaces?: any;
detectIndentation?: any;
trimAutoWhitespace?: any;
@@ -90,9 +91,9 @@ const DEFAULT_EOL = (platform.isLinux || platform.isMacintosh) ? DefaultEndOfLin
export class ModelServiceImpl extends Disposable implements IModelService {
public _serviceBrand: any;
private _configurationService: IConfigurationService;
private _configurationServiceSubscription: IDisposable;
private _resourcePropertiesService: ITextResourcePropertiesService;
private readonly _configurationService: IConfigurationService;
private readonly _configurationServiceSubscription: IDisposable;
private readonly _resourcePropertiesService: ITextResourcePropertiesService;
private readonly _onModelAdded: Emitter<ITextModel> = this._register(new Emitter<ITextModel>());
public readonly onModelAdded: Event<ITextModel> = this._onModelAdded.event;
@@ -110,7 +111,7 @@ export class ModelServiceImpl extends Disposable implements IModelService {
/**
* All the models known in the system.
*/
private _models: { [modelId: string]: ModelData; };
private readonly _models: { [modelId: string]: ModelData; };
constructor(
@IConfigurationService configurationService: IConfigurationService,
@@ -138,6 +139,17 @@ export class ModelServiceImpl extends Disposable implements IModelService {
}
}
let indentSize = tabSize;
if (config.editor && typeof config.editor.indentSize !== 'undefined' && config.editor.indentSize !== 'tabSize') {
let parsedIndentSize = parseInt(config.editor.indentSize, 10);
if (!isNaN(parsedIndentSize)) {
indentSize = parsedIndentSize;
}
if (indentSize < 1) {
indentSize = 1;
}
}
let insertSpaces = EDITOR_MODEL_DEFAULTS.insertSpaces;
if (config.editor && typeof config.editor.insertSpaces !== 'undefined') {
insertSpaces = (config.editor.insertSpaces === 'false' ? false : Boolean(config.editor.insertSpaces));
@@ -169,6 +181,7 @@ export class ModelServiceImpl extends Disposable implements IModelService {
return {
isForSimpleWidget: isForSimpleWidget,
tabSize: tabSize,
indentSize: indentSize,
insertSpaces: insertSpaces,
detectIndentation: detectIndentation,
defaultEOL: newDefaultEOL,
@@ -210,6 +223,7 @@ export class ModelServiceImpl extends Disposable implements IModelService {
&& (currentOptions.detectIndentation === newOptions.detectIndentation)
&& (currentOptions.insertSpaces === newOptions.insertSpaces)
&& (currentOptions.tabSize === newOptions.tabSize)
&& (currentOptions.indentSize === newOptions.indentSize)
&& (currentOptions.trimAutoWhitespace === newOptions.trimAutoWhitespace)
) {
// Same indent opts, no need to touch the model
@@ -225,6 +239,7 @@ export class ModelServiceImpl extends Disposable implements IModelService {
model.updateOptions({
insertSpaces: newOptions.insertSpaces,
tabSize: newOptions.tabSize,
indentSize: newOptions.indentSize,
trimAutoWhitespace: newOptions.trimAutoWhitespace
});
}