mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 06:21:16 +07:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user