Merge from vscode 9bc92b48d945144abb405b9e8df05e18accb9148

This commit is contained in:
ADS Merger
2020-02-19 03:11:35 +00:00
parent 98584d32a7
commit 1e308639e5
253 changed files with 6414 additions and 2296 deletions

View File

@@ -211,7 +211,7 @@ export abstract class NotebookInput extends EditorInput {
private _notebookFindModel: NotebookFindModel;
constructor(private _title: string,
private resource: URI,
private _resource: URI,
private _textInput: TextInput,
@ITextModelService private textModelService: ITextModelService,
@IInstantiationService private instantiationService: IInstantiationService,
@@ -219,7 +219,6 @@ export abstract class NotebookInput extends EditorInput {
@IExtensionService private extensionService: IExtensionService
) {
super();
this.resource = resource;
this._standardKernels = [];
this._providersLoaded = this.assignProviders();
this._notebookEditorOpenedTimestamp = Date.now();
@@ -299,8 +298,8 @@ export abstract class NotebookInput extends EditorInput {
private async setTrustForNewEditor(newInput: IEditorInput | undefined): Promise<void> {
let isTrusted = this._model.getNotebookModel().trustedMode;
if (isTrusted && newInput && newInput.getResource() !== this.getResource()) {
await this.notebookService.serializeNotebookStateChange(newInput.getResource(), NotebookChangeType.Saved, undefined, true);
if (isTrusted && newInput && newInput.resource !== this.resource) {
await this.notebookService.serializeNotebookStateChange(newInput.resource, NotebookChangeType.Saved, undefined, true);
}
}
@@ -337,8 +336,8 @@ export abstract class NotebookInput extends EditorInput {
public abstract getTypeId(): string;
getResource(): URI {
return this.resource;
get resource(): URI {
return this._resource;
}
public get untitledEditorModel(): IUntitledTextEditorModel {

View File

@@ -260,7 +260,7 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
let editors = this.editorService.visibleControls;
for (let editor of editors) {
if (editor && editor.input.getResource() === this._notebookParams.input.notebookUri) {
if (editor && editor.input.resource === this._notebookParams.input.notebookUri) {
await editor.group.closeEditor(this._notebookParams.input as NotebookInput, { preserveFocus: true }); // sketchy
break;
}