KT-2333 highlight class fields as method param default value

#KT-2333 fixed
This commit is contained in:
Evgeny Gerashchenko
2012-07-21 21:08:29 +04:00
parent a9564e7580
commit 7c95c0a617
2 changed files with 4 additions and 0 deletions
@@ -68,6 +68,8 @@ class PropertiesHighlightingVisitor extends AfterAnalysisHighlightingVisitor {
Boolean backingFieldRequired = bindingContext.get(BindingContext.BACKING_FIELD_REQUIRED, propertyDescriptor);
highlightProperty(nameIdentifier, propertyDescriptor, Boolean.TRUE.equals(backingFieldRequired));
}
super.visitParameter(parameter);
}
private void highlightProperty(@NotNull PsiElement elementToHighlight,
+2
View File
@@ -15,6 +15,8 @@ class <info textAttributesKey="KOTLIN_CLASS">Foo</info>(val <info textAttributes
<info textAttributesKey="KOTLIN_PARAMETER">b</info>
}
fun <info textAttributesKey="KOTLIN_FUNCTION_DECLARATION">f</info>(<info textAttributesKey="KOTLIN_PARAMETER">p</info> : <info textAttributesKey="KOTLIN_CLASS">Int</info> = <info textAttributesKey="KOTLIN_INSTANCE_PROPERTY">a</info>) {}
var <info textAttributesKey="KOTLIN_MUTABLE_VARIABLE"><info textAttributesKey="KOTLIN_INSTANCE_PROPERTY">v</info></info> : <info textAttributesKey="KOTLIN_CLASS">Int</info>
<info textAttributesKey="KOTLIN_KEYWORD">get</info>() {
return 1;