3

I greatly appreciate the functionality of Eclipse to apply code formatter to all projects in workspace, however it works only for Java files, I'd like now to apply formatter to all XML files. And there are a pack of them: pom's, Spring configs etc.

I've found no build-in format that could do the task for all selected projects. So, my question, do you know an external plugin that would do the task (possibly with own format settings that could be exported/imported)? Or I have missed an existing option?

3
  • It should just be in the Source menu of the file/folder/whatever. Commented May 31, 2012 at 4:59
  • Source->format works when on single xml file, when on project/group of projects, it formats only java code Commented May 31, 2012 at 7:17
  • did you got answer to your question? Commented Apr 20, 2015 at 9:33

1 Answer 1

8

Here's what I did: File Search for all files with file name pattern *.xml. In Search results, select all and then right click, Source -> Format. I'm on Eclipse Luna 4.4.2, not sure how far back this feature goes.

Sign up to request clarification or add additional context in comments.

2 Comments

Right-click a folder with xml files and select Source -> Format works also.
@bjmi That's not what OP asked. His xml files are spread across multiple projects (and probably across multiple folders within each project), and he wants a single manipulation to format all of them. What you suggests requires to be done on each of the (potentially numerous) folders...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.