use of org.eclipse.wst.xml.core.internal.formatter.XMLFormattingPreferences in project webtools.sourceediting by eclipse.
the class TestPartitionFormatterXML method testPreserveFormatDTD.
public void testPreserveFormatDTD() throws UnsupportedEncodingException, IOException, CoreException {
// results are different than old formatter
// Bug [228495] - Result should have blank lines cleared
XMLFormattingPreferences prefs = new XMLFormattingPreferences();
prefs.setClearAllBlankLines(true);
formatAndAssertEquals("testfiles/xml/xml-space-preserve-dtd.xml", "testfiles/xml/xml-space-preserve-dtd-newfmt.xml", prefs);
}
use of org.eclipse.wst.xml.core.internal.formatter.XMLFormattingPreferences in project webtools.sourceediting by eclipse.
the class TestPartitionFormatterXML method testKeepEmptyLines.
public void testKeepEmptyLines() throws UnsupportedEncodingException, IOException, CoreException {
// Bug 228495
// Test that formatting keeps empty lines
XMLFormattingPreferences prefs = new XMLFormattingPreferences();
prefs.setClearAllBlankLines(false);
formatAndAssertEquals("testfiles/xml/xml-keep-blank-lines.xml", "testfiles/xml/xml-keep-blank-lines-fmt.xml", prefs);
}
use of org.eclipse.wst.xml.core.internal.formatter.XMLFormattingPreferences in project webtools.sourceediting by eclipse.
the class TestPartitionFormatterXML method testBug353451.
/**
* Tests the scenario where two regions are capable of formatting the same whitespace. See
* https://bugs.eclipse.org/353451
*/
public void testBug353451() throws UnsupportedEncodingException, IOException, CoreException {
XMLFormattingPreferences prefs = new XMLFormattingPreferences();
prefs.setClearAllBlankLines(true);
formatAndAssertEquals("testfiles/xml/bug353451.xml", "testfiles/xml/bug353451-fmt.xml", prefs);
}
use of org.eclipse.wst.xml.core.internal.formatter.XMLFormattingPreferences in project webtools.sourceediting by eclipse.
the class TestPartitionFormatterXML method testSimpleXml.
public void testSimpleXml() throws UnsupportedEncodingException, IOException, CoreException {
// results are different than old formatter
// Bug [228495] - Result should have blank lines cleared
XMLFormattingPreferences prefs = new XMLFormattingPreferences();
prefs.setClearAllBlankLines(true);
formatAndAssertEquals("testfiles/xml/simple-standalone.xml", "testfiles/xml/simple-standalone-newfmt.xml", prefs);
}
use of org.eclipse.wst.xml.core.internal.formatter.XMLFormattingPreferences in project webtools.sourceediting by eclipse.
the class TestPartitionFormatterXML method testClearBlankLines.
public void testClearBlankLines() throws UnsupportedEncodingException, IOException, CoreException {
// Bug 228495
// Test that formatting clears empty lines
XMLFormattingPreferences prefs = new XMLFormattingPreferences();
prefs.setClearAllBlankLines(true);
formatAndAssertEquals("testfiles/xml/xml-keep-blank-lines.xml", "testfiles/xml/xml-clear-blank-lines-fmt.xml", prefs);
}
Aggregations