Alanren/sql on windows (#6785)

* download file

* add entry

* fix issues

* add 2019

* string updates

* make dialog self contained

* expose notebook input dialog

* refactoring

* add log and correct the url

* comments
This commit is contained in:
Alan Ren
2019-08-20 14:45:27 -07:00
committed by GitHub
parent c540e81108
commit 7bd8a6f2b1
10 changed files with 206 additions and 65 deletions

View File

@@ -4,13 +4,13 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as vscode from 'vscode';
import * as azdata from 'azdata';
import { NotebookInfo } from '../interfaces';
import { isString } from 'util';
import * as path from 'path';
import { isString } from 'util';
import * as vscode from 'vscode';
import * as nls from 'vscode-nls';
import { IPlatformService } from './platformService';
import { NotebookInfo } from '../interfaces';
const localize = nls.loadMessageBundle();
export interface INotebookService {
@@ -26,13 +26,16 @@ export class NotebookService implements INotebookService {
* @param notebook the path of the notebook
*/
launchNotebook(notebook: string | NotebookInfo): void {
const notebookRelativePath = this.getNotebook(notebook);
const notebookFullPath = path.join(this.extensionPath, notebookRelativePath);
if (notebookRelativePath && this.platformService.fileExists(notebookFullPath)) {
const notebookPath = this.getNotebook(notebook);
const notebookFullPath = path.join(this.extensionPath, notebookPath);
if (notebookPath && this.platformService.fileExists(notebookPath)) {
this.showNotebookAsUntitled(notebookPath);
}
else if (notebookPath && this.platformService.fileExists(notebookFullPath)) {
this.showNotebookAsUntitled(notebookFullPath);
}
else {
this.platformService.showErrorMessage(localize('resourceDeployment.notebookNotFound', 'The notebook {0} does not exist', notebookFullPath));
this.platformService.showErrorMessage(localize('resourceDeployment.notebookNotFound', "The notebook {0} does not exist", notebookPath));
}
}