React Widget for a file uri #13680
-
Greetings Team, I'm developing a React Widget to automatically display the application whenever a file with the extension .ext is accessed. Utilizing the WidgetOpenHandler, I've managed to implement this functionality. However, a crucial challenge has surfaced: there's a lack of synchronization between the application and individual instances of the file resource. In simpler terms, if multiple files with the .ext extension are opened, it's unclear which application corresponds to which file instance. Could you please advise on the necessary bindings within my frontend module or any example to refer for? I aim to ensure seamless management of title, label, and state persistence, even during reloads, whenever a .ext file is opened or closed. Your assistance on this matter would be immensely valuable. Thank you in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey @vibsid0986, widgets that represent a resource should implement the |
Beta Was this translation helpful? Give feedback.
-
Thanks @msujew for your help, |
Beta Was this translation helpful? Give feedback.
Hey @vibsid0986,
widgets that represent a resource should implement the
Navigatable
interface. It is used for Theia to determine which widget belongs to a given file. See also how the notebook widget for example is implemented.