Sunday, January 15, 2012

You Love Unity You Love Eclipse, A Love Triangle

You love unity you love eclipse, opps that's a a love triangle isn't it. Expect some conflict...

http://unity.ubuntu.com/
I have been using eclipse for about ten years, in fact I love the technologies it has most people never heard of or used, like EMF, Teneo, RAP. I developed a number of eclipse plugins, did a whole project using eclipse technologies discarding J2EE altogether. So I love it *almost* as much as I love my wife.


On the other hand I was a keen KDE user for a long time. But change is always good. And recently I had been seeing this person here, that person there using the kid on the block - unity desktop thanks to ubuntu.


Unity attracted me with its simplicity (err, I think I am getting older) and giving a large domain to do actual work. Ask an eclipse user, every pixel counts! I also liked the idea of  "Keep in launcher". However this didn't allow me to start another eclipse from the launcher, rather I had to go all the way to the programs menu and type eclipse and run it - developers are lazy and that's why they became developers, I am one of them.

The solution was to create my own launcher that allows to launch a second, third etc. eclipse. For this create a launcher file in ~/.local/share/applications, i.e. ~/.local/share/applications/eclipse.desktop and add the following:

#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=/home/hceylan/Software/eclipse-modelling-3.7/plugins/org.eclipse.platform_3.7.1.v201109091335/eclipse48.png
Exec=/home/hceylan/Software/eclipse-modelling-3.7/eclipse
Name[en_US]=Eclipse Modelling
Name=Eclipse Modelling
Icon=/home/hceylan/Software/eclipse-modelling-3.7/plugins/org.eclipse.platform_3.7.0.v201106131736/eclipse48.png
X-Ayatana-Desktop-Shortcuts=New

[New Shortcut Group]
Name=Launch Another Eclipse
Exec=/home/hceylan/Software/eclipse-modelling-3.7/eclipse
TargetEnvironment=Unity

The trick here is having X-Ayatana-Desktop-Shortcuts and defining it in  [New Shortcut Group].


The next post will be about how I brought my plasmoids back and ask them to live in "peace with unity".



Live in unity!

4 comments:

  1. You can launch multiple copies of Eclipse using the middle/scroll button on your mouse.

    ReplyDelete
  2. The problem for me is that when I run eclipse from Dashboard or from terminal, it loads another entry in the launcher even though I added eclipse to usr/bin
    Do you know how to allow only one entry to be displayed in the launcher?

    http://hanynowsky.wordpress.com/2012/04/27/add-an-entry-for-netbeans-ide-in-ubuntu-12-04-unity-launcher/

    ReplyDelete
    Replies
    1. Hey Hanynowsky,

      I do not get that behaviour. Are you using the Eclipse that comes with Ubuntu or as manual installation.

      In my case it is manual installation and works like a charm.

      Delete

Enter your comment...