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