Aptana 3 is a breath of fresh air compared to to my highly customised GEdit install. Don’t get me wrong GEdit is a great text editor but I prefer the snuggly embrace of an IDE rather than using lots of separate tools. The only problem with Aptana so far, on my Fedora 16 install at least, is that it doesn’t show up in the Gnome menu and it isn’t in the “Open With” list of applications.
Anyway, rather than trying to bodge the fine work the Gnome developers had done, I found out that you can just add a new .desktop file into your /usr/share/applications/ folder. The .desktop file defines everything Gnome shell needs to display your application in the menu (or in this case, Appcelerator’s applicaiton).
Listed below is my Aptana entry. I don’t have localisation entries in, however its quite easy to do that, just look at another application’s .desktop file and you’ll see the language code in square brackets after each key name i.e. Name[fr]=Aptana Studio 3.
[Desktop Entry] Name=Aptana Studio 3 GenericName=Text Editor Comment=Light weight web development version of Eclipse Icon=/opt/aptana-studio-3/icon.xpm Exec=/opt/aptana-studio-3/studio3 %U Terminal=false Type=Application Categories=Development;IDE;PHP StartupNotify=true
One of the key things here is the %U after the executable name. Adding this allows your application to be the target of “Open With”.
Once saved your application should appear in the menu straight away and in also be available for open with requests.
UPDATE: The following URL shows in depth information about what you can pass to the executable: