IDEA-63820 Allow "throws" to be placed on the new line without indent

1. Added ability to configure java formatter in a way to align 'throws' keyword to method start;
2. Corresponding tests are added;
This commit is contained in:
Denis Zhdanov
2011-01-25 11:18:23 +03:00
parent 09d0d80b04
commit 4e14607284
6 changed files with 28 additions and 1 deletions
@@ -215,7 +215,8 @@ public class JavaLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSett
" x--;\n" +
" } while (x > 10) \n" +
" }\n" +
" public static void test() { \n" +
" public static void test() \n" +
" throws Exception { \n" +
" foo.foo().bar(\"arg1\", \n" +
" \"arg2\"); \n" +
" } \n" +
@@ -823,6 +823,7 @@ public abstract class AbstractJavaBlock extends AbstractBlock implements JavaBlo
if (role == ChildRole.TYPE_PARAMETER_LIST) return defaultAlignment;
if (role == ChildRole.TYPE) return defaultAlignment;
if (role == ChildRole.NAME) return defaultAlignment;
if (role == ChildRole.THROWS_LIST && mySettings.ALIGN_THROWS_KEYWORD) return defaultAlignment;
return null;
}