Search code examples
phpcsseditorubuntu-12.04eclipse-pdt

Make eclipse pdt default editor for php, css etc. files in ubuntu 12.04?


I downloaded Eclipse php recently. When i want to open a css or php file it doesn't show option for eclipse, not even in the other applications list.

I want to set Eclipse as my default editor to handle such kind of files.


Solution

  • I posted this question more than a month ago and i have found an answer to it, Here is the eclipse.desktop file which needs to be added in the /usr/share/applications directory

    [Desktop Entry]
    Encoding=UTF-8
    Name=Eclipse
    Comment=Eclipse IDE
    Exec=eclipse %f
    Icon=/opt/eclipse/icon.xpm
    Terminal=false
    Type=Application
    Categories=GNOME;Application;Development;
    StartupNotify=true
    

    Adding %f after 'eclipse' added eclipse in the list of 'other applications' and then i 'set it as default' for css files.