YattaSolutions / org.eclipse.swt.browser.electron

Electron browser in SWT
Eclipse Public License 2.0
8 stars 2 forks source link

Feedback from XtermJS usage #6

Open BoykoAlex opened 2 years ago

BoykoAlex commented 2 years ago

I've tried this project against https://github.com/BoykoAlex/node-xterm which is our POC for terminal experience in Eclipse if Chromium support is integrated into SWT. The node-xterm projects uses websocket for comm between the node-pty shell process on the backend and XtermJS UI on the frontend.

The readme on the repo has a very short list of instructions on how to build and start the node app. The url to open http://localhost:3001/terminal/1 which may have parameters one of which is to specify the shell, i.e. http://localhost:3001/terminal/1?cmd=Powershell.exe for Power Shell on Win otherwise it'd be Command Prompt. Try opening the URL above in Chrome and use the contents as you would use a shell CLI.

The Mac experience i've had described in #5.

The Windows experience

martinlippert commented 2 years ago

Is there any progress on this? What would be needed here in order to push this forward?

l3-g5 commented 2 years ago

Hi, the key mapping is not yet complete (see ticket #2). I worked a little on that ticket so that at least '-' should be supported by now. The lagging input is also described in ticket #1. For some strange reason that does not happen for all inputs. Google e.g. feels quite fast. But I have not seen key inputs being skipped with my examples. Maybe that makes debugging easier. We will try to reproduce this using your project and see what we can do. So thanks a lot for your feedback!

l3-g5 commented 2 years ago

We had integrated a mechanism that the Eclipse plugin needs to accept the frames that the Electron process was sending. That caused frames to be dropped which results in a somehow lagging application. I have disabled the corresponding code and it seems to work now. Could you confirm? Btw. nice little app. Looking forward to having that in Eclipse.

martinlippert commented 2 years ago

@l3-g5 That sounds great, thanks for taking a look. I am sure @BoykoAlex is happy to take another look and provide more detailed feedback along the way. Would indeed be great to have that nice terminal working in Eclipse... :-)

BoykoAlex commented 2 years ago

I was able to run SWT Chromium browser on Windows. Worked quite well. I didn't see any obvious issues... Felt that Chrome browser was a bit faster to render than SWT Chromium based browser. Couldn't try the mac version though... Every time I start the SWT browser the google test page doesn't render - simply stays white. It might be related to me having M1 processor rather than Intel. I've tried the org.eclipse.swt.cocoa.macosx.aarch64 rather than org.eclipse.swt.cocoa.macosx.x86_64 - the result was the same.

l3-g5 commented 2 years ago

Great to hear that it is working with Windows. For M1 you need the aarch64 package - that's correct. Have you tried to manually start the Electron process. I added a short explanation to the Readme.