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

@@ -11,11 +11,11 @@ import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
import { Position } from 'vs/editor/common/core/position';
import { Range } from 'vs/editor/common/core/range';
import { Selection } from 'vs/editor/common/core/selection';
import { CodeAction, CodeActionProviderRegistry } from 'vs/editor/common/modes';
import { CodeActionProviderRegistry } from 'vs/editor/common/modes';
import { IContextKey, IContextKeyService, RawContextKey } from 'vs/platform/contextkey/common/contextkey';
import { IMarkerService } from 'vs/platform/markers/common/markers';
import { IProgressService } from 'vs/platform/progress/common/progress';
import { getCodeActions } from './codeAction';
import { getCodeActions, CodeActionSet } from './codeAction';
import { CodeActionTrigger } from './codeActionTrigger';
export const SUPPORTED_CODE_ACTIONS = new RawContextKey<string>('supportedCodeAction', '');
@@ -26,9 +26,9 @@ export class CodeActionOracle {
private readonly _autoTriggerTimer = new TimeoutTimer();
constructor(
private _editor: ICodeEditor,
private readonly _editor: ICodeEditor,
private readonly _markerService: IMarkerService,
private _signalChange: (newState: CodeActionsState.State) => void,
private readonly _signalChange: (newState: CodeActionsState.State) => void,
private readonly _delay: number = 250,
private readonly _progressService?: IProgressService,
) {
@@ -112,7 +112,7 @@ export class CodeActionOracle {
return selection ? selection : undefined;
}
private _createEventAndSignalChange(trigger: CodeActionTrigger, selection: Selection | undefined): Promise<CodeAction[] | undefined> {
private _createEventAndSignalChange(trigger: CodeActionTrigger, selection: Selection | undefined): Promise<CodeActionSet | undefined> {
if (!selection) {
// cancel
this._signalChange(CodeActionsState.Empty);
@@ -160,7 +160,7 @@ export namespace CodeActionsState {
public readonly trigger: CodeActionTrigger,
public readonly rangeOrSelection: Range | Selection,
public readonly position: Position,
public readonly actions: CancelablePromise<CodeAction[]>,
public readonly actions: CancelablePromise<CodeActionSet>,
) { }
}
@@ -169,18 +169,18 @@ export namespace CodeActionsState {
export class CodeActionModel {
private _editor: ICodeEditor;
private _markerService: IMarkerService;
private _codeActionOracle?: CodeActionOracle;
private _state: CodeActionsState.State = CodeActionsState.Empty;
private _onDidChangeState = new Emitter<CodeActionsState.State>();
private _disposables: IDisposable[] = [];
private readonly _supportedCodeActions: IContextKey<string>;
constructor(editor: ICodeEditor, markerService: IMarkerService, contextKeyService: IContextKeyService, private readonly _progressService: IProgressService) {
this._editor = editor;
this._markerService = markerService;
constructor(
private readonly _editor: ICodeEditor,
private readonly _markerService: IMarkerService,
contextKeyService: IContextKeyService,
private readonly _progressService: IProgressService
) {
this._supportedCodeActions = SUPPORTED_CODE_ACTIONS.bindTo(contextKeyService);
this._disposables.push(this._editor.onDidChangeModel(() => this._update()));
@@ -206,7 +206,7 @@ export class CodeActionModel {
}
if (this._state.type === CodeActionsState.Type.Triggered) {
// this._state.actions.cancel();
this._state.actions.cancel();
}
this.setState(CodeActionsState.Empty);
@@ -231,7 +231,7 @@ export class CodeActionModel {
}
}
public trigger(trigger: CodeActionTrigger): Promise<CodeAction[] | undefined> {
public trigger(trigger: CodeActionTrigger): Promise<CodeActionSet | undefined> {
if (this._codeActionOracle) {
return this._codeActionOracle.trigger(trigger);
}