File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed 
arduino-ide-extension/src/browser/theia/core Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,28 @@ import { ShellLayoutRestorer as TheiaShellLayoutRestorer } from '@theia/core/lib
44import  {  injectable  }  from  '@theia/core/shared/inversify' ; 
55import  {  EditorPreviewWidgetFactory  }  from  '@theia/editor-preview/lib/browser/editor-preview-widget-factory' ; 
66import  {  EditorWidgetFactory  }  from  '@theia/editor/lib/browser/editor-widget-factory' ; 
7+ import  {  FrontendApplication  }  from  './frontend-application' ; 
78
89@injectable ( ) 
910export  class  ShellLayoutRestorer  extends  TheiaShellLayoutRestorer  { 
11+   override  async  restoreLayout ( app : FrontendApplication ) : Promise < boolean >  { 
12+     this . logger . info ( '>>> Restoring the layout state...' ) ; 
13+     const  serializedLayoutData  =  await  this . storageService . getData < string > ( 
14+       this . storageKey 
15+     ) ; 
16+     if  ( serializedLayoutData  ===  undefined )  { 
17+       this . logger . info ( '<<< Nothing to restore.' ) ; 
18+       return  false ; 
19+     } 
20+     console . log ( '------- SERIALIZED LAYOUT DATA -------' ) ; 
21+     console . log ( serializedLayoutData ) ; 
22+     console . log ( '------- END SERIALIZED LAYOUT DATA -------' ) ; 
23+     const  layoutData  =  await  this . inflate ( serializedLayoutData ) ; 
24+     await  app . shell . setLayoutData ( layoutData ) ; 
25+     this . logger . info ( '<<< The layout has been successfully restored.' ) ; 
26+     return  true ; 
27+   } 
28+ 
1029  /** 
1130   * Customized to filter out duplicate editor tabs. 
1231   */ 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments