Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AbstractUIExtension enabled on startup #463

Open
MatDau opened this issue Sep 18, 2024 · 2 comments
Open

AbstractUIExtension enabled on startup #463

MatDau opened this issue Sep 18, 2024 · 2 comments
Labels
question Further information is requested

Comments

@MatDau
Copy link

MatDau commented Sep 18, 2024

I am creating a vscode extension that uses sprotty to draw diagrams integrated with an LSP. I am trying to develop an AbstractUIExtension that simulates like a chat on the diagram and I would like this to start at a start-up.
I have tried several ways but have yet to succeed. Is there a way?

@spoenemann
Copy link
Contributor

It's not necessary to use that interface for integrating additional UI with the diagram. You can just use any UI framework like React and position the element where you want it using CSS. The question is how tightly you want to integrate that UI with the inner workings of the diagram viewer. There is no general answer to that because it depends on what information from the diagram is needed by the UI.

@spoenemann spoenemann added the question Further information is requested label Sep 19, 2024
@MatDau
Copy link
Author

MatDau commented Sep 19, 2024

I want my UI to be very diagram-related, as I would like to realize a chat that then sends WorkspaceEdits.

I was able to activate the AbstractUIextension at diagram startup by having my UI extension implement IActionHandler and handle a SetModelAction to send the SetUIExtensionVisibilityAction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants