My EclipseCon proposal was rejected - I guess I have to try harder next time. But the bitter taste of disappointed was quickly eclipsed by the package FedEx delivered yesterday. It was brand new hardware from my future employer - Red Hat - and I felt really flattered.
The most funny thing was that I had been asked to specify which keyboard layout I preferred. And I got a laptop in one box, and a separate keyboard for that laptop. I had to replace it by myself :). If I had known how much hassle such innocent wish can create, I would have chosen the default layout whatever it was.
I still have about 4 weeks before my real job is commencing, so I am playing right now with all things that I think I should know. One of them is calling native code.
And nothing has me annoyed me recently more than this ugly question mark in Unity launcher.
Quick searching revealed that there is a very easy thing to do (described f.e. here), and I can enjoy now beautiful Eclipse icon in the launcher
and in Lenses
Unfortunately SWT does not support that yet. On the other hand, Unity Launcher API is documented quite well, so I tried to create java bindings for that using the simplest approach JNA. JNA is a very powerful library that allows you to call native libraries without writing a single line in C.
So, I have downloaded the JNA libraries, put it into a regular Java Project, and wrote following interface:
Actually the two JNA libraries take care almost about everything. You do not need to worry about f.e. data conversion.
And the actual code that shows progress bar is:
What is worth noticing is the fact that you can access every launcher if you know the name of the *.desktop file. So you can run even a java program that will test if the integration is correct. I got the following effect:
There is still a lot of work to do. I need to remove dependency on JNA - it is licensed as LGPL - and therefore not welcome very warm by Eclipse Community. Then I will try to provide system taskbar for SWT - so it would integrate with Eclipse Jobs framework!
I hope to update you soon with results!