eclipse-theia / theia-ide

The Eclipse IDE is a modern and open IDE for cloud and desktop. The Theia IDE is based on the Theia platform. The Theia IDE is available as a downloadable desktop application. You can also try the latest version of the Theia IDE online. For more details, see the Readme below.
https://theia-ide.org/#theiaide
MIT License
343 stars 129 forks source link

Theia 1.53.0 #384

Closed jfaltermeier closed 1 month ago

jfaltermeier commented 1 month ago

What it does

closes #378 closes #383

Contributed on behalf of STMicroelectronics

How to test

Review checklist

Reminder for reviewers

jfaltermeier commented 1 month ago

For testing the theia scheme on ubuntu I slightly adjusted the generated desktop file:

[Desktop Entry]
Name=TheiaIDE
Exec=/home/johannes/.local/share/applications/theia-ide-launcher.sh %U
Terminal=false
Type=Application
Icon=/home/johannes/.local/share/applications/theia-ide-electron-app.png
StartupWMClass=TheiaIDE
MimeType=x-scheme-handler/theia;
Comment=Eclipse Theia IDE product
Categories=Development;

The referenced launcher script looks like this (basically adding logging of the passed arguments):

#!/bin/bash

# Log the arguments to a file
echo "App launched with: $@" >> /tmp/xxx-theia_launch.log

# Launch the AppImage with the provided arguments
/home/johannes/Git/theia-blueprint/applications/electron/dist/TheiaIDE.AppImage "$@"

Now I can see that the AppImage gets the theia scheme URL passed:

App launched with: 
App launched with: theia://tylerleonhardt.open-external/open-external

Nothing happens though (besides that a new frontend is started), but I guess this is then an issue with plain Theia and not with the IDE and the metadata in the desktopfile

jfaltermeier commented 1 month ago

On Windows and Mac the theia:// protocol gets handled as expected.

jfaltermeier commented 1 month ago

For testing the theia scheme on ubuntu I slightly adjusted the generated desktop file:

[Desktop Entry]
Name=TheiaIDE
Exec=/home/johannes/.local/share/applications/theia-ide-launcher.sh %U
Terminal=false
Type=Application
Icon=/home/johannes/.local/share/applications/theia-ide-electron-app.png
StartupWMClass=TheiaIDE
MimeType=x-scheme-handler/theia;
Comment=Eclipse Theia IDE product
Categories=Development;

The referenced launcher script looks like this (basically adding logging of the passed arguments):

#!/bin/bash

# Log the arguments to a file
echo "App launched with: $@" >> /tmp/xxx-theia_launch.log

# Launch the AppImage with the provided arguments
/home/johannes/Git/theia-blueprint/applications/electron/dist/TheiaIDE.AppImage "$@"

Now I can see that the AppImage gets the theia scheme URL passed:

App launched with: 
App launched with: theia://tylerleonhardt.open-external/open-external

Nothing happens though (besides that a new frontend is started), but I guess this is then an issue with plain Theia and not with the IDE and the metadata in the desktopfile

I can see that VSCode uses two desktop files, one passing --open-url that is also hidden in the launcher. I'll try this

Edit: That seems to do the trick, I'll adapt accordingly