use of com.intellij.psi.codeStyle.JavaCodeStyleSettings in project intellij-community by JetBrains.
the class JavaEnterActionTest method testEnterInsideAnnotationParameters.
public void testEnterInsideAnnotationParameters() throws IOException {
CodeStyleSettings settings = getCodeStyleSettings();
JavaCodeStyleSettings javaSettings = settings.getCustomSettings(JavaCodeStyleSettings.class);
javaSettings.ALIGN_MULTILINE_ANNOTATION_PARAMETERS = true;
setCodeStyleSettings(settings);
doTextTest("java", "public class T {\n" + "\n" + " @Configurable(order = 25, \n" + " validator = BigDecimalPercentValidator.class, <caret>)\n" + " public void run() {\n" + " }\n" + " \n" + " \n" + "}", "public class T {\n" + "\n" + " @Configurable(order = 25, \n" + " validator = BigDecimalPercentValidator.class, \n" + " <caret>)\n" + " public void run() {\n" + " }\n" + " \n" + " \n" + "}");
doTextTest("java", "public class T {\n" + "\n" + " @Configurable(order = 25, \n" + " validator = BigDecimalPercentValidator.class, <caret>\n" + " )\n" + " public void run() {\n" + " }\n" + " \n" + " \n" + "}", "public class T {\n" + "\n" + " @Configurable(order = 25, \n" + " validator = BigDecimalPercentValidator.class, \n" + " <caret>\n" + " )\n" + " public void run() {\n" + " }\n" + " \n" + " \n" + "}");
}
use of com.intellij.psi.codeStyle.JavaCodeStyleSettings in project intellij-community by JetBrains.
the class JavaEnterActionTest method testEnterInsideAnnotationParameters_AfterNameValuePairBeforeLparenth.
public void testEnterInsideAnnotationParameters_AfterNameValuePairBeforeLparenth() throws IOException {
CodeStyleSettings settings = getCodeStyleSettings();
JavaCodeStyleSettings javaSettings = settings.getCustomSettings(JavaCodeStyleSettings.class);
javaSettings.ALIGN_MULTILINE_ANNOTATION_PARAMETERS = true;
setCodeStyleSettings(settings);
doTextTest("java", "public class T {\n" + "\n" + " @Configurable(order = 25, \n" + " validator = BigDecimalPercentValidator.class<caret>)\n" + " public void run() {\n" + " }\n" + " \n" + " \n" + "}", "public class T {\n" + "\n" + " @Configurable(order = 25, \n" + " validator = BigDecimalPercentValidator.class\n" + " <caret>)\n" + " public void run() {\n" + " }\n" + " \n" + " \n" + "}");
}
use of com.intellij.psi.codeStyle.JavaCodeStyleSettings in project intellij-community by JetBrains.
the class UnnecessaryFullyQualifiedNameInspectionTest method doTestWithFqnInJavadocSetting.
private void doTestWithFqnInJavadocSetting(String dirPath, int classNamesInJavadoc) {
final CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
JavaCodeStyleSettings javaSettings = settings.getCustomSettings(JavaCodeStyleSettings.class);
int oldClassNamesInJavadoc = javaSettings.CLASS_NAMES_IN_JAVADOC;
try {
javaSettings.CLASS_NAMES_IN_JAVADOC = classNamesInJavadoc;
doTest(dirPath, new UnnecessaryFullyQualifiedNameInspection());
} finally {
javaSettings.CLASS_NAMES_IN_JAVADOC = oldClassNamesInJavadoc;
}
}
Aggregations