Thursday, September 19, 2013

Full featured IDE in your browser and Eclipse

We all hear about the new and cool web IDEs - I looked at few of them and somehow all looked too poor for someone used to do pretty much in his IDE (that's why we have I-ntegrated in the name, right?). So I decided to take another look at the problem from different POV and here it is:





That's Anjuta running using GDK Broadway backend, sample C project created, compiled and launched(the empty window on the right) - all in the browser.
Simple instructions that work on Fedora 19:

  • 1st terminal - start broadwayd 
  • 2nd terminal - GDK_BACKEND=broadway anjuta
  • browser - http://localhost:8080
Isn't that cool?
As an Eclipse user and developer I wanted to immediately see my Eclipse working on my development machine and being able to use it from various connected devices at home for small things like - launch hudson build via mylyn builds, comment on bug via mylyn tasks, pull from Gerrit for a quick review and etc. all via plain old http while having my setup working and no vnc or alike solutions needed (that take more time to get on your phone than few web clicks). To be honest I didn't expected it to work but this doesn't mean I have to stop dreaming. 
Broadway GDK backend is GTK 3.x feature so one first need to run eclipse on GTK 3. That's easy - `SWT_GTK3=1 eclipse` and you have it. But there is one more prerequisite to use different GDK backends - your app should not do direct X calls and here we fail - eclipse simply crashes because of the direct X calls done if one tries `GDK_BACKEND=broadway SWT_GTK3=1 eclipse`.
Allowing using different GDK backend is important for Eclipse (at least on Linux) as elliminating or changing X calls is needed to also make Eclipse run as native wayland client. The future will catch Eclipse sooner or later.
If you do want to see such future for Eclipse please test Eclipse on GTK 3.x, report bugs, help us fix the issues, provide patches and spread the word about such possibilities so more people can potentially join the fun. Also feel free to contact me directly for anything related and help my dream come true.

12 comments:

Krzysztof (Chris) Daniel said...

Nice!

M3nt0r3 said...

when i try to type something inside an entry nothing happened.

Александър Куртаков said...

What kind of entry ? Where? Which app? I simply don't understand your comment.

M3nt0r3 said...

Entry text, in all apps i tried, ( gedit, anjuta, my app ) I digit on the keyboard but nothing happened

Александър Куртаков said...

Hmm, this works for me with fully uptodate Fedora 19 and Firefox as a browser. Don't you get any error/warning on the broadway or the app launching terminal?

M3nt0r3 said...

@localhost:~$ broadwayd
Listening on /run/user/1000/broadway1.socket
^[[Acan't write to clientcan't write to clientcan't write to clientcan't write to clientc.......

Anonymous said...

So it's more or less the same as RAP except that it redirects GTK events to the browser instead of SWT ones?

Александър Куртаков said...

Well, it's better than RAP in the sense that one doesn't need to recompile plugins and etc. You should be able to use each of your plugins without any modification by choosing whether gtk should render to X or browser surface.

Anonymous said...

Very interesting. So it could work on windows as well (just like GTK?).
That's a very nice topic to submit for next EclipseCon ;)

Александър Куртаков said...

Gtk itsef can work on Windows, but SWT on Gtk is something that uses a lot gtk_x11 calls, which would probably be ifdefed with something wayland specific so SWT/GTK is something I would not bet on (at least not with current manpower). But running your Eclipse on Linux server and using it via your browser on Win/Mac/whatever would be simpler.

Unknown said...

any news on this?

Александър Куртаков said...

Unfortunately - no. Other work is taking all my time.