Fix New Notebook issues (#5958)

* Fix New Notebook issues
- Fix #5338 New Notebook menu item should be next to New Query
- Fix #4936 Add a shortcut to create a notebook in the document well

Created a built-in New Notebook command
that routes to the existing extension-based command.
This avoided a rearchitecture that was more complex that seemed worth it.
Per VSCode patterns, used a _ modifier for the existing command so it's "private"
This commit is contained in:
Kevin Cunnane
2019-06-10 16:38:07 -07:00
committed by GitHub
parent 730ad4b814
commit 14a6bf581c
9 changed files with 72 additions and 18 deletions

View File

@@ -31,6 +31,7 @@ import { IDimension } from 'vs/platform/layout/browser/layoutService';
// {{SQL CARBON EDIT}}
import { OpenDataExplorerViewletAction } from 'sql/workbench/parts/dataExplorer/browser/dataExplorer.contribution';
import { NewNotebookAction } from 'sql/workbench/parts/notebook/notebookActions';
const $ = dom.$;
@@ -42,14 +43,18 @@ interface WatermarkEntry {
// {{SQL CARBON EDIT}}
const showServers: WatermarkEntry = {
text: nls.localize('watermark.showServers', 'Show Servers'),
text: nls.localize('watermark.showServers', "Show Servers"),
id: OpenDataExplorerViewletAction.ID
};
const newSqlFile: WatermarkEntry = {
text: nls.localize('watermark.newSqlFile', 'New SQL File'),
text: nls.localize('watermark.newSqlFile', "New SQL File"),
id: GlobalNewUntitledFileAction.ID
};
const newNotebook: WatermarkEntry = {
text: nls.localize('watermark.newNotebook', "New Notebook"),
id: NewNotebookAction.ID
};
const showCommands: WatermarkEntry = {
text: nls.localize('watermark.showCommands', "Show All Commands"),
@@ -101,12 +106,14 @@ const startDebugging: WatermarkEntry = {
const noFolderEntries = [
showServers,
newSqlFile,
newNotebook,
findInFiles
];
const folderEntries = [
showServers,
newSqlFile,
newNotebook,
findInFiles
];
// {{SQL CARBON EDIT}} - End