File tree 2 files changed +10
-17
lines changed
arduino-ide-extension/src/browser/theia/editor
2 files changed +10
-17
lines changed Original file line number Diff line number Diff line change 1
1
import { injectable } from '@theia/core/shared/inversify' ;
2
- import { EditorWidget } from '@theia/editor/lib/browser' ;
3
- import {
4
- EditorManager as TheiaEditorManager ,
5
- WidgetId ,
6
- } from '@theia/editor/lib/browser/editor-manager' ;
2
+ import { EditorManager as TheiaEditorManager } from '@theia/editor/lib/browser/editor-manager' ;
7
3
8
4
@injectable ( )
9
5
export class EditorManager extends TheiaEditorManager {
10
6
protected override getOrCreateCounterForUri ( ) : number {
11
7
return 0 ;
12
8
}
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
- }
22
9
}
Original file line number Diff line number Diff line change 1
1
import { inject , injectable } from '@theia/core/shared/inversify' ;
2
2
import URI from '@theia/core/lib/common/uri' ;
3
3
import { EditorWidget } from '@theia/editor/lib/browser' ;
4
- import { LabelProvider } from '@theia/core/lib/browser' ;
4
+ import {
5
+ LabelProvider ,
6
+ NavigatableWidgetOptions ,
7
+ } from '@theia/core/lib/browser' ;
5
8
import { EditorWidgetFactory as TheiaEditorWidgetFactory } from '@theia/editor/lib/browser/editor-widget-factory' ;
6
9
import {
7
10
CurrentSketch ,
@@ -21,8 +24,11 @@ export class EditorWidgetFactory extends TheiaEditorWidgetFactory {
21
24
@inject ( LabelProvider )
22
25
protected override readonly labelProvider : LabelProvider ;
23
26
24
- protected override async createEditor ( uri : URI ) : Promise < EditorWidget > {
25
- const widget = await super . createEditor ( uri ) ;
27
+ protected override async createEditor (
28
+ uri : URI ,
29
+ options ?: NavigatableWidgetOptions
30
+ ) : Promise < EditorWidget > {
31
+ const widget = await super . createEditor ( uri , options ) ;
26
32
return this . maybeUpdateCaption ( widget ) ;
27
33
}
28
34
You can’t perform that action at this time.
0 commit comments