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

@@ -32,7 +32,7 @@ export interface IFindInputOptions extends IFindInputStyles {
}
export interface IFindInputStyles extends IInputBoxStyles {
inputActiveOptionBorder?: Color | null;
inputActiveOptionBorder?: Color;
}
const NLS_DEFAULT_LABEL = nls.localize('defaultLabel', "input");
@@ -42,26 +42,25 @@ export class FindInput extends Widget {
static readonly OPTION_CHANGE: string = 'optionChange';
private contextViewProvider: IContextViewProvider;
private width: number;
private placeholder: string;
private validation?: IInputValidator;
private label: string;
private fixFocusOnOptionClickEnabled = true;
private inputActiveOptionBorder?: Color | null;
private inputBackground?: Color | null;
private inputForeground?: Color | null;
private inputBorder?: Color | null;
private inputActiveOptionBorder?: Color;
private inputBackground?: Color;
private inputForeground?: Color;
private inputBorder?: Color;
private inputValidationInfoBorder?: Color | null;
private inputValidationInfoBackground?: Color | null;
private inputValidationInfoForeground?: Color | null;
private inputValidationWarningBorder?: Color | null;
private inputValidationWarningBackground?: Color | null;
private inputValidationWarningForeground?: Color | null;
private inputValidationErrorBorder?: Color | null;
private inputValidationErrorBackground?: Color | null;
private inputValidationErrorForeground?: Color | null;
private inputValidationInfoBorder?: Color;
private inputValidationInfoBackground?: Color;
private inputValidationInfoForeground?: Color;
private inputValidationWarningBorder?: Color;
private inputValidationWarningBackground?: Color;
private inputValidationWarningForeground?: Color;
private inputValidationErrorBorder?: Color;
private inputValidationErrorBackground?: Color;
private inputValidationErrorForeground?: Color;
private regex: RegexCheckbox;
private wholeWords: WholeWordsCheckbox;
@@ -93,7 +92,6 @@ export class FindInput extends Widget {
constructor(parent: HTMLElement | null, contextViewProvider: IContextViewProvider, private readonly _showOptionButtons: boolean, options: IFindInputOptions) {
super();
this.contextViewProvider = contextViewProvider;
this.width = options.width || 100;
this.placeholder = options.placeholder || '';
this.validation = options.validation;
this.label = options.label || NLS_DEFAULT_LABEL;
@@ -159,13 +157,6 @@ export class FindInput extends Widget {
this.focus();
}
public setWidth(newWidth: number): void {
this.width = newWidth;
this.domNode.style.width = this.width + 'px';
this.contextViewProvider.layout();
this.setInputWidth();
}
public getValue(): string {
return this.inputBox.value;
}
@@ -202,7 +193,7 @@ export class FindInput extends Widget {
protected applyStyles(): void {
if (this.domNode) {
const checkBoxStyles: ICheckboxStyles = {
inputActiveOptionBorder: this.inputActiveOptionBorder || undefined,
inputActiveOptionBorder: this.inputActiveOptionBorder,
};
this.regex.style(checkBoxStyles);
this.wholeWords.style(checkBoxStyles);
@@ -240,7 +231,6 @@ export class FindInput extends Widget {
public setCaseSensitive(value: boolean): void {
this.caseSensitive.checked = value;
this.setInputWidth();
}
public getWholeWords(): boolean {
@@ -249,7 +239,6 @@ export class FindInput extends Widget {
public setWholeWords(value: boolean): void {
this.wholeWords.checked = value;
this.setInputWidth();
}
public getRegex(): boolean {
@@ -258,7 +247,6 @@ export class FindInput extends Widget {
public setRegex(value: boolean): void {
this.regex.checked = value;
this.setInputWidth();
this.validate();
}
@@ -277,15 +265,8 @@ export class FindInput extends Widget {
dom.addClass(this.domNode, 'highlight-' + (this._lastHighlightFindOptions));
}
private setInputWidth(): void {
let w = this.width - this.caseSensitive.width() - this.wholeWords.width() - this.regex.width();
this.inputBox.width = w;
this.inputBox.layout();
}
private buildDomNode(appendCaseSensitiveLabel: string, appendWholeWordsLabel: string, appendRegexLabel: string, history: string[], flexibleHeight: boolean): void {
this.domNode = document.createElement('div');
this.domNode.style.width = this.width + 'px';
dom.addClass(this.domNode, 'monaco-findInput');
this.inputBox = this._register(new HistoryInputBox(this.domNode, this.contextViewProvider, {
@@ -313,14 +294,13 @@ export class FindInput extends Widget {
this.regex = this._register(new RegexCheckbox({
appendTitle: appendRegexLabel,
isChecked: false,
inputActiveOptionBorder: this.inputActiveOptionBorder || undefined
inputActiveOptionBorder: this.inputActiveOptionBorder
}));
this._register(this.regex.onChange(viaKeyboard => {
this._onDidOptionChange.fire(viaKeyboard);
if (!viaKeyboard && this.fixFocusOnOptionClickEnabled) {
this.inputBox.focus();
}
this.setInputWidth();
this.validate();
}));
this._register(this.regex.onKeyDown(e => {
@@ -330,34 +310,40 @@ export class FindInput extends Widget {
this.wholeWords = this._register(new WholeWordsCheckbox({
appendTitle: appendWholeWordsLabel,
isChecked: false,
inputActiveOptionBorder: this.inputActiveOptionBorder || undefined
inputActiveOptionBorder: this.inputActiveOptionBorder
}));
this._register(this.wholeWords.onChange(viaKeyboard => {
this._onDidOptionChange.fire(viaKeyboard);
if (!viaKeyboard && this.fixFocusOnOptionClickEnabled) {
this.inputBox.focus();
}
this.setInputWidth();
this.validate();
}));
this.caseSensitive = this._register(new CaseSensitiveCheckbox({
appendTitle: appendCaseSensitiveLabel,
isChecked: false,
inputActiveOptionBorder: this.inputActiveOptionBorder || undefined
inputActiveOptionBorder: this.inputActiveOptionBorder
}));
this._register(this.caseSensitive.onChange(viaKeyboard => {
this._onDidOptionChange.fire(viaKeyboard);
if (!viaKeyboard && this.fixFocusOnOptionClickEnabled) {
this.inputBox.focus();
}
this.setInputWidth();
this.validate();
}));
this._register(this.caseSensitive.onKeyDown(e => {
this._onCaseSensitiveKeyDown.fire(e);
}));
if (this._showOptionButtons) {
const paddingRight = (this.caseSensitive.width() + this.wholeWords.width() + this.regex.width()) + 'px';
this.inputBox.inputElement.style.paddingRight = paddingRight;
if (this.inputBox.mirrorElement) {
this.inputBox.mirrorElement.style.paddingRight = paddingRight;
}
}
// Arrow-Key support to navigate between options
let indexes = [this.caseSensitive.domNode, this.wholeWords.domNode, this.regex.domNode];
this.onkeydown(this.domNode, (event: IKeyboardEvent) => {
@@ -386,7 +372,6 @@ export class FindInput extends Widget {
}
});
this.setInputWidth();
let controls = document.createElement('div');
controls.className = 'controls';