mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-20 09:35:38 -05:00
Remove hasEditor from ICellEditorProvider (#22145)
This commit is contained in:
@@ -147,10 +147,6 @@ export class CodeComponent extends CellView implements OnInit, OnChanges {
|
||||
return this._editor;
|
||||
}
|
||||
|
||||
public override hasEditor(): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
public cellGuid(): string {
|
||||
return this.cellModel.cellGuid;
|
||||
}
|
||||
|
||||
@@ -38,10 +38,6 @@ export abstract class CellView extends AngularDisposable implements OnDestroy, I
|
||||
return undefined;
|
||||
}
|
||||
|
||||
public hasEditor(): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
public abstract cellGuid(): string;
|
||||
|
||||
public deltaDecorations(newDecorationsRange: NotebookRange | NotebookRange[], oldDecorationsRange: NotebookRange | NotebookRange[]): void {
|
||||
|
||||
@@ -375,10 +375,7 @@ export class MarkdownToolbarComponent extends AngularDisposable {
|
||||
if (!this._cellEditor?.getEditor()?.getControl()) {
|
||||
this._cellEditor = this._notebookEditor?.cellEditors?.find(e => e.cellGuid() === this.cellModel?.cellGuid);
|
||||
}
|
||||
if (this._cellEditor?.hasEditor) {
|
||||
return this._cellEditor.getEditor()?.getControl();
|
||||
}
|
||||
return undefined;
|
||||
return this._cellEditor.getEditor()?.getControl();
|
||||
}
|
||||
|
||||
public async getFileContentBase64(fileUri: URI): Promise<string> {
|
||||
|
||||
@@ -719,9 +719,6 @@ export class NotebookEditorStub implements INotebookEditor {
|
||||
|
||||
export class CellEditorProviderStub implements ICellEditorProvider {
|
||||
isCellOutput = false;
|
||||
hasEditor(): boolean {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
cellGuid(): string {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
|
||||
@@ -194,10 +194,9 @@ export interface INotebookSection {
|
||||
}
|
||||
|
||||
export interface ICellEditorProvider {
|
||||
hasEditor(): boolean;
|
||||
isCellOutput: boolean;
|
||||
cellGuid(): string;
|
||||
getEditor(): BaseTextEditor<ICodeEditorViewState>;
|
||||
getEditor(): BaseTextEditor<ICodeEditorViewState> | undefined;
|
||||
deltaDecorations(newDecorationsRange: NotebookRange | NotebookRange[], oldDecorationsRange: NotebookRange | NotebookRange[]): void;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user