Skip to content

Commit 2e8a052

Browse files
committed
chore: replace mentions of Phosphor with Lumino
Contributed on behalf of STMicroelectronics
1 parent 986a738 commit 2e8a052

File tree

8 files changed

+18
-18
lines changed

8 files changed

+18
-18
lines changed

packages/core/src/browser/menu/browser-menu-plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ export class MenuCommandRegistry extends LuminoCommandRegistry {
482482
this.addKeyBinding({
483483
command: id,
484484
keys,
485-
selector: '.lm-Widget' // We have the PhosphorJS dependency anyway.
485+
selector: '.lm-Widget' // We have the Lumino dependency anyway.
486486
});
487487
}
488488
return Disposable.create(() => unregisterCommand.dispose());

packages/core/src/browser/shell/application-shell-mouse-tracker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class ApplicationShellMouseTracker implements FrontendApplicationContribu
4444
protected readonly mousedownListener: (e: MouseEvent) => void = e => this.mousedownEmitter.fire(e);
4545

4646
onStart(): void {
47-
// Here we need to attach a `mousedown` listener to the `TabBar`s, `DockPanel`s and the `SidePanel`s. Otherwise, Phosphor handles the event and stops the propagation.
47+
// Here we need to attach a `mousedown` listener to the `TabBar`s, `DockPanel`s and the `SidePanel`s. Otherwise, Lumino handles the event and stops the propagation.
4848
// Track the `mousedown` on the `TabBar` for the currently active widget.
4949
this.applicationShell.onDidChangeActiveWidget((args: FocusTracker.IChangedArgs<Widget>) => {
5050
this.toDisposeOnActiveChange.dispose();
@@ -68,7 +68,7 @@ export class ApplicationShellMouseTracker implements FrontendApplicationContribu
6868
this.toDispose.pushAll([mainPanel, bottomPanel, leftPanelHandler.dockPanel, rightPanelHandler.dockPanel]
6969
.map(panel => addEventListener(panel.node, 'mousedown', this.mousedownListener, true)));
7070

71-
// The `mouseup` event has to be tracked on the `document`. Phosphor attaches to there.
71+
// The `mouseup` event has to be tracked on the `document`. Lumino attaches to there.
7272
document.addEventListener('mouseup', this.mouseupListener, true);
7373

7474
// Make sure it is disposed in the end.

packages/core/src/browser/shell/application-shell.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ export class ApplicationShell extends Widget {
418418

419419
protected onDragEnter({ mimeData }: IDragEvent): void {
420420
if (!this.dragState) {
421-
if (mimeData && mimeData.hasData('application/vnd.phosphor.widget-factory')) {
421+
if (mimeData && mimeData.hasData('application/vnd.lumino.widget-factory')) {
422422
// The drag contains a widget, so we'll track it and expand side panels as needed
423423
this.dragState = {
424424
startTime: performance.now(),

packages/core/src/browser/shell/side-panel-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ export class SidePanelHandler {
638638

639639
// Create and start a drag to move the selected tab to another panel
640640
const mimeData = new MimeData();
641-
mimeData.setData('application/vnd.phosphor.widget-factory', () => title.owner);
641+
mimeData.setData('application/vnd.lumino.widget-factory', () => title.owner);
642642
const drag = new Drag({
643643
mimeData,
644644
dragImage: clonedTab,

packages/core/src/browser/shell/tab-bars.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ export class ScrollableTabBar extends TabBar<Widget> {
731731
}
732732

733733
/**
734-
* Restructures the DOM defined in PhosphorJS.
734+
* Restructures the DOM defined in Lumino.
735735
*
736736
* By default the tabs (`li`) are contained in the `this.contentNode` (`ul`) which is wrapped in a `div` (`this.node`).
737737
* Instead of this structure, we add a container for the `this.contentNode` and for the toolbar.
@@ -1018,7 +1018,7 @@ export class ToolbarAwareTabBar extends ScrollableTabBar {
10181018
}
10191019

10201020
/**
1021-
* Restructures the DOM defined in PhosphorJS.
1021+
* Restructures the DOM defined in Lumino.
10221022
*
10231023
* By default the tabs (`li`) are contained in the `this.contentNode` (`ul`) which is wrapped in a `div` (`this.node`).
10241024
* Instead of this structure, we add a container for the `this.contentNode` and for the toolbar.
@@ -1382,7 +1382,7 @@ export class SideTabBar extends ScrollableTabBar {
13821382
*/
13831383
protected onDragEnter = (event: IDragEvent) => {
13841384
this.cancelViewContainerDND();
1385-
if (event.mimeData.getData('application/vnd.phosphor.view-container-factory')) {
1385+
if (event.mimeData.getData('application/vnd.lumino.view-container-factory')) {
13861386
event.preventDefault();
13871387
event.stopPropagation();
13881388
}
@@ -1393,7 +1393,7 @@ export class SideTabBar extends ScrollableTabBar {
13931393
* Defines the appropriate `dropAction` and opens the tab on which the mouse stands on for more than 800 ms.
13941394
*/
13951395
protected onDragOver = (event: IDragEvent) => {
1396-
const factory = event.mimeData.getData('application/vnd.phosphor.view-container-factory');
1396+
const factory = event.mimeData.getData('application/vnd.lumino.view-container-factory');
13971397
const widget = factory && factory();
13981398
if (!widget) {
13991399
event.dropAction = 'none';

packages/core/src/browser/view-container.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -745,15 +745,15 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica
745745
}
746746

747747
handleDragEnter(event: Drag.Event): void {
748-
if (event.mimeData.hasData('application/vnd.phosphor.view-container-factory')) {
748+
if (event.mimeData.hasData('application/vnd.lumino.view-container-factory')) {
749749
event.preventDefault();
750750
event.stopPropagation();
751751
}
752752
}
753753

754754
toDisposeOnDragEnd = new DisposableCollection();
755755
handleDragOver(event: Drag.Event): void {
756-
const factory = event.mimeData.getData('application/vnd.phosphor.view-container-factory');
756+
const factory = event.mimeData.getData('application/vnd.lumino.view-container-factory');
757757
const widget = factory && factory();
758758
if (!(widget instanceof ViewContainerPart)) {
759759
return;
@@ -799,15 +799,15 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica
799799

800800
handleDragLeave(event: Drag.Event): void {
801801
this.toDisposeOnDragEnd.dispose();
802-
if (event.mimeData.hasData('application/vnd.phosphor.view-container-factory')) {
802+
if (event.mimeData.hasData('application/vnd.lumino.view-container-factory')) {
803803
event.preventDefault();
804804
event.stopPropagation();
805805
}
806806
};
807807

808808
handleDrop(event: Drag.Event): void {
809809
this.toDisposeOnDragEnd.dispose();
810-
const factory = event.mimeData.getData('application/vnd.phosphor.view-container-factory');
810+
const factory = event.mimeData.getData('application/vnd.lumino.view-container-factory');
811811
const draggedPart = factory && factory();
812812
if (!(draggedPart instanceof ViewContainerPart)) {
813813
event.dropAction = 'none';
@@ -834,7 +834,7 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica
834834
event => {
835835
event.preventDefault();
836836
const mimeData = new MimeData();
837-
mimeData.setData('application/vnd.phosphor.view-container-factory', () => part);
837+
mimeData.setData('application/vnd.lumino.view-container-factory', () => part);
838838
const clonedHeader = part.headerElement.cloneNode(true) as HTMLElement;
839839
clonedHeader.style.width = part.node.style.width;
840840
clonedHeader.style.opacity = '0.6';

packages/core/src/browser/widgets/widget.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ export const DEFAULT_SCROLL_OPTIONS: PerfectScrollbar.Options = {
6262
};
6363

6464
/**
65-
* At a number of places in the code, we have effectively reimplemented Phosphor's Widget.attach and Widget.detach,
66-
* but omitted the checks that Phosphor expects to be performed for those operations. That is a bad idea, because it
65+
* At a number of places in the code, we have effectively reimplemented Lumino's Widget.attach and Widget.detach,
66+
* but omitted the checks that Lumino expects to be performed for those operations. That is a bad idea, because it
6767
* means that we are telling widgets that they are attached or detached when not all the conditions that should apply
6868
* do apply. We should explicitly mark those locations so that we know where we should go fix them later.
6969
*/

packages/mini-browser/src/browser/mini-browser-open-handler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ export class MiniBrowserOpenHandler extends NavigatableWidgetOpenHandler<MiniBro
7575
/**
7676
* Instead of going to the backend with each file URI to ask whether it can handle the current file or not,
7777
* we have this map of extension and priority pairs that we populate at application startup.
78-
* The real advantage of this approach is the following: [Phosphor cannot run async code when invoking `isEnabled`/`isVisible`
78+
* The real advantage of this approach is the following: [Lumino cannot run async code when invoking `isEnabled`/`isVisible`
7979
* for the command handlers](https://github.com/eclipse-theia/theia/issues/1958#issuecomment-392829371)
8080
* so the menu item would be always visible for the user even if the file type cannot be handled eventually.
81-
* Hopefully, we could get rid of this hack once we have migrated the existing Phosphor code to [React](https://github.com/eclipse-theia/theia/issues/1915).
81+
* Hopefully, we could get rid of this hack once we have migrated the existing Lumino code to [React](https://github.com/eclipse-theia/theia/issues/1915).
8282
*/
8383
protected readonly supportedExtensions: Map<string, number> = new Map();
8484

0 commit comments

Comments
 (0)