mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46: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%",
|
"title": "%title.SQL19PreviewBook%",
|
||||||
"category": "%books-preview-category%"
|
"category": "%books-preview-category%"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"command": "books.command.openLocalizedBooks",
|
||||||
|
"title": "%title.PreviewLocalizedBook%",
|
||||||
|
"category": "%books-preview-category%"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"command": "notebook.command.saveBook",
|
"command": "notebook.command.saveBook",
|
||||||
"title": "%title.saveJupyterBook%",
|
"title": "%title.saveJupyterBook%",
|
||||||
|
|||||||
@@ -32,5 +32,6 @@
|
|||||||
"title.saveJupyterBook": "Save Book",
|
"title.saveJupyterBook": "Save Book",
|
||||||
"title.searchJupyterBook": "Search Book",
|
"title.searchJupyterBook": "Search Book",
|
||||||
"title.SavedBooks": "Saved Books",
|
"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);
|
newNotebook(connectionProfile);
|
||||||
}));
|
}));
|
||||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.open', () => {
|
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.open', async () => {
|
||||||
openNotebook();
|
await openNotebook();
|
||||||
}));
|
}));
|
||||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.runactivecell', () => {
|
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.runactivecell', async () => {
|
||||||
runActiveCell();
|
await runActiveCell();
|
||||||
}));
|
}));
|
||||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.runallcells', () => {
|
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.runallcells', async () => {
|
||||||
runAllCells();
|
await runAllCells();
|
||||||
}));
|
}));
|
||||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.clearactivecellresult', () => {
|
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.clearactivecellresult', async () => {
|
||||||
clearActiveCellOutput();
|
await clearActiveCellOutput();
|
||||||
}));
|
}));
|
||||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.addcell', async () => {
|
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.addcell', async () => {
|
||||||
let cellType: CellType;
|
let cellType: CellType;
|
||||||
@@ -77,20 +77,24 @@ export async function activate(extensionContext: vscode.ExtensionContext): Promi
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (cellType) {
|
if (cellType) {
|
||||||
addCell(cellType);
|
await addCell(cellType);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.addcode', () => {
|
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.addcode', async () => {
|
||||||
addCell('code');
|
await addCell('code');
|
||||||
}));
|
}));
|
||||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.addtext', () => {
|
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.addtext', async () => {
|
||||||
addCell('markdown');
|
await addCell('markdown');
|
||||||
}));
|
}));
|
||||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.analyzeNotebook', (explorerContext: azdata.ObjectExplorerContext) => {
|
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.analyzeNotebook', async (explorerContext: azdata.ObjectExplorerContext) => {
|
||||||
analyzeNotebook(explorerContext);
|
await analyzeNotebook(explorerContext);
|
||||||
}));
|
}));
|
||||||
extensionContext.subscriptions.push(vscode.window.registerUriHandler(new NotebookUriHandler()));
|
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());
|
let appContext = new AppContext(extensionContext, new ApiWrapper());
|
||||||
controller = new JupyterController(appContext);
|
controller = new JupyterController(appContext);
|
||||||
|
|||||||
Reference in New Issue
Block a user