Merge from vscode e3c4990c67c40213af168300d1cfeb71d680f877 (#16569)

This commit is contained in:
Cory Rivera
2021-08-25 16:28:29 -07:00
committed by GitHub
parent ab1112bfb3
commit cb7b7da0a4
1752 changed files with 59525 additions and 33878 deletions

View File

@@ -57,7 +57,7 @@ import { INotebookManager } from 'sql/workbench/services/notebook/browser/notebo
import { NotebookExplorerViewletViewsContribution } from 'sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet';
import { Disposable, DisposableStore } from 'vs/base/common/lifecycle';
import { ContributedEditorPriority, IEditorOverrideService } from 'vs/workbench/services/editor/common/editorOverrideService';
import { FileEditorInput } from 'vs/workbench/contrib/files/common/editors/fileEditorInput';
import { FileEditorInput } from 'vs/workbench/contrib/files/browser/editors/fileEditorInput';
import { IModeService } from 'vs/editor/common/services/modeService';
import { ILogService } from 'vs/platform/log/common/log';
import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput';
@@ -717,7 +717,7 @@ export class NotebookEditorOverrideContribution extends Disposable implements IW
// Create the selector from the list of all the language extensions we want to associate with the
// notebook editor (filtering out any languages which didn't have any extensions registered yet)
const selector = `*{${langExtensions.join(',')}}`;
this._registeredOverrides.add(this._editorOverrideService.registerContributionPoint(
this._registeredOverrides.add(this._editorOverrideService.registerEditor(
selector,
{
id: NotebookEditor.ID,
@@ -745,7 +745,7 @@ export class NotebookEditorOverrideContribution extends Disposable implements IW
private tryConvertInput(input: IEditorInput, lang: string): IEditorInput | undefined {
const langAssociation = languageAssociationRegistry.getAssociationForLanguage(lang);
const notebookEditorInput = langAssociation?.syncConvertinput?.(input);
const notebookEditorInput = langAssociation?.syncConvertInput?.(input);
if (!notebookEditorInput) {
this._logService.warn('Unable to create input for overriding editor ', input instanceof DiffEditorInput ? `${input.primary.resource.toString()} <-> ${input.secondary.resource.toString()}` : input.resource.toString());
return undefined;