tags:

views:

310

answers:

3

I'm using the PHP Eclipse. When a XML file is opened, Eclipse doesn't seem to recognize the xml, meaning that all looks black. When opened the XML file like "open with" and point to eclipse, it works fine.

What setting can be set to use that automatically so that eclipse recognizes it all the time?

Same goes for HTML files actually.

+2  A: 

In the eclipse Preferences you can configure which editor opens for a given file type. This setting can be found under Window->Preferences->General->Editors->File Associations.

boutta
+2  A: 

you have to install a plugin that can parse xml like xmlbuddy, or the eclipse WTP (Web Tools Platform).

I recommend Eclipse WTP because it comes standard with Eclipse and integrates nicely into the IDE. It's also trivial to install as you can see in this tutorial video: http://mirrors.ibiblio.org/pub/mirrors/eclipse/technology/phoenix/demos/install-wtp/install-wtp.html

success

nkr1pt
+1  A: 

The last editor you used for a file is remembered, so if you opened a particular XML file prior to installing an XML editor, you'll still end up in the plain Text Editor when you go to open the file again. Open the file with the XML editor once from the Open With context menu, and it should then "stick".

nitind