Fixed the default Kotlin CodeStyle.
By default add space before colon when it placed between types (inheritance, type constraint, type parameter). Added example of inheritance to the Sample.
This commit is contained in:
@@ -28,7 +28,7 @@ public class JetCodeStyleSettings extends CustomCodeStyleSettings {
|
||||
public boolean SPACE_BEFORE_TYPE_COLON = false;
|
||||
public boolean SPACE_AFTER_TYPE_COLON = true;
|
||||
|
||||
public boolean SPACE_BEFORE_EXTEND_COLON = false;
|
||||
public boolean SPACE_BEFORE_EXTEND_COLON = true;
|
||||
public boolean SPACE_AFTER_EXTEND_COLON = true;
|
||||
|
||||
public boolean INSERT_WHITESPACES_IN_SIMPLE_ONE_LINE_METHOD = true;
|
||||
|
||||
+3
-2
@@ -57,7 +57,7 @@ public class JetLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSetti
|
||||
"}";
|
||||
default:
|
||||
return
|
||||
"class Some {\n" +
|
||||
"open class Some {\n" +
|
||||
" private val f = {(a: Int)->a*2}\n" +
|
||||
" fun foo() : Int {\n" +
|
||||
" val test : Int = 12\n" +
|
||||
@@ -66,7 +66,8 @@ public class JetLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSetti
|
||||
" private fun <T>foo2():Int where T : List<T> {\n" +
|
||||
" return 0\n" +
|
||||
" }\n" +
|
||||
"}";
|
||||
"}\n\n" +
|
||||
"class AnotherClass<T:Any>: Some";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user