Skip to content

Commit daf7690

Browse files
committed
basic replacement of phosphor to lumino
1 parent f0b5b58 commit daf7690

15 files changed

+1081
-782
lines changed

browser-app/package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
"name": "browser-app",
44
"version": "0.0.0",
55
"dependencies": {
6-
"@theia/core": "1.58.1",
7-
"@theia/editor": "1.58.1",
8-
"@theia/filesystem": "1.58.1",
9-
"@theia/markers": "1.58.1",
10-
"@theia/messages": "1.58.1",
11-
"@theia/monaco": "1.58.1",
12-
"@theia/navigator": "1.58.1",
13-
"@theia/plugin-dev": "^1.58.1",
14-
"@theia/plugin-ext": "^1.58.1",
15-
"@theia/plugin-ext-vscode": "^1.58.1",
16-
"@theia/preferences": "1.58.1",
17-
"@theia/process": "1.58.1",
18-
"@theia/terminal": "1.58.1",
19-
"@theia/vsx-registry": "^1.58.1",
20-
"@theia/workspace": "1.58.1",
6+
"@theia/core": "1.65.0",
7+
"@theia/editor": "1.65.0",
8+
"@theia/filesystem": "1.65.0",
9+
"@theia/markers": "1.65.0",
10+
"@theia/messages": "1.65.0",
11+
"@theia/monaco": "1.65.0",
12+
"@theia/navigator": "1.65.0",
13+
"@theia/plugin-dev": "1.65.0",
14+
"@theia/plugin-ext": "1.65.0",
15+
"@theia/plugin-ext-vscode": "1.65.0",
16+
"@theia/preferences": "1.65.0",
17+
"@theia/process": "1.65.0",
18+
"@theia/terminal": "1.65.0",
19+
"@theia/vsx-registry": "1.65.0",
20+
"@theia/workspace": "1.65.0",
2121
"coderibbon-theia": "^0.0.0"
2222
},
2323
"devDependencies": {
24-
"@theia/cli": "1.58.1"
24+
"@theia/cli": "1.65.0"
2525
},
2626
"scripts": {
2727
"bundle": "yarn rebuild && theia build --mode development",
@@ -32,4 +32,4 @@
3232
"theia": {
3333
"target": "browser"
3434
}
35-
}
35+
}

coderibbon-theia/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"src"
1010
],
1111
"dependencies": {
12-
"@theia/core": "1.58.1"
12+
"@theia/core": "1.65.0"
1313
},
1414
"devDependencies": {
1515
"less": "^4.1.3",
@@ -28,4 +28,4 @@
2828
"frontend": "lib/browser/coderibbon-theia-frontend-module"
2929
}
3030
]
31-
}
31+
}

coderibbon-theia/src/browser/coderibbon-theia-frontend-module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
// bindViewContribution, WidgetFactory,
1414
KeybindingContribution,
1515
} from "@theia/core/lib/browser";
16-
import { PreferenceContribution } from "@theia/core/lib/browser/preferences";
16+
import { PreferenceContribution } from "@theia/core/lib/common/preferences";
1717
import { ApplicationShell } from "@theia/core/lib/browser/shell/application-shell";
1818

1919
// import { CodeRibbonTheiaRibbonViewContribution } from './coderibbon-theia-ribbon';

coderibbon-theia/src/browser/coderibbon-theia-manager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { injectable, inject } from "@theia/core/shared/inversify";
22

3-
import { Widget } from "@phosphor/widgets";
3+
import { Widget } from "@lumino/widgets";
44
import { MessageService } from "@theia/core/lib/common";
55
import {
66
AbstractViewContribution,
@@ -10,7 +10,7 @@ import {
1010
import { FrontendApplication } from "@theia/core/lib/browser/frontend-application";
1111
import { FrontendApplicationStateService } from "@theia/core/lib/browser/frontend-application-state";
1212
import { ApplicationShell } from "@theia/core/lib/browser/shell/application-shell";
13-
import { CorePreferences } from "@theia/core/lib/browser/core-preferences";
13+
import { CorePreferences } from "@theia/core/lib/common/core-preferences";
1414

1515
// import { CodeRibbonApplicationShell } from './cr-application-shell';
1616

coderibbon-theia/src/browser/cr-application-shell.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ import {
1313
DockLayout,
1414
BoxLayout,
1515
FocusTracker,
16-
} from "@phosphor/widgets";
16+
} from "@lumino/widgets";
1717
import { MessageService } from "@theia/core/lib/common";
1818
import { FrontendApplicationStateService } from "@theia/core/lib/browser/frontend-application-state";
1919
// import {
2020
// FrontendApplication, FrontendApplicationContribution,
2121
// } from '@theia/core/lib/browser/frontend-application';
22-
import { CorePreferences } from "@theia/core/lib/browser/core-preferences";
22+
import { CorePreferences } from "@theia/core/lib/common/core-preferences";
2323
import {
2424
TheiaDockPanel,
2525
BOTTOM_AREA_ID,
2626
MAIN_AREA_ID,
27-
MAXIMIZED_CLASS,
27+
// MAXIMIZED_CLASS,
2828
} from "@theia/core/lib/browser/shell/theia-dock-panel";
2929
import {
3030
DockPanelRenderer,

coderibbon-theia/src/browser/cr-interfaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Widget, BoxLayout, DockLayout } from "@phosphor/widgets";
1+
import { Widget, BoxLayout, DockLayout } from "@lumino/widgets";
22

33
import { CodeRibbonTheiaRibbonLayout } from "./cr-ribbon-layout";
44

coderibbon-theia/src/browser/cr-patch.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ import {
1313
BoxLayout,
1414
BoxEngine,
1515
BoxSizer,
16-
} from "@phosphor/widgets";
16+
} from "@lumino/widgets";
1717
import {
1818
Drag, IDragEvent
19-
} from '@phosphor/dragdrop';
19+
} from '@lumino/dragdrop';
2020
import {
2121
MimeData
22-
} from '@phosphor/coreutils';
22+
} from '@lumino/coreutils';
2323
import {
2424
ElementExt
25-
} from '@phosphor/domutils';
25+
} from '@lumino/domutils';
2626
import {
2727
IDisposable
28-
} from '@phosphor/disposable';
28+
} from '@lumino/disposable';
2929

3030
import { crdebug } from "./cr-logger";
3131

coderibbon-theia/src/browser/cr-ribbon-layout.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
postConstruct,
55
} from "@theia/core/shared/inversify";
66

7-
import { Signal } from "@phosphor/signaling";
7+
import { Signal } from "@lumino/signaling";
88
import {
99
TabBar,
1010
Widget,
@@ -15,10 +15,10 @@ import {
1515
BoxLayout,
1616
BoxEngine,
1717
BoxSizer,
18-
} from "@phosphor/widgets";
19-
import { ElementExt } from "@phosphor/domutils";
20-
import { Message, MessageLoop } from "@phosphor/messaging";
21-
import { empty } from "@phosphor/algorithm";
18+
} from "@lumino/widgets";
19+
import { ElementExt } from "@lumino/domutils";
20+
import { Message, MessageLoop } from "@lumino/messaging";
21+
import { empty } from "@lumino/algorithm";
2222
// import {
2323
// MessageService,
2424
// Emitter, environment,
@@ -28,7 +28,7 @@ import { empty } from "@phosphor/algorithm";
2828
// TheiaDockPanel, BOTTOM_AREA_ID, MAIN_AREA_ID, MAXIMIZED_CLASS,
2929
// } from '@theia/core/lib/browser/shell/theia-dock-panel';
3030
import { FrontendApplicationStateService } from "@theia/core/lib/browser/frontend-application-state";
31-
import { CorePreferences } from "@theia/core/lib/browser/core-preferences";
31+
import { CorePreferences } from "@theia/core/lib/common/core-preferences";
3232

3333
import { crdebug } from "./cr-logger";
3434

coderibbon-theia/src/browser/cr-ribbon-strip.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
postConstruct,
55
} from "@theia/core/shared/inversify";
66

7-
import { Signal } from "@phosphor/signaling";
7+
import { Signal } from "@lumino/signaling";
88
import {
99
TabBar,
1010
Widget,
@@ -15,7 +15,7 @@ import {
1515
BoxLayout,
1616
BoxSizer,
1717
FocusTracker,
18-
} from "@phosphor/widgets";
18+
} from "@lumino/widgets";
1919
// import {
2020
// empty, IIterator,
2121
// } from '@phosphor/algorithm';
@@ -30,7 +30,7 @@ import {
3030
// TheiaDockPanel, BOTTOM_AREA_ID, MAIN_AREA_ID, MAXIMIZED_CLASS,
3131
// } from '@theia/core/lib/browser/shell/theia-dock-panel';
3232
import { FrontendApplicationStateService } from "@theia/core/lib/browser/frontend-application-state";
33-
import { CorePreferences } from "@theia/core/lib/browser/core-preferences";
33+
import { CorePreferences } from "@theia/core/lib/common/core-preferences";
3434

3535
import { crdebug } from "./cr-logger";
3636
import { CodeRibbonTheiaPatch } from "./cr-patch";

coderibbon-theia/src/browser/cr-ribbon.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
postConstruct,
55
} from "@theia/core/shared/inversify";
66

7-
import { Signal } from "@phosphor/signaling";
7+
import { Signal } from "@lumino/signaling";
88
import {
99
TabBar,
1010
Widget,
@@ -15,32 +15,32 @@ import {
1515
DockLayout,
1616
BoxLayout,
1717
FocusTracker,
18-
} from "@phosphor/widgets";
18+
} from "@lumino/widgets";
1919
import {
2020
empty,
2121
toArray,
2222
ArrayExt,
23-
IIterator,
23+
// IIterator,
2424
find,
25-
iter,
26-
} from "@phosphor/algorithm";
25+
// iter,
26+
} from "@lumino/algorithm";
2727
import {
2828
Message,
2929
MessageLoop,
3030
ConflatableMessage
31-
} from "@phosphor/messaging";
31+
} from "@lumino/messaging";
3232
import {
3333
Drag, IDragEvent
34-
} from '@phosphor/dragdrop';
34+
} from '@lumino/dragdrop';
3535
import {
3636
MimeData
37-
} from '@phosphor/coreutils';
37+
} from '@lumino/coreutils';
3838
import {
3939
ElementExt
40-
} from '@phosphor/domutils';
40+
} from '@lumino/domutils';
4141
import {
4242
IDisposable
43-
} from '@phosphor/disposable';
43+
} from '@lumino/disposable';
4444

4545
import {
4646
MessageService,
@@ -56,10 +56,10 @@ import {
5656
TheiaDockPanel,
5757
BOTTOM_AREA_ID,
5858
MAIN_AREA_ID,
59-
MAXIMIZED_CLASS,
59+
// MAXIMIZED_CLASS,
6060
} from "@theia/core/lib/browser/shell/theia-dock-panel";
6161
import { FrontendApplicationStateService } from "@theia/core/lib/browser/frontend-application-state";
62-
import { CorePreferences } from "@theia/core/lib/browser/core-preferences";
62+
import { CorePreferences } from "@theia/core/lib/common/core-preferences";
6363

6464
import { crdebug } from "./cr-logger";
6565
import { CodeRibbonTheiaPatch } from "./cr-patch";
@@ -1014,13 +1014,13 @@ export class CodeRibbonTheiaRibbonPanel extends BoxPanel implements EventListene
10141014
// features that DockPanel has, and they're expected by Theia
10151015

10161016
// @ts-expect-error TS2425: Class defines instance member property 'widgets', but extended class defines it as instance member function.
1017-
override widgets(): IIterator<Widget> {
1017+
override widgets(): Iterator<Widget> {
10181018
// TODO iterate widgets in order of ribbon layout from within strips
10191019
// return (this.layout as CodeRibbonTheiaRibbonLayout).widgets;
1020-
return iter(this.contentful_widgets);
1020+
return this.contentful_widgets.values();
10211021
}
10221022

1023-
tabBars(): IIterator<TabBar<Widget>> {
1023+
tabBars(): IterableIterator<TabBar<Widget>> {
10241024
// TODO removal of tabBars
10251025
// return this._root ? this._root.iterTabBars() : empty<TabBar<Widget>>();
10261026
return empty<TabBar<Widget>>();
@@ -1363,7 +1363,7 @@ export class CodeRibbonTheiaRibbonPanel extends BoxPanel implements EventListene
13631363
UnsafeWidgetUtilities.detach(this);
13641364
}
13651365
maximizedElement.style.display = "block";
1366-
this.addClass(MAXIMIZED_CLASS);
1366+
// this.addClass(MAXIMIZED_CLASS); // TODO is this still needed?
13671367
const preference = this.preferences?.get("window.menuBarVisibility");
13681368
if (!this.isElectron() && preference === "visible") {
13691369
this.addClass(VISIBLE_MENU_MAXIMIZED_CLASS);
@@ -1374,7 +1374,7 @@ export class CodeRibbonTheiaRibbonPanel extends BoxPanel implements EventListene
13741374
this.toDisposeOnToggleMaximized.push(
13751375
Disposable.create(() => {
13761376
maximizedElement.style.display = "none";
1377-
this.removeClass(MAXIMIZED_CLASS);
1377+
// this.removeClass(MAXIMIZED_CLASS); // TODO is this still needed?
13781378
this.onDidToggleMaximizedEmitter.fire(this);
13791379
if (!this.isElectron()) {
13801380
this.removeClass(VISIBLE_MENU_MAXIMIZED_CLASS);

0 commit comments

Comments
 (0)