menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Theia

Eclipse Theia - Cloud & Desktop IDE

Channels
Team

Why i cann't reveal Explorer files to the Editor Widget?

May 20, 2020 at 3:38am

Why i cann't reveal Explorer files to the Editor Widget?

May 20, 2020 at 3:38am (Edited 2 years ago)
My pseudocode is as below:
EditorWidgetFactory.createWidget(myNavigatableWidgetOptions).then(function(editor: EditorWidget) { FileNavigatorContribution.selectWidgetFileNode(editor); });
Running these codes, it selects the file in the explorer, however, the selected file doesn't open in the EditorWidget.
Please help, thx.

May 20, 2020 at 7:02am
Please watch about how to create a widget:
You should never use factories directly, only contribute to support new kind of widgets.
Later in the talk it is clarified how to reveal or focus the widget. You should use ApplicationShell for it.
Edited