eclipse-glsp / glsp

Graphical language server platform for building web-based diagram editors
https://www.eclipse.dev/glsp
Other
194 stars 31 forks source link

Secondary Window doesn't work for GLSP VS Code extensions in Theia #1193

Open planger opened 9 months ago

planger commented 9 months ago

It has been reported in https://github.com/eclipse-theia/theia/issues/13165 that GLSP editors packed in a VS Code extension can not be extracted into a secondary window in Theia, even though it should work as GLSP editors in VS Code extensions are based on Webview.

martin-fleck-at commented 8 months ago

For me that neither works in Theia nor in VS Code. In VS Code they explicitly set a flag that causes an error message when trying to open a Webview Editor in another window:

image

The relevant code is here https://github.com/microsoft/vscode/blob/75b1639461b53dc51380a61532aabdd502c4c718/src/vs/workbench/browser/parts/editor/editorPanes.ts#L133-L142 and https://github.com/microsoft/vscode/blob/75b1639461b53dc51380a61532aabdd502c4c718/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput.ts#L32-L34.

I tried it with another webview editor in Theia and there I managed to get it to work but the GLSP editor does not. So I think we can look into getting that to work for Theia somehow but that would still not make it work in VS Code.

tsmaeder commented 5 months ago

I don't think the linked code should be a problem in Theia because we're not going through "openEditor" when moving a webview to the secondary window. Something else must be going on here.