Search in sources :

Example 21 with XmlCodeStyleSettings

use of com.intellij.psi.formatter.xml.XmlCodeStyleSettings in project android by JetBrains.

the class AndroidXmlFormatterTest method testManifest7.

public void testManifest7() throws Exception {
    deleteManifest();
    final XmlCodeStyleSettings xmlSettings = mySettings.getCustomSettings(XmlCodeStyleSettings.class);
    xmlSettings.XML_ATTRIBUTE_WRAP = CommonCodeStyleSettings.WRAP_ON_EVERY_ITEM;
    xmlSettings.XML_ALIGN_ATTRIBUTES = true;
    xmlSettings.XML_SPACE_INSIDE_EMPTY_TAG = false;
    mySettings.getIndentOptions(XmlFileType.INSTANCE).CONTINUATION_INDENT_SIZE = 8;
    doTestManifest("manifest1.xml");
}
Also used : XmlCodeStyleSettings(com.intellij.psi.formatter.xml.XmlCodeStyleSettings) AndroidXmlCodeStyleSettings(org.jetbrains.android.formatter.AndroidXmlCodeStyleSettings)

Example 22 with XmlCodeStyleSettings

use of com.intellij.psi.formatter.xml.XmlCodeStyleSettings 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 23 with XmlCodeStyleSettings

use of com.intellij.psi.formatter.xml.XmlCodeStyleSettings 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)

Aggregations

XmlCodeStyleSettings (com.intellij.psi.formatter.xml.XmlCodeStyleSettings)23 AndroidXmlCodeStyleSettings (org.jetbrains.android.formatter.AndroidXmlCodeStyleSettings)10 CodeStyleSettings (com.intellij.psi.codeStyle.CodeStyleSettings)9 ECMA4CodeStyleSettings (com.intellij.lang.javascript.formatter.ECMA4CodeStyleSettings)6 JSCodeStyleSettings (com.intellij.lang.javascript.formatter.JSCodeStyleSettings)6 CommonCodeStyleSettings (com.intellij.psi.codeStyle.CommonCodeStyleSettings)5 JSTestOptions (com.intellij.lang.javascript.JSTestOptions)2 IntentionAction (com.intellij.codeInsight.intention.IntentionAction)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 ArrangementGroupingRule (com.intellij.psi.codeStyle.arrangement.group.ArrangementGroupingRule)1 StdArrangementMatchRule (com.intellij.psi.codeStyle.arrangement.match.StdArrangementMatchRule)1 ArrayList (java.util.ArrayList)1 ChooseFileIntentionAction (org.jetbrains.idea.maven.dom.intentions.ChooseFileIntentionAction)1 MavenDomDependency (org.jetbrains.idea.maven.dom.model.MavenDomDependency)1 MavenDomProjectModel (org.jetbrains.idea.maven.dom.model.MavenDomProjectModel)1