mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-05 01:25:38 -05:00
Fix intellisense for .NET Interactive SQL kernel (#19254)
This commit is contained in:
@@ -33,6 +33,8 @@ import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService
|
||||
import { IPathService } from 'vs/workbench/services/path/common/pathService';
|
||||
import { diffSets, diffMaps } from 'vs/base/common/collections';
|
||||
import { INotebookService } from 'sql/workbench/services/notebook/browser/notebookService';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { CELL_URI_PATH_PREFIX } from 'sql/workbench/common/constants';
|
||||
|
||||
|
||||
class TextEditorSnapshot {
|
||||
@@ -390,13 +392,20 @@ export class MainThreadDocumentsAndEditors {
|
||||
}
|
||||
|
||||
private _toModelAddData(model: ITextModel): IModelAddedData {
|
||||
// {{SQL CARBON EDIT}}
|
||||
// Check if this TextModel is part of a notebook cell
|
||||
let notebookUri: URI;
|
||||
if (model.uri.scheme === Schemas.untitled && model.uri.path.startsWith(CELL_URI_PATH_PREFIX)) {
|
||||
notebookUri = this._notebookService.getNotebookURIForCell(model.uri);
|
||||
}
|
||||
return {
|
||||
uri: model.uri,
|
||||
versionId: model.getVersionId(),
|
||||
lines: model.getLinesContent(),
|
||||
EOL: model.getEOL(),
|
||||
modeId: model.getLanguageIdentifier().language,
|
||||
isDirty: this._textFileService.isDirty(model.uri)
|
||||
isDirty: this._textFileService.isDirty(model.uri),
|
||||
notebookUri: notebookUri
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user