Pārlūkot izejas kodu

Add extra command info

Dave Willmer 9 gadi atpakaļ
vecāks
revīzija
ed5a3bb8eb
2 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. 4 0
      src/fileopener/plugin.ts
  2. 2 0
      src/terminal/plugin.ts

+ 4 - 0
src/fileopener/plugin.ts

@@ -52,6 +52,8 @@ function resolve(container: Container): Promise<void> {
       // This requires an id and an instance of a command object.
       let newTextFileId = 'file-operations:new-text-file';
       let newTextFileCommand = new SimpleCommand({
+        category: 'File Operations',
+        text: 'New Text File',
         handler: () => {
           browser.newUntitled('file', '.txt').then(
             contents => opener.open(contents.path)
@@ -84,6 +86,8 @@ function resolve(container: Container): Promise<void> {
       // Add the command for a new notebook.
       let newNotebookId = 'file-operations:new-notebook';
       let newNotebookCommand = new SimpleCommand({
+        category: 'File Operations',
+        text: 'New Notebook',
         handler: () => {
           browser.newUntitled('notebook').then(
             contents => opener.open(contents.path)

+ 2 - 0
src/terminal/plugin.ts

@@ -33,6 +33,8 @@ function resolve(container: Container): Promise<void> {
 
       let newTerminalId = 'terminal:new';
       let newTerminalCommand = new SimpleCommand({
+        category: 'Terminal',
+        text: 'New Terminal',
         handler: () => {
           let term = new TerminalWidget();
           term.color = 'black';