File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 106106        {
107107          "command" : " resx-editor.deleteResource"  ,
108108          "when" : " false" 
109+         },
110+         {
111+           "command" : " resx-editor.addNewResource"  ,
112+           "when" : " activeCustomEditorId == 'resx-editor.editor'" 
109113        }
110114      ]
111115    },
151155    "@vscode/webview-ui-toolkit" : " ^1.2.2"  ,
152156    "resx" : " ^2.0.4" 
153157  }
154- }
158+ }
Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ export class ResxProvider implements vscode.CustomTextEditorProvider {
3232      localResourceRoots : [ vscode . Uri . joinPath ( this . context . extensionUri ,  'out' ) ] 
3333    } ; 
3434    webviewPanel . webview . html  =  this . _getWebviewContent ( webviewPanel . webview ) ; 
35+     webviewPanel . onDidChangeViewState ( e  =>  { 
36+       this . currentPanel  =  e . webviewPanel ; 
37+     } ) ; 
3538
3639    try  { 
3740      if  ( ! this . registered )  { 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments