mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-29 17:23:25 -05:00
Merge vscode source through 1.62 release (#19981)
* Build breaks 1 * Build breaks * Build breaks * Build breaks * More build breaks * Build breaks (#2512) * Runtime breaks * Build breaks * Fix dialog location break * Update typescript * Fix ASAR break issue * Unit test breaks * Update distro * Fix breaks in ADO builds (#2513) * Bump to node 16 * Fix hygiene errors * Bump distro * Remove reference to node type * Delete vscode specific extension * Bump to node 16 in CI yaml * Skip integration tests in CI builds (while fixing) * yarn.lock update * Bump moment dependency in remote yarn * Fix drop-down chevron style * Bump to node 16 * Remove playwrite from ci.yaml * Skip building build scripts in hygine check
This commit is contained in:
@@ -7,16 +7,16 @@ import { URI } from 'vs/base/common/uri';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { IContentLoader } from 'sql/workbench/services/notebook/browser/models/modelInterfaces';
|
||||
import { IStandardKernelWithProvider } from 'sql/workbench/services/notebook/browser/models/notebookUtils';
|
||||
import { IEditorInput } from 'vs/workbench/common/editor';
|
||||
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
|
||||
|
||||
export interface INotebookInput extends IEditorInput {
|
||||
export abstract class INotebookInput extends EditorInput {
|
||||
defaultKernel?: azdata.nb.IKernelSpec;
|
||||
connectionProfile?: azdata.IConnectionProfile;
|
||||
setNotebookContents(contents: azdata.nb.INotebookContents): void;
|
||||
isDirty(): boolean;
|
||||
setDirty(boolean);
|
||||
setNotebookContents(contents: azdata.nb.INotebookContents): void { }
|
||||
//isDirty(): boolean { return false; }
|
||||
setDirty(boolean) { }
|
||||
readonly notebookUri: URI;
|
||||
updateModel(): Promise<void>;
|
||||
updateModel(): Promise<void> { return undefined; }
|
||||
readonly editorOpenedTimestamp: number;
|
||||
readonly layoutChanged: Event<void>;
|
||||
readonly contentLoader: IContentLoader;
|
||||
|
||||
@@ -17,10 +17,12 @@ import { NotebookChangeType, CellType } from 'sql/workbench/services/notebook/co
|
||||
import { IBootstrapParams } from 'sql/workbench/services/bootstrap/common/bootstrapParams';
|
||||
import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor';
|
||||
import { Range } from 'vs/editor/common/core/range';
|
||||
import { IEditorInput, IEditorPane } from 'vs/workbench/common/editor';
|
||||
import { IEditorPane } from 'vs/workbench/common/editor';
|
||||
import { INotebookInput } from 'sql/workbench/services/notebook/browser/interface';
|
||||
import { INotebookShowOptions } from 'sql/workbench/api/common/sqlExtHost.protocol';
|
||||
import { NotebookViewsExtension } from 'sql/workbench/services/notebook/browser/notebookViews/notebookViewsExtension';
|
||||
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
|
||||
import { ICodeEditorViewState } from 'vs/editor/common/editorCommon';
|
||||
|
||||
export const SERVICE_ID = 'sqlNotebookService';
|
||||
export const INotebookService = createDecorator<INotebookService>(SERVICE_ID);
|
||||
@@ -139,7 +141,7 @@ export interface INotebookService {
|
||||
*/
|
||||
notifyCellExecutionStarted(): void;
|
||||
|
||||
createNotebookInputFromContents(providerId: string, contents?: azdata.nb.INotebookContents, resource?: UriComponents): Promise<IEditorInput | undefined>;
|
||||
createNotebookInputFromContents(providerId: string, contents?: azdata.nb.INotebookContents, resource?: UriComponents): Promise<EditorInput | undefined>;
|
||||
|
||||
openNotebook(resource: UriComponents, options: INotebookShowOptions): Promise<IEditorPane | undefined>;
|
||||
|
||||
@@ -196,7 +198,7 @@ export interface ICellEditorProvider {
|
||||
hasEditor(): boolean;
|
||||
isCellOutput: boolean;
|
||||
cellGuid(): string;
|
||||
getEditor(): BaseTextEditor;
|
||||
getEditor(): BaseTextEditor<ICodeEditorViewState>;
|
||||
deltaDecorations(newDecorationsRange: NotebookRange | NotebookRange[], oldDecorationsRange: NotebookRange | NotebookRange[]): void;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,12 +47,13 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
|
||||
import { IUntitledTextEditorService } from 'vs/workbench/services/untitled/common/untitledTextEditorService';
|
||||
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
|
||||
|
||||
import { IEditorInput, IEditorPane } from 'vs/workbench/common/editor';
|
||||
import { IEditorPane } from 'vs/workbench/common/editor';
|
||||
import { isINotebookInput } from 'sql/workbench/services/notebook/browser/interface';
|
||||
import { INotebookShowOptions } from 'sql/workbench/api/common/sqlExtHost.protocol';
|
||||
import { DEFAULT_NB_LANGUAGE_MODE, INTERACTIVE_LANGUAGE_MODE, INTERACTIVE_PROVIDER_ID, JUPYTER_PROVIDER_ID, NotebookLanguage } from 'sql/workbench/common/constants';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { SqlSerializationProvider } from 'sql/workbench/services/notebook/browser/sql/sqlSerializationProvider';
|
||||
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
|
||||
|
||||
const languageAssociationRegistry = Registry.as<ILanguageAssociationRegistry>(LanguageAssociationExtensions.LanguageAssociations);
|
||||
|
||||
@@ -185,7 +186,7 @@ export class NotebookService extends Disposable implements INotebookService {
|
||||
private _trustedCacheQueue: URI[] = [];
|
||||
private _unTrustedCacheQueue: URI[] = [];
|
||||
private _onCodeCellExecutionStart: Emitter<void> = new Emitter<void>();
|
||||
private _notebookInputsMap: Map<string, IEditorInput> = new Map();
|
||||
private _notebookInputsMap: Map<string, EditorInput> = new Map();
|
||||
|
||||
constructor(
|
||||
@ILifecycleService lifecycleService: ILifecycleService,
|
||||
@@ -260,7 +261,7 @@ export class NotebookService extends Disposable implements INotebookService {
|
||||
return uri;
|
||||
}
|
||||
|
||||
public async createNotebookInputFromContents(providerId: string, contents?: nb.INotebookContents, resource?: UriComponents): Promise<IEditorInput> {
|
||||
public async createNotebookInputFromContents(providerId: string, contents?: nb.INotebookContents, resource?: UriComponents): Promise<EditorInput> {
|
||||
let uri: URI;
|
||||
if (resource) {
|
||||
uri = URI.revive(resource);
|
||||
@@ -276,7 +277,7 @@ export class NotebookService extends Disposable implements INotebookService {
|
||||
return this.createNotebookInput(options, resource);
|
||||
}
|
||||
|
||||
private async createNotebookInput(options: INotebookShowOptions, resource?: UriComponents): Promise<IEditorInput | undefined> {
|
||||
private async createNotebookInput(options: INotebookShowOptions, resource?: UriComponents): Promise<EditorInput | undefined> {
|
||||
let uri: URI;
|
||||
if (resource) {
|
||||
uri = URI.revive(resource);
|
||||
@@ -288,7 +289,7 @@ export class NotebookService extends Disposable implements INotebookService {
|
||||
}
|
||||
let isUntitled: boolean = uri.scheme === Schemas.untitled;
|
||||
|
||||
let fileInput: IEditorInput;
|
||||
let fileInput: EditorInput;
|
||||
let languageMode = options.providerId === INTERACTIVE_PROVIDER_ID ? INTERACTIVE_LANGUAGE_MODE : DEFAULT_NB_LANGUAGE_MODE;
|
||||
let initialStringContents: string;
|
||||
if (options.initialContent) {
|
||||
@@ -307,7 +308,8 @@ export class NotebookService extends Disposable implements INotebookService {
|
||||
const model = this._untitledEditorService.create({ untitledResource: uri, mode: languageMode, initialValue: initialStringContents });
|
||||
fileInput = this._instantiationService.createInstance(UntitledTextEditorInput, model);
|
||||
} else {
|
||||
fileInput = this._editorService.createEditorInput({ forceFile: true, resource: uri, mode: languageMode });
|
||||
let input: any = { forceFile: true, resource: uri, mode: languageMode };
|
||||
fileInput = this._editorService.createEditorInput(input);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user