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:
Zalim Bashorov
2013-06-11 13:49:09 +04:00
parent 6e96ff4b11
commit 03b039b302
2 changed files with 4 additions and 3 deletions
@@ -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;
@@ -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";
}
}