mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 11:01:37 -05:00
- Notebook editors have their own mode
This commit is contained in:
committed by
Charles Gagnon
parent
73bb5501bd
commit
f3b12dd5ac
@@ -39,9 +39,11 @@ export function convertEditorInput(input: EditorInput, options: IQueryEditorOpti
|
||||
let denyQueryEditor: boolean = options && options.denyQueryEditor;
|
||||
let untitledEditorInput: UntitledEditorInput = input as UntitledEditorInput;
|
||||
let mode: string = (untitledEditorInput && untitledEditorInput.getMode) ? untitledEditorInput.getMode() : 'sql';
|
||||
if (input && !denyQueryEditor && mode === 'sql') {
|
||||
if (input && !denyQueryEditor) {
|
||||
let uri: URI;
|
||||
if (mode === 'sql') {
|
||||
//QueryInput
|
||||
let uri: URI = getQueryEditorFileUri(input);
|
||||
uri = getQueryEditorFileUri(input);
|
||||
if (uri) {
|
||||
const queryResultsInput: QueryResultsInput = instantiationService.createInstance(QueryResultsInput, uri.toString());
|
||||
let queryInput: QueryInput = instantiationService.createInstance(QueryInput, '', input, queryResultsInput, undefined);
|
||||
@@ -55,6 +57,7 @@ export function convertEditorInput(input: EditorInput, options: IQueryEditorOpti
|
||||
let queryPlanInput: QueryPlanInput = instantiationService.createInstance(QueryPlanInput, queryPlanXml, 'aaa', undefined);
|
||||
return queryPlanInput;
|
||||
}
|
||||
}
|
||||
|
||||
//Notebook
|
||||
uri = getNotebookEditorUri(input, instantiationService);
|
||||
|
||||
Reference in New Issue
Block a user