@@ -12,7 +12,7 @@ import { DocumentId } from '../../../../platform/inlineEdits/common/dataTypes/do
12
12
import { LanguageId } from '../../../../platform/inlineEdits/common/dataTypes/languageId' ;
13
13
import { EditReason } from '../../../../platform/inlineEdits/common/editReason' ;
14
14
import { IObservableDocument , ObservableWorkspace , StringEditWithReason } from '../../../../platform/inlineEdits/common/observableWorkspace' ;
15
- import { createAlternativeNotebookDocument , IAlternativeNotebookDocument , toAltDiagnostics , toAltNotebookCellChangeEdit , toAltNotebookChangeEdit } from '../../../../platform/notebook/common/alternativeNotebookTextDocument' ;
15
+ import { createAlternativeNotebookDocument , IAlternativeNotebookDocument , toAltNotebookCellChangeEdit , toAltNotebookChangeEdit } from '../../../../platform/notebook/common/alternativeNotebookTextDocument' ;
16
16
import { getDefaultLanguage } from '../../../../platform/notebook/common/helpers' ;
17
17
import { IExperimentationService } from '../../../../platform/telemetry/common/nullExperimentationService' ;
18
18
import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry' ;
@@ -366,7 +366,7 @@ export class VSCodeWorkspace extends ObservableWorkspace implements IDisposable
366
366
}
367
367
368
368
369
- export interface IBaseVSCodeObservableDocument extends IObservableDocument {
369
+ export interface IVSCodeObservableDocument extends IObservableDocument {
370
370
/**
371
371
* Converts the OffsetRange of the Observable document to a range within the provided Text document.
372
372
* If this is a Text Document, performs a simple OffsetRange to Range translation.
@@ -410,7 +410,7 @@ export interface IBaseVSCodeObservableDocument extends IObservableDocument {
410
410
getCodeActions ( range : OffsetRange , itemResolveCount : number , token : CancellationToken ) : Promise < CodeActionData [ ] | undefined > ;
411
411
}
412
412
413
- export interface IVSCodeObservableTextDocument extends IObservableDocument , IBaseVSCodeObservableDocument {
413
+ export interface IVSCodeObservableTextDocument extends IObservableDocument , IVSCodeObservableDocument {
414
414
kind : 'textDocument' ;
415
415
readonly textDocument : TextDocument ;
416
416
}
@@ -518,14 +518,7 @@ class VSCodeObservableTextDocument extends AbstractVSCodeObservableDocument impl
518
518
}
519
519
}
520
520
521
- export interface IVSCodeObservableNotebookDocument extends IObservableDocument , IBaseVSCodeObservableDocument {
522
- kind : 'notebookDocument' ;
523
- readonly notebook : NotebookDocument ;
524
- /** @deprecated Do not use this. Use diagnostics property instead. */
525
- projectDiagnostics ( cell : TextDocument , diagnostics : readonly Diagnostic [ ] ) : Diagnostic [ ] ;
526
- }
527
-
528
- class VSCodeObservableNotebookDocument extends AbstractVSCodeObservableDocument implements IVSCodeObservableNotebookDocument {
521
+ class VSCodeObservableNotebookDocument extends AbstractVSCodeObservableDocument implements IVSCodeObservableDocument {
529
522
/** @deprecated Do not use this */
530
523
public kind : 'notebookDocument' = 'notebookDocument' ;
531
524
@@ -582,13 +575,6 @@ class VSCodeObservableNotebookDocument extends AbstractVSCodeObservableDocument
582
575
const offsetRanges = this . altNotebook . toAltOffsetRange ( cell , [ range ] ) ;
583
576
return offsetRanges . length ? offsetRanges [ 0 ] : undefined ;
584
577
}
585
- projectDiagnostics ( textDocument : TextDocument , diagnostics : readonly Diagnostic [ ] ) : Diagnostic [ ] {
586
- const cell = this . altNotebook . getCell ( textDocument ) ;
587
- if ( ! cell ) {
588
- return [ ] ;
589
- }
590
- return toAltDiagnostics ( this . altNotebook , cell , diagnostics ) ;
591
- }
592
578
toRange ( textDocument : TextDocument , range : Range ) : Range | undefined {
593
579
const cell = this . altNotebook . getCell ( textDocument ) ;
594
580
if ( ! cell ) {
@@ -623,8 +609,6 @@ class VSCodeObservableNotebookDocument extends AbstractVSCodeObservableDocument
623
609
}
624
610
}
625
611
626
- export type IVSCodeObservableDocument = IVSCodeObservableTextDocument | IVSCodeObservableNotebookDocument ;
627
-
628
612
function getTextDocuments ( excludeNotebookCells : boolean ) : IObservable < readonly TextDocument [ ] > {
629
613
return observableFromEvent ( undefined , e => {
630
614
const d1 = workspace . onDidOpenTextDocument ( e ) ;
0 commit comments