mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Check current notebook cell when refreshing intellisense cache (#21394)
This commit is contained in:
@@ -23,6 +23,7 @@ import { INotificationService, Severity } from 'vs/platform/notification/common/
|
|||||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||||
import { QueryEditorInput } from 'sql/workbench/common/editor/query/queryEditorInput';
|
import { QueryEditorInput } from 'sql/workbench/common/editor/query/queryEditorInput';
|
||||||
import { ClipboardData, IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
import { ClipboardData, IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||||
|
import { NotebookInput } from 'sql/workbench/contrib/notebook/browser/models/notebookInput';
|
||||||
|
|
||||||
const singleQuote = '\'';
|
const singleQuote = '\'';
|
||||||
|
|
||||||
@@ -300,6 +301,8 @@ export class RefreshIntellisenseKeyboardAction extends Action {
|
|||||||
const editor = this.editorService.activeEditor;
|
const editor = this.editorService.activeEditor;
|
||||||
if (editor instanceof QueryEditorInput) {
|
if (editor instanceof QueryEditorInput) {
|
||||||
this.connectionManagementService.rebuildIntelliSenseCache(editor.uri);
|
this.connectionManagementService.rebuildIntelliSenseCache(editor.uri);
|
||||||
|
} else if (editor instanceof NotebookInput && editor.notebookModel?.activeCell) {
|
||||||
|
this.connectionManagementService.rebuildIntelliSenseCache(editor.notebookModel.activeCell.cellUri.toString(true));
|
||||||
}
|
}
|
||||||
return Promise.resolve(null);
|
return Promise.resolve(null);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user