File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { ICommandPalette, WidgetTracker } from '@jupyterlab/apputils';
22
33import {
44 ILabShell ,
5+ ILayoutRestorer ,
56 JupyterFrontEnd ,
67 JupyterFrontEndPlugin
78} from '@jupyterlab/application' ;
@@ -34,12 +35,13 @@ namespace CommandIDs {
3435 */
3536const variableinspector : JupyterFrontEndPlugin < IVariableInspectorManager > = {
3637 id : '@lckr/jupyterlab_variableinspector' ,
37- requires : [ ICommandPalette , ILabShell ] ,
38+ requires : [ ICommandPalette , ILayoutRestorer , ILabShell ] ,
3839 provides : IVariableInspectorManager ,
3940 autoStart : true ,
4041 activate : (
4142 app : JupyterFrontEnd ,
4243 palette : ICommandPalette ,
44+ restorer : ILayoutRestorer ,
4345 labShell : ILabShell
4446 ) : IVariableInspectorManager => {
4547 const manager = new VariableInspectorManager ( ) ;
@@ -71,6 +73,13 @@ const variableinspector: JupyterFrontEndPlugin<IVariableInspectorManager> = {
7173 return panel ;
7274 }
7375
76+ // Enable state restoration
77+ restorer . restore ( tracker , {
78+ command,
79+ args : ( ) => ( { } ) ,
80+ name : ( ) => 'variableinspector'
81+ } ) ;
82+
7483 // Add command to palette
7584 app . commands . addCommand ( command , {
7685 label,
You can’t perform that action at this time.
0 commit comments