File tree 1 file changed +6
-1
lines changed
arduino-ide-extension/src/browser/theia/workspace
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change
1
+ import * as remote from '@theia/core/electron-shared/@electron/remote' ;
1
2
import { injectable , inject } from 'inversify' ;
2
3
import URI from '@theia/core/lib/common/uri' ;
3
4
import { EditorWidget } from '@theia/editor/lib/browser' ;
@@ -77,7 +78,9 @@ export class WorkspaceService extends TheiaWorkspaceService {
77
78
) ,
78
79
] ) ;
79
80
// On Dindows, `getRecentWorkspaces` returns only file paths, not URIs as expected by the `isValid` method.
80
- const recentWorkspaces = recentWorkspacesPaths . map ( e => VSCodeUri . file ( e ) . toString ( ) ) ;
81
+ const recentWorkspaces = recentWorkspacesPaths . map ( ( e ) =>
82
+ VSCodeUri . file ( e ) . toString ( )
83
+ ) ;
81
84
const toOpen = await new ArduinoWorkspaceRootResolver ( {
82
85
isValid : this . isValid . bind ( this ) ,
83
86
} ) . resolve ( { hash, recentWorkspaces, recentSketches } ) ;
@@ -127,6 +130,8 @@ export class WorkspaceService extends TheiaWorkspaceService {
127
130
} : FocusTracker . IChangedArgs < Widget > ) : void {
128
131
if ( newValue instanceof EditorWidget ) {
129
132
const { uri } = newValue . editor ;
133
+ const currentWindow = remote . getCurrentWindow ( ) ;
134
+ currentWindow . setRepresentedFilename ( uri . path . toString ( ) ) ;
130
135
if ( Sketch . isSketchFile ( uri . toString ( ) ) ) {
131
136
this . updateTitle ( ) ;
132
137
} else {
You can’t perform that action at this time.
0 commit comments