Hello,
I am trying to write a custom Formatter for Xml-Files.
My goal is to align the properties in each line.
<Tag1 Property1=".."
Property2=".."/>
<Tag1 Property1=".."
Property2=".."/>
So in this example I want to Format the first tag into the second.
I have already created a custom TextFormatter.
As I purchased the Web-Languages Plugin, I want to use the prewritten XmlTextFormatter.
public class MyFormatter: ITextFormatter
{
private XmlTextFormatter xmlFormatter;
//...
public void Format(TextSnapshotRange snapshotRange)
{
xmlFormatter.Format(snapshotRange);
//my textchanges
}
There is no problem, if I leave out the xmlFormatter.Format. It behaves as I wish.
However if I try to change the snapshot after applying the formatter the document gets ripped apart near the changes I apply.
I assume, that the offsets/line positions of the snapshot are somehow faulty, after using the xmlFormatter.
Is there a way to restore a state, where I can continue formatting the file?
Edit: I gave you the wrong version. I am using: v13.2.0590 on 09.09.2013
Thank you very much and kind regards,
Younes Müller
[Modified 7 years ago]