mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-02 09:35:40 -05:00
added openLocalizedook action that opens up the link to localized books. (#8025)
* initial commit * addressed the tslint floating promise errors * updated the command name with PM's feedback
This commit is contained in:
@@ -140,6 +140,11 @@
|
||||
"title": "%title.SQL19PreviewBook%",
|
||||
"category": "%books-preview-category%"
|
||||
},
|
||||
{
|
||||
"command": "books.command.openLocalizedBooks",
|
||||
"title": "%title.PreviewLocalizedBook%",
|
||||
"category": "%books-preview-category%"
|
||||
},
|
||||
{
|
||||
"command": "notebook.command.saveBook",
|
||||
"title": "%title.saveJupyterBook%",
|
||||
|
||||
@@ -32,5 +32,6 @@
|
||||
"title.saveJupyterBook": "Save Book",
|
||||
"title.searchJupyterBook": "Search Book",
|
||||
"title.SavedBooks": "Saved Books",
|
||||
"title.UnsavedBooks": "Unsaved Books"
|
||||
"title.UnsavedBooks": "Unsaved Books",
|
||||
"title.PreviewLocalizedBook": "Get localized SQL Server 2019 guide"
|
||||
}
|
||||
|
||||
@@ -44,17 +44,17 @@ export async function activate(extensionContext: vscode.ExtensionContext): Promi
|
||||
}
|
||||
newNotebook(connectionProfile);
|
||||
}));
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.open', () => {
|
||||
openNotebook();
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.open', async () => {
|
||||
await openNotebook();
|
||||
}));
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.runactivecell', () => {
|
||||
runActiveCell();
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.runactivecell', async () => {
|
||||
await runActiveCell();
|
||||
}));
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.runallcells', () => {
|
||||
runAllCells();
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.runallcells', async () => {
|
||||
await runAllCells();
|
||||
}));
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.clearactivecellresult', () => {
|
||||
clearActiveCellOutput();
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.clearactivecellresult', async () => {
|
||||
await clearActiveCellOutput();
|
||||
}));
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.addcell', async () => {
|
||||
let cellType: CellType;
|
||||
@@ -77,20 +77,24 @@ export async function activate(extensionContext: vscode.ExtensionContext): Promi
|
||||
return;
|
||||
}
|
||||
if (cellType) {
|
||||
addCell(cellType);
|
||||
await addCell(cellType);
|
||||
}
|
||||
}));
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.addcode', () => {
|
||||
addCell('code');
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.addcode', async () => {
|
||||
await addCell('code');
|
||||
}));
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.addtext', () => {
|
||||
addCell('markdown');
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.addtext', async () => {
|
||||
await addCell('markdown');
|
||||
}));
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.analyzeNotebook', (explorerContext: azdata.ObjectExplorerContext) => {
|
||||
analyzeNotebook(explorerContext);
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.analyzeNotebook', async (explorerContext: azdata.ObjectExplorerContext) => {
|
||||
await analyzeNotebook(explorerContext);
|
||||
}));
|
||||
extensionContext.subscriptions.push(vscode.window.registerUriHandler(new NotebookUriHandler()));
|
||||
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('books.command.openLocalizedBooks', async () => {
|
||||
const urlToOpen: string = 'https://aka.ms/localized-BDC-book';
|
||||
await vscode.commands.executeCommand('vscode.open', vscode.Uri.parse(urlToOpen));
|
||||
}));
|
||||
|
||||
let appContext = new AppContext(extensionContext, new ApiWrapper());
|
||||
controller = new JupyterController(appContext);
|
||||
|
||||
Reference in New Issue
Block a user