Eclipse Luna 4.4 – Code Assist can’t render HTML on KDE4 Slackware Linux 14.1

Eclipse SDK
Version: Luna (4.4)
Build id: I20140606-1215
PHP Development Tools (PDT) 3.3.0.201406110111

After upgrading my workstation to Slackware 14.1 with KDE 4.10.5 as my default desktop, I was left with some issues regrading my new Eclipse Luna installation. Notably the tooltip was unreadable with its black background color, and much worse, the code assist would not render any HTML whatsoever.

Eclipse 4.4 - Code Assist unable to render HTML
Eclipse 4.4 – Code Assist unable to render HTML

Fixing the dark tooltip background:

KDE4 Application Apperance
KDE4 – Application Apperance

After searching through most of Eclipse’s menus and settings, it became evident that the easiest solution would be to change the tooltip background color by using KDE’s application appearance setting. Navigate to “System Settings” => “Application Apperance” => “Colors” => “Colors” => “Color set: Tooltip” and pick a lighter background. There might be a more sophisticated way of doing this on a per-app basis but it evaded me.

Fixing  HTML rendering for the Code Assist:

Eclipse uses SWT which is an open source widget toolkit for Java designed to provide efficient, portable access to the user-interface facilities of the operating systems on which it is implemented. Further, the SWT Browser widget is used to display HTML documents. It is designed to provide a basic and portable API sufficient for essential HTML browsing and rendering on the platforms on which it is implemented. On a Linux system, this means GTK.
Source: http://www.eclipse.org/swt/

Since I used the SlackBuilds repository to install Eclipse with all dependencies I believed I had everything covered. However, after reading this information at the aforementioned SWT FAQ, I learned that Eclipse Luna (4.4) uses GTK 3 by default. Thus I needed to configure WebKitGTK+ with GTK3. The simple solution is to pick up webkitgtk3 from the SlackBuilds repository and install it alongside or instead of  webkitgtk.

Eclipse 4.4 with webkitgtk3 rendering HTML
Eclipse 4.4 with webkitgtk3 seen rendering HTML using an internal browser

As a simple PDT user with limited understanding of the inner workings of Eclipse, I got to admit I might start looking for a more simplistic IDE.  At least I’ll be hesitant to upgrade to any new major release.

Thank you for reading!
Feel free to waste more time by subscribing to my RSS feed or check out the human-readable sitemap for more content.

Related posts