Monday, November 5, 2012

SWT on GTK 3 - Eclipse starts !!

So another major milestone is hit. One can start eclipse on top of GTK 3.x - not everything works as expected but here is the screenshot.


13 comments:

Unknown said...

Nevertheless this looks promissing!
Great work! I'm looking forward to it! :-)

Lars Vogel said...

Great. Do you know if there is a summary of the advantages GTK3 will bring for SWT?

I currently assume that this will enable Eclipse to run on top of Wayland and that CSS styling might be more flexible on Linux but I'm not sure if that is true.

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

Running on top of Wayland is not something any released GTK version can do AFAIK. But running on top of GTK 3.6+ is definetely a prerequisite for that.
For now there is no other benefit but being able to talk to Gtk developers about problems and don't get pointed to porting document first.
One thing that I really look for is using Gtk 3 Broadway backend (see http://www.youtube.com/watch?v=AO-qca9ddqg ). Gtk 3 is also a bit more friendlier for bindings (personal feeling). Cairo is also way deeper integrated in Gtk 3 and supposed to give better performance. SWT's ControlExample feels more snappier to me but it might be because of misrendering.
About styling - this is area that is totally neglected in swt and is done in e4 and not in swt. Hopefully, someone will step in to finish the Theme API in SWT and redo the current styling using native support but for now running on top of GTK 3 will not change much on this aspect.
Another thing is that the same codebase is used to support both GTK 2.x and 3.x so most things are kept to the common denominator (2.10) there is a lot more work to happen to start making use of the GTK 3 apis.

Mat Booth said...

Nice work :-)

Lars Vogel said...

Thanks Alexander for the detailed answer. I understand that the main benefits are indirect in nature.

Unknown said...

Looks cool.

Does this mean that vector screenshots will work? This would be awesome for infinitely scalable screenshots in documentation.

http://www.joachim-breitner.de/blog/archives/494-Better-PDF-screenshots-with-gtk-3.html

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

Honestly, no idea about the screenshots. Please try and let us know.

Unknown said...

Sure. Did you use a particular milestone release? Should I just download a nightly build from somewhere?

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

From http://download.eclipse.org/eclipse/downloads/ get latest 4.3 nightly build, there are fixes going in almost every day so that's the best option.
Extract it to some folder.
Do export SWT_GTK3=true.
./eclipse

Unknown said...

I used the latest nightly build with gtk-vector-screenshot and produced this:

https://docs.google.com/open?id=0Bx8wjXxSB5Qsd3p3RVp2NTNtUjQ

Not bad for a first try. It got the toolbars and other "chrome" but had some trouble with the editor and view content.

Unknown said...

Apparently the content for the editor window is there. In evince you can see it if you do Select All (CTRL-A).

You should be able to copy/paste it in Adobe Acrobat Reader too.

http://www.lemmster.de said...

"export SWT_GTK3=true" (and false) cause Eclipse to hang here. Use "export SWT_GTK3=0" and " export SWT_GTK3=1" instead.

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

Yeah, this comment is a year old and since then things changed.