Add a New File menu item for plain text files (#6240)

* Add a New File menu item for plain text files

* Correct handling of saved files

* Fix command palette text to avoid duplicate entry
This commit is contained in:
Karl Burtram
2019-07-02 13:29:47 -07:00
committed by GitHub
parent ecef90dc8b
commit 7b88800c62
3 changed files with 41 additions and 5 deletions

View File

@@ -36,8 +36,10 @@ export const notebookModeId = 'notebook';
* @param instantiationService The instantiation service to use to create the new input types
*/
export function convertEditorInput(input: EditorInput, options: IQueryEditorOptions, instantiationService: IInstantiationService): EditorInput {
let denyQueryEditor = options && options.denyQueryEditor;
if (input && !denyQueryEditor) {
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') {
//QueryInput
let uri: URI = getQueryEditorFileUri(input);
if (uri) {