mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-26 17:23:15 -05:00
Merge from vscode merge-base (#22780)
* Revert "Revert "Merge from vscode merge-base (#22769)" (#22779)"
This reverts commit 47a1745180.
* Fix notebook download task
* Remove done call from extensions-ci
This commit is contained in:
@@ -10,7 +10,7 @@ import { AngularDisposable } from 'sql/base/browser/lifecycle';
|
||||
import { ICellEditorProvider, INotebookService, NotebookRange } from 'sql/workbench/services/notebook/browser/notebookService';
|
||||
import { MarkdownRenderOptions } from 'vs/base/browser/markdownRenderer';
|
||||
import { IMarkdownString } from 'vs/base/common/htmlContent';
|
||||
import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor';
|
||||
import { AbstractTextCodeEditor } from 'vs/workbench/browser/parts/editor/textCodeEditor';
|
||||
import { nb } from 'azdata';
|
||||
import { NotebookModel } from 'sql/workbench/services/notebook/browser/models/notebookModel';
|
||||
import { NotebookInput } from 'sql/workbench/contrib/notebook/browser/models/notebookInput';
|
||||
@@ -34,7 +34,7 @@ export abstract class CellView extends AngularDisposable implements OnDestroy, I
|
||||
|
||||
public abstract layout(): void;
|
||||
|
||||
public getEditor(): BaseTextEditor<ICodeEditorViewState> | undefined {
|
||||
public getEditor(): AbstractTextCodeEditor<ICodeEditorViewState> | undefined {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
@@ -803,18 +803,19 @@ export class NotebookEditorOverrideContribution extends Disposable implements IW
|
||||
priority: RegisteredEditorPriority.builtin
|
||||
},
|
||||
{},
|
||||
async (editorInput, group) => {
|
||||
const fileInput = await this._editorService.createEditorInput(editorInput) as FileEditorInput;
|
||||
// Try to convert the input, falling back to just a plain file input if we're unable to
|
||||
const newInput = this.convertInput(fileInput);
|
||||
return { editor: newInput, options: editorInput.options, group: group };
|
||||
},
|
||||
undefined,
|
||||
async (diffEditorInput, group) => {
|
||||
const diffEditorInputImpl = await this._editorService.createEditorInput(diffEditorInput) as DiffEditorInput;
|
||||
// Try to convert the input, falling back to the original input if we're unable to
|
||||
const newInput = this.convertInput(diffEditorInputImpl);
|
||||
return { editor: newInput, options: diffEditorInput.options, group: group };
|
||||
{
|
||||
createEditorInput: async (editorInput, group) => {
|
||||
const fileInput = await this._editorService.createEditorInput(editorInput) as FileEditorInput;
|
||||
// Try to convert the input, falling back to just a plain file input if we're unable to
|
||||
const newInput = this.convertInput(fileInput);
|
||||
return { editor: newInput, options: editorInput.options, group: group };
|
||||
},
|
||||
createDiffEditorInput: async (diffEditorInput, group) => {
|
||||
const diffEditorInputImpl = await this._editorService.createEditorInput(diffEditorInput) as DiffEditorInput;
|
||||
// Try to convert the input, falling back to the original input if we're unable to
|
||||
const newInput = this.convertInput(diffEditorInputImpl);
|
||||
return { editor: newInput, options: diffEditorInput.options, group: group };
|
||||
}
|
||||
}
|
||||
));
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ import { IDisposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { IModelDecorationsChangeAccessor, IModelDeltaDecoration } from 'vs/editor/common/model';
|
||||
import { NotebookFindDecorations } from 'sql/workbench/contrib/notebook/browser/find/notebookFindDecorations';
|
||||
import { TimeoutTimer } from 'vs/base/common/async';
|
||||
import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor';
|
||||
import { AbstractTextCodeEditor } from 'vs/workbench/browser/parts/editor/textCodeEditor';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { IEditorOptions } from 'vs/platform/editor/common/editor';
|
||||
import { FindReplaceState, FindReplaceStateChangedEvent } from 'vs/editor/contrib/find/browser/findState';
|
||||
@@ -94,7 +94,7 @@ export class NotebookEditor extends EditorPane implements IFindNotebookControlle
|
||||
public getLastPosition(): NotebookRange {
|
||||
return this._previousMatch;
|
||||
}
|
||||
public getCellEditor(cellGuid: string): BaseTextEditor<ICodeEditorViewState> | undefined {
|
||||
public getCellEditor(cellGuid: string): AbstractTextCodeEditor<ICodeEditorViewState> | undefined {
|
||||
let editorImpl = this._notebookService.findNotebookEditor(this.notebookInput.notebookUri);
|
||||
if (editorImpl) {
|
||||
let cellEditorProvider = editorImpl.cellEditors.filter(c => c.cellGuid() === cellGuid)[0];
|
||||
|
||||
@@ -33,7 +33,7 @@ import { NotebookEditorStub } from 'sql/workbench/contrib/notebook/test/testComm
|
||||
import { Range } from 'vs/editor/common/core/range';
|
||||
import { IProductService } from 'vs/platform/product/common/productService';
|
||||
import { TestAccessibilityService } from 'vs/platform/accessibility/test/common/testAccessibilityService';
|
||||
import { LanguageId } from 'vs/editor/common/languages';
|
||||
import { LanguageId } from 'vs/editor/common/encodedTokenAttributes';
|
||||
|
||||
suite.skip('MarkdownTextTransformer', () => {
|
||||
let markdownTextTransformer: MarkdownTextTransformer;
|
||||
|
||||
@@ -730,7 +730,8 @@ function setupServices(arg: { workbenchThemeService?: WorkbenchThemeService, ins
|
||||
instantiationService.get(ITextResourceConfigurationService),
|
||||
instantiationService.get(IThemeService),
|
||||
instantiationService.get(IEditorGroupsService),
|
||||
instantiationService.get(IEditorService)
|
||||
instantiationService.get(IEditorService),
|
||||
instantiationService.get(IFileService)
|
||||
);
|
||||
const notebookEditorStub = new NotebookEditorStub({ cellGuid: cellTextEditorGuid, editor: queryTextEditor, model: new NotebookModelStub(), notebookParams: <INotebookParams>{ notebookUri: untitledNotebookInput.notebookUri } });
|
||||
notebookService.addNotebookEditor(notebookEditorStub);
|
||||
|
||||
@@ -11,7 +11,7 @@ import * as dom from 'vs/base/browser/dom';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils';
|
||||
import { TestThemeService } from 'vs/platform/theme/test/common/testThemeService';
|
||||
import { TestEditorGroupsService, TestEditorService, TestTextResourceConfigurationService } from 'vs/workbench/test/browser/workbenchTestServices';
|
||||
import { TestEditorGroupsService, TestEditorService, TestFileService, TestTextResourceConfigurationService } from 'vs/workbench/test/browser/workbenchTestServices';
|
||||
import { TestStorageService } from 'vs/workbench/test/common/workbenchTestServices';
|
||||
import { NotebookViewsExtension } from 'sql/workbench/services/notebook/browser/notebookViews/notebookViewsExtension';
|
||||
|
||||
@@ -48,7 +48,8 @@ class CellEditorProviderStub extends stubs.CellEditorProviderStub {
|
||||
new TestTextResourceConfigurationService(),
|
||||
new TestThemeService(),
|
||||
new TestEditorGroupsService(),
|
||||
new TestEditorService()
|
||||
new TestEditorService(),
|
||||
new TestFileService()
|
||||
);
|
||||
}
|
||||
if (this._editor) {
|
||||
|
||||
Reference in New Issue
Block a user