use of com.intellij.psi.codeStyle.CodeStyleSettings in project intellij-community by JetBrains.
the class JoinLinesTest method testWrongWrapping.
public void testWrongWrapping() throws Exception {
CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
settings.setDefaultRightMargin(80);
settings.CALL_PARAMETERS_WRAP = CommonCodeStyleSettings.WRAP_AS_NEEDED;
settings.ALIGN_MULTILINE_PARAMETERS_IN_CALLS = true;
doTest();
}
use of com.intellij.psi.codeStyle.CodeStyleSettings in project intellij-community by JetBrains.
the class JoinLinesTest method testReformatInsertsNewlines.
public void testReformatInsertsNewlines() throws Exception {
CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
final Element root = new Element("fake");
settings.writeExternal(root);
try {
settings.getIndentOptions(StdFileTypes.JAVA).USE_TAB_CHARACTER = true;
settings.getIndentOptions(StdFileTypes.JAVA).SMART_TABS = true;
settings.IF_BRACE_FORCE = CommonCodeStyleSettings.FORCE_BRACES_ALWAYS;
settings.METHOD_BRACE_STYLE = CommonCodeStyleSettings.NEXT_LINE;
doTest();
} finally {
settings.readExternal(root);
}
}
use of com.intellij.psi.codeStyle.CodeStyleSettings in project intellij-community by JetBrains.
the class JoinLinesTest method testSCR3493.
public void testSCR3493() throws Exception {
CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
boolean use_tab_character = settings.useTabCharacter(null);
boolean smart_tabs = settings.isSmartTabs(null);
try {
settings.getIndentOptions(StdFileTypes.JAVA).USE_TAB_CHARACTER = true;
settings.getIndentOptions(StdFileTypes.JAVA).SMART_TABS = true;
doTest();
} finally {
settings.getIndentOptions(StdFileTypes.JAVA).USE_TAB_CHARACTER = use_tab_character;
settings.getIndentOptions(StdFileTypes.JAVA).SMART_TABS = smart_tabs;
}
}
use of com.intellij.psi.codeStyle.CodeStyleSettings in project intellij-community by JetBrains.
the class JoinLinesTest method testSCR3493c.
public void testSCR3493c() throws Exception {
CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
boolean use_tab_character = settings.useTabCharacter(null);
boolean smart_tabs = settings.isSmartTabs(null);
try {
settings.getIndentOptions(StdFileTypes.JAVA).USE_TAB_CHARACTER = true;
settings.getIndentOptions(StdFileTypes.JAVA).SMART_TABS = true;
doTest();
} finally {
settings.getIndentOptions(StdFileTypes.JAVA).USE_TAB_CHARACTER = use_tab_character;
settings.getIndentOptions(StdFileTypes.JAVA).SMART_TABS = smart_tabs;
}
}
use of com.intellij.psi.codeStyle.CodeStyleSettings in project intellij-community by JetBrains.
the class JoinLinesTest method testSCR3493b.
public void testSCR3493b() throws Exception {
CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
boolean use_tab_character = settings.useTabCharacter(null);
boolean smart_tabs = settings.isSmartTabs(null);
try {
settings.getIndentOptions(StdFileTypes.JAVA).USE_TAB_CHARACTER = true;
settings.getIndentOptions(StdFileTypes.JAVA).SMART_TABS = true;
doTest();
} finally {
settings.getIndentOptions(StdFileTypes.JAVA).USE_TAB_CHARACTER = use_tab_character;
settings.getIndentOptions(StdFileTypes.JAVA).SMART_TABS = smart_tabs;
}
}
Aggregations