kieler / klighd-vscode

Eclipse Public License 2.0
8 stars 6 forks source link

Selection highlighting between texts and diagrams #2

Closed christoph-fricke closed 3 years ago

christoph-fricke commented 3 years ago

This PR adds the options to trigger selection highlighting between the diagram and text. Both possible ways (text selects in diagram, diagram selects in text) can be triggered individually.

I implemented this feature to be part of the klighd-core preferences (also appear in the sidebar), even though they are only really useful in VSCode. This makes preferences synchronization with the server for future preferences easier, since this feature already clears the way for the functionality. However, this is up for discussion and might be changed to only be available in VSCode.

Changes:

christoph-fricke commented 3 years ago

@NiklasRentzCAU :+1: It would work nearly out of the box. Such tool would have to implement support for the diagram.openInTextEditor LSP notification. It is defined by Sprotty and automatically supported by their Theia and VS Code gluecode. Currently, the standalone tool is unable to handle it in a meaningful way, so it is not implemented. But yeah, everything else required works out of the box.