Search code examples
xmleclipsestyles

How to open a file in Eclipse like it was a XML


I'm programming on Eclipse Enviroment and I'm working with a special files with a special extension. They are a cutom XML files in the company where I'm working. Eclipse doesm't recognize this types of files and they are show like they was plain text. How can I open that files with the XML style?

Thanks!


Solution

  • For a single file you can right click on the file and select 'Open With > XML Editor'. Eclipse remembers which editor you use so you only have to do this once. If 'XML Editor' is not in the list, select 'Other...' and select it from the list displayed in the dialog.

    You can also set up a file association by opening the Preferences and going to 'General > Editors > File associations. Here you can add your file extension and select the editor to use.