File tree 1 file changed +10
-1
lines changed
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';
2
2
3
3
import {
4
4
ILabShell ,
5
+ ILayoutRestorer ,
5
6
JupyterFrontEnd ,
6
7
JupyterFrontEndPlugin
7
8
} from '@jupyterlab/application' ;
@@ -34,12 +35,13 @@ namespace CommandIDs {
34
35
*/
35
36
const variableinspector : JupyterFrontEndPlugin < IVariableInspectorManager > = {
36
37
id : '@lckr/jupyterlab_variableinspector' ,
37
- requires : [ ICommandPalette , ILabShell ] ,
38
+ requires : [ ICommandPalette , ILayoutRestorer , ILabShell ] ,
38
39
provides : IVariableInspectorManager ,
39
40
autoStart : true ,
40
41
activate : (
41
42
app : JupyterFrontEnd ,
42
43
palette : ICommandPalette ,
44
+ restorer : ILayoutRestorer ,
43
45
labShell : ILabShell
44
46
) : IVariableInspectorManager => {
45
47
const manager = new VariableInspectorManager ( ) ;
@@ -71,6 +73,13 @@ const variableinspector: JupyterFrontEndPlugin<IVariableInspectorManager> = {
71
73
return panel ;
72
74
}
73
75
76
+ // Enable state restoration
77
+ restorer . restore ( tracker , {
78
+ command,
79
+ args : ( ) => ( { } ) ,
80
+ name : ( ) => 'variableinspector'
81
+ } ) ;
82
+
74
83
// Add command to palette
75
84
app . commands . addCommand ( command , {
76
85
label,
You can’t perform that action at this time.
0 commit comments