use of com.intellij.psi.formatter.xml.XmlCodeStyleSettings in project android by JetBrains.
the class AndroidXmlFormatterTest method testManifest3.
public void testManifest3() throws Exception {
deleteManifest();
final XmlCodeStyleSettings xmlSettings = mySettings.getCustomSettings(XmlCodeStyleSettings.class);
xmlSettings.XML_ATTRIBUTE_WRAP = CommonCodeStyleSettings.DO_NOT_WRAP;
xmlSettings.XML_KEEP_BLANK_LINES = 0;
doTestManifest("manifest1.xml");
}
use of com.intellij.psi.formatter.xml.XmlCodeStyleSettings in project android by JetBrains.
the class AndroidXmlFormatterTest method testManifest2.
public void testManifest2() throws Exception {
deleteManifest();
final XmlCodeStyleSettings xmlSettings = mySettings.getCustomSettings(XmlCodeStyleSettings.class);
xmlSettings.XML_ATTRIBUTE_WRAP = CommonCodeStyleSettings.DO_NOT_WRAP;
xmlSettings.XML_ALIGN_ATTRIBUTES = true;
xmlSettings.XML_SPACE_INSIDE_EMPTY_TAG = false;
mySettings.getIndentOptions(XmlFileType.INSTANCE).CONTINUATION_INDENT_SIZE = 8;
doTestManifest("manifest1.xml");
}
use of com.intellij.psi.formatter.xml.XmlCodeStyleSettings in project android by JetBrains.
the class AndroidXmlFormatterTest method testLayout2.
public void testLayout2() throws Exception {
final XmlCodeStyleSettings xmlSettings = mySettings.getCustomSettings(XmlCodeStyleSettings.class);
xmlSettings.XML_ALIGN_ATTRIBUTES = true;
xmlSettings.XML_SPACE_INSIDE_EMPTY_TAG = false;
xmlSettings.XML_KEEP_LINE_BREAKS = true;
mySettings.getIndentOptions(XmlFileType.INSTANCE).CONTINUATION_INDENT_SIZE = 8;
doTestLayout("layout1.xml");
}
use of com.intellij.psi.formatter.xml.XmlCodeStyleSettings in project android by JetBrains.
the class AndroidXmlFormatterTest method testManifest4.
public void testManifest4() throws Exception {
deleteManifest();
final XmlCodeStyleSettings xmlSettings = mySettings.getCustomSettings(XmlCodeStyleSettings.class);
xmlSettings.XML_ALIGN_ATTRIBUTES = true;
final AndroidXmlCodeStyleSettings androidSettings = mySettings.getCustomSettings(AndroidXmlCodeStyleSettings.class);
androidSettings.MANIFEST_SETTINGS.INSERT_LINE_BREAK_BEFORE_FIRST_ATTRIBUTE = false;
doTestManifest("manifest1.xml");
}
use of com.intellij.psi.formatter.xml.XmlCodeStyleSettings in project android by JetBrains.
the class AndroidXmlFormatterTest method testLayout9.
public void testLayout9() throws Exception {
// Regression test for https://code.google.com/p/android/issues/detail?id=177858
final XmlCodeStyleSettings xmlSettings = mySettings.getCustomSettings(XmlCodeStyleSettings.class);
xmlSettings.XML_ALIGN_ATTRIBUTES = true;
final AndroidXmlCodeStyleSettings androidSettings = mySettings.getCustomSettings(AndroidXmlCodeStyleSettings.class);
androidSettings.LAYOUT_SETTINGS.INSERT_LINE_BREAK_BEFORE_FIRST_ATTRIBUTE = true;
androidSettings.LAYOUT_SETTINGS.INSERT_LINE_BREAK_BEFORE_NAMESPACE_DECLARATION = true;
androidSettings.LAYOUT_SETTINGS.INSERT_LINE_BREAK_AFTER_LAST_ATTRIBUTE = true;
doTestLayout("layout1.xml");
}
Aggregations