Search in sources :

Example 11 with AndroidXmlCodeStyleSettings

use of org.jetbrains.android.formatter.AndroidXmlCodeStyleSettings in project android by JetBrains.

the class AndroidXmlFormatterTest method testValues5.

public void testValues5() throws Exception {
    final AndroidXmlCodeStyleSettings androidSettings = mySettings.getCustomSettings(AndroidXmlCodeStyleSettings.class);
    androidSettings.VALUE_RESOURCE_FILE_SETTINGS.INSERT_LINE_BREAKS_AROUND_STYLE = false;
    doTestValues("values4.xml");
}
Also used : AndroidXmlCodeStyleSettings(org.jetbrains.android.formatter.AndroidXmlCodeStyleSettings)

Example 12 with AndroidXmlCodeStyleSettings

use of org.jetbrains.android.formatter.AndroidXmlCodeStyleSettings in project android by JetBrains.

the class AndroidXmlFormatterTest method testLayout7.

public void testLayout7() throws Exception {
    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_AFTER_LAST_ATTRIBUTE = true;
    doTestLayout("layout1.xml");
}
Also used : AndroidXmlCodeStyleSettings(org.jetbrains.android.formatter.AndroidXmlCodeStyleSettings) XmlCodeStyleSettings(com.intellij.psi.formatter.xml.XmlCodeStyleSettings) AndroidXmlCodeStyleSettings(org.jetbrains.android.formatter.AndroidXmlCodeStyleSettings)

Example 13 with AndroidXmlCodeStyleSettings

use of org.jetbrains.android.formatter.AndroidXmlCodeStyleSettings in project android by JetBrains.

the class AndroidXmlFormatterTest method testLayout4.

public void testLayout4() throws Exception {
    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 = false;
    androidSettings.LAYOUT_SETTINGS.INSERT_BLANK_LINE_BEFORE_TAG = false;
    doTestLayout("layout1.xml");
}
Also used : AndroidXmlCodeStyleSettings(org.jetbrains.android.formatter.AndroidXmlCodeStyleSettings) XmlCodeStyleSettings(com.intellij.psi.formatter.xml.XmlCodeStyleSettings) AndroidXmlCodeStyleSettings(org.jetbrains.android.formatter.AndroidXmlCodeStyleSettings)

Example 14 with AndroidXmlCodeStyleSettings

use of org.jetbrains.android.formatter.AndroidXmlCodeStyleSettings in project android by JetBrains.

the class AndroidXmlFormatterTest method testLayout5.

public void testLayout5() throws Exception {
    final AndroidXmlCodeStyleSettings androidSettings = mySettings.getCustomSettings(AndroidXmlCodeStyleSettings.class);
    androidSettings.LAYOUT_SETTINGS.WRAP_ATTRIBUTES = CommonCodeStyleSettings.DO_NOT_WRAP;
    doTestLayout("layout1.xml");
}
Also used : AndroidXmlCodeStyleSettings(org.jetbrains.android.formatter.AndroidXmlCodeStyleSettings)

Aggregations

AndroidXmlCodeStyleSettings (org.jetbrains.android.formatter.AndroidXmlCodeStyleSettings)14 XmlCodeStyleSettings (com.intellij.psi.formatter.xml.XmlCodeStyleSettings)5