Is it possible to repurpose the GIssueMarkerView for a more general decoration purpose? Instead of just for validation markers #1324
-
Hey there, I'm investigating the various features of GLSP and wanted to ask if it would be possible (I would be doing the work ofcourse) to repurpose the GIssueMarkerView used for validation icons for a more general decoration purpose? i.e. supply our own icons Essentially our existing application allows us to display icons as decorators so we can show the user at a glance that a particular node in the diagram is special in someway (for example, it has a related node elsewhere in our models not connected to it via an edge). Cheers! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi Jonathan, absolutely, you can definitely use the general issue marker functionality for your own purposes too, and not just for the use case of decorating validation results. You can add If you don't want them to be a real part of the GModel (ie adding them to the GModel on the server directly), you can apply a similar strategy as GLSP core uses for transferring validation result markers down to the client and showing them. In the validation result marker implementation of GLSP, the markers are not added as part of the GModel, but added via a feedback emitter as a result of the Alternatively, you can also just reuse the existing mechanism above and just send an I hope this helps! |
Beta Was this translation helpful? Give feedback.
Hi Jonathan,
absolutely, you can definitely use the general issue marker functionality for your own purposes too, and not just for the use case of decorating validation results.
You can add
GIssueMarker
elements into your GModel directly from yourGModelFactory
and they'll be shown just as normal markers. To define the rendering (other icons, etc.) of your custom markers, you may need to bind your own issue marker view implementation. See issue marker view implementation and binding your own views for more details.If you don't want them to be a real part of the GModel (ie adding them to the GModel on the server directly), you can apply a similar strategy as GLSP core uses for transferrin…