5

Every time I double-click on an XML file, a spreadsheet thing opens. I find it very annoying, and I have to open XML files with the text editor in Eclipse. It is not color-coded like its counterpart in Dreamweaver.

How can I configure my computer so that, when I double-click on an XML file, I get a color-coded editor in Eclipse?

Pops
  • 30,199
  • 37
  • 136
  • 151
  • possible duplicate of [How do I view xml in Eclipse with simple syntax highlighting?](http://stackoverflow.com/questions/4590119/how-do-i-view-xml-in-eclipse-with-simple-syntax-highlighting) – Troyseph Oct 24 '14 at 10:22

4 Answers4

2

Try setting the file associations in the Eclipse settings > General > Editors > File associations

Aleksi Yrttiaho
  • 8,266
  • 29
  • 36
  • Associate it with what? The XML editor is a TableTree, and like the OP I would like to have a colour-coded text editor, like the one used fro html/java/cpp files... not just a plain text editor. – Troyseph Oct 24 '14 at 10:13
  • 1
    Check out this answer for a more in depth description: http://stackoverflow.com/questions/4590119/how-do-i-view-xml-in-eclipse-with-simple-syntax-highlighting – Troyseph Oct 24 '14 at 10:17
  • The content type or file type should be associated with the XML editor or similar editor. Your Eclipse installation may or may not include an XML editor. If the XML editor is not included then you can install one from the update site of your Eclipse version e.g. http://download.eclipse.org/releases/luna/. The gist of the original question is how to set the default editor for given file type. – Aleksi Yrttiaho Oct 24 '14 at 16:38
  • I had the editor installed, and it was opening XML files in it, however I believe the main confusion people are having is that at the editor opens by default in a TableTree mode and there are tabs at the bottom to switch between that view and the highlighted text view. – Troyseph Oct 25 '14 at 11:03
2

Have you checked the bottom of the editor pane for tabs labelled Design and Source? Maybe you just need to flip to another page in the editor.

nitind
  • 19,089
  • 4
  • 34
  • 43
0

Go to Window -> Preferences and then type in File Associations in the quick search box on the left, browse for the *.xml file type and mark as default the editor you want to use to open the file.

JohnP
  • 49,507
  • 13
  • 108
  • 140
0

you can associate the .xml file type with any program you want to be opened with. as iam associate it to notepad.

you can do it from you window browser. go to tools>folder options and choose file types tab. scroll down to find xml type and then click the change button to browse the program you like.