use of com.intellij.psi.formatter.xml.XmlCodeStyleSettings in project intellij-plugins by JetBrains.
the class FlexOptimizeImportsTest method testNoBlankLines2.
@JSTestOptions({ JSTestOption.WithFlexFacet })
public void testNoBlankLines2() throws Throwable {
JSTestUtils.addClassesToProject(myFixture, true, "com.Foo", "com.Bar", "com.Zzz");
final CodeStyleSettings styleSettings = CodeStyleSettingsManager.getSettings(getProject());
XmlCodeStyleSettings xmlSettings = styleSettings.getCustomSettings(XmlCodeStyleSettings.class);
boolean b = xmlSettings.XML_KEEP_WHITE_SPACES_INSIDE_CDATA;
try {
xmlSettings.XML_KEEP_WHITE_SPACES_INSIDE_CDATA = true;
runOptimizeAction(MXML_FILE_EXTENSION);
} finally {
xmlSettings.XML_KEEP_WHITE_SPACES_INSIDE_CDATA = b;
}
}
use of com.intellij.psi.formatter.xml.XmlCodeStyleSettings in project intellij-plugins by JetBrains.
the class FlexEditorTest method testInsertCdataOnGt4.
@JSTestOptions({ JSTestOption.WithFlexFacet })
public void testInsertCdataOnGt4() throws Exception {
final CodeStyleSettings codeSettings = CodeStyleSettingsManager.getSettings(getProject());
final XmlCodeStyleSettings xmlSettings = codeSettings.getCustomSettings(XmlCodeStyleSettings.class);
int currWsAroundCData = xmlSettings.XML_WHITE_SPACE_AROUND_CDATA;
xmlSettings.XML_WHITE_SPACE_AROUND_CDATA = XmlCodeStyleSettings.WS_AROUND_CDATA_NEW_LINES;
doGtTestWithJSSupportLoaderAndFlex();
xmlSettings.XML_WHITE_SPACE_AROUND_CDATA = currWsAroundCData;
}
use of com.intellij.psi.formatter.xml.XmlCodeStyleSettings in project intellij-plugins by JetBrains.
the class ActionScriptFormatterTest method testCDATAFormattingOptions2.
public void testCDATAFormattingOptions2() throws Exception {
final CodeStyleSettings settings = CodeStyleSettingsManager.getInstance(getProject()).getCurrentSettings();
final XmlCodeStyleSettings xmlSettings = settings.getCustomSettings(XmlCodeStyleSettings.class);
int currCDATAWhitespace = xmlSettings.XML_WHITE_SPACE_AROUND_CDATA;
xmlSettings.XML_WHITE_SPACE_AROUND_CDATA = XmlCodeStyleSettings.WS_AROUND_CDATA_NONE;
doTestFromFile("mxml");
xmlSettings.XML_WHITE_SPACE_AROUND_CDATA = currCDATAWhitespace;
}
use of com.intellij.psi.formatter.xml.XmlCodeStyleSettings in project android by JetBrains.
the class AndroidXmlFormatterTest method testLayout6.
public void testLayout6() throws Exception {
final XmlCodeStyleSettings xmlSettings = mySettings.getCustomSettings(XmlCodeStyleSettings.class);
xmlSettings.XML_ALIGN_ATTRIBUTES = false;
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");
}
use of com.intellij.psi.formatter.xml.XmlCodeStyleSettings in project android by JetBrains.
the class AndroidXmlFormatterTest method testLayout3.
public void testLayout3() throws Exception {
final XmlCodeStyleSettings xmlSettings = mySettings.getCustomSettings(XmlCodeStyleSettings.class);
xmlSettings.XML_ATTRIBUTE_WRAP = CommonCodeStyleSettings.DO_NOT_WRAP;
xmlSettings.XML_KEEP_BLANK_LINES = 0;
doTestLayout("layout1.xml");
}
Aggregations