-
Hello, I'm new to glsp and I need your assistance. So, I created a diagram with glsp that shows a model and a theia extension that opens a table with the same data as in the diagram. On the two pages, I want to include a button that would let me switch between the two views. thank you in advance... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, I think, I'd implement that via Theia's opener service. Both buttons invoke PrerequisiteThere needs to be an open handler for each view that reacts to the open-event for a specific type of URI / opener options (see Open Event From GLSPThe button in GLSP can be implemented with a UI Extension or any other way. Likely, you'd send a custom GLSP action as a result. In your Theia integration, you'd then register an action handler for this action, which in turn invokes a Theia command. Theia command (From GLSP or your Theia View)The Theia command for invoking the open handler is very similar for both ends, from GLSP or from your Theia view. Eventually it needs to call I hope this gives some hints into the right direction! |
Beta Was this translation helpful? Give feedback.
Hi,
I think, I'd implement that via Theia's opener service. Both buttons invoke
open
on click with opener options for which the other view is registered. With that you can achieve that those views would be activated and brought to front, whether they are currently already opened or not. Optionally you could extend the opener options so that the views would also update their selection as a result.Prerequisite
There needs to be an open handler for each view that reacts to the open-event for a specific type of URI / opener options (see
canHandle(URI, OpenerOptions)
of yourOpenHandler
).Open Event From GLSP
The button in GLSP can be implemented with a UI Extension or any other way. Likely, …