>One of the current weak points of the XML/HTML editors in the web tools project is the formatting. There are numerous bugs opened against the various components pointing out the weak points. I’ve even tried to help to suggest a refactoring of the current formatter to help make it a bit easier to test and debug.
However, the more I look at it, the more I think in some ways that the current method is re-inventing the wheel instead of leveraging existing implementations. Particularly Xerces has a serializer implementation that could be used as the basis for handling the formatting. To help describe and start to flesh out some requirements and ways this could be used, I’ve opened bug 268361. With a bit of pre-processing of annotations and markers in the editor, using XPath to obtain the nodes, the majority of the formatting work could be handled by existing implementations.
Anyways, if you are interested or have other ideas, please comment on bug 268361.