File tree 1 file changed +14
-1
lines changed
arduino-ide-extension/src/browser/theia/editor
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { injectable } from '@theia/core/shared/inversify' ;
2
- import { EditorManager as TheiaEditorManager } from '@theia/editor/lib/browser/editor-manager' ;
2
+ import { EditorWidget } from '@theia/editor/lib/browser' ;
3
+ import {
4
+ EditorManager as TheiaEditorManager ,
5
+ WidgetId ,
6
+ } from '@theia/editor/lib/browser/editor-manager' ;
3
7
4
8
@injectable ( )
5
9
export class EditorManager extends TheiaEditorManager {
6
10
protected override getOrCreateCounterForUri ( ) : number {
7
11
return 0 ;
8
12
}
13
+
14
+ protected override extractIdFromWidget ( widget : EditorWidget ) : WidgetId {
15
+ const { id, uri } = super . extractIdFromWidget ( widget ) ;
16
+ // https://github.com/eclipse-theia/theia/commit/86a4fc66c112310fb39f50024ea4a2607ed5927e#r79349262
17
+ if ( Number . isNaN ( id ) ) {
18
+ return { uri, id : 0 } ;
19
+ }
20
+ return { id, uri } ;
21
+ }
9
22
}
You can’t perform that action at this time.
0 commit comments