KT-21949 Please add a separate Color Scheme settings for properties synthesized from Java accessors (#1458)
This commit is contained in:
committed by
Dmitry Jemerov
parent
19c35ef48c
commit
3b212558e2
@@ -82,6 +82,7 @@ options.kotlin.attribute.descriptor.instance.property=Properties and Variables//
|
||||
options.kotlin.attribute.descriptor.package.property=Properties and Variables//Package-level property
|
||||
options.kotlin.attribute.descriptor.field=Properties and Variables//Backing field variable
|
||||
options.kotlin.attribute.descriptor.extension.property=Properties and Variables//Extension property
|
||||
options.kotlin.attribute.descriptor.synthetic.extension.property=Properties and Variables//Synthetic extension property
|
||||
options.kotlin.attribute.descriptor.dynamic.property=Properties and Variables//Dynamic property
|
||||
options.kotlin.attribute.descriptor.android.extensions.property=Properties and Variables//Android Extensions synthetic properties
|
||||
options.kotlin.attribute.descriptor.it=Parameters//Lambda expression default parameter
|
||||
|
||||
+1
@@ -70,6 +70,7 @@ public class KotlinHighlightingColors {
|
||||
public static final TextAttributesKey PACKAGE_PROPERTY = createTextAttributesKey("KOTLIN_PACKAGE_PROPERTY", DefaultLanguageHighlighterColors.STATIC_FIELD);
|
||||
public static final TextAttributesKey BACKING_FIELD_VARIABLE = createTextAttributesKey("KOTLIN_BACKING_FIELD_VARIABLE");
|
||||
public static final TextAttributesKey EXTENSION_PROPERTY = createTextAttributesKey("KOTLIN_EXTENSION_PROPERTY", DefaultLanguageHighlighterColors.STATIC_FIELD);
|
||||
public static final TextAttributesKey SYNTHETIC_EXTENSION_PROPERTY = createTextAttributesKey("KOTLIN_SYNTHETIC_EXTENSION_PROPERTY", EXTENSION_PROPERTY);
|
||||
public static final TextAttributesKey DYNAMIC_PROPERTY_CALL = createTextAttributesKey("KOTLIN_DYNAMIC_PROPERTY_CALL");
|
||||
public static final TextAttributesKey ANDROID_EXTENSIONS_PROPERTY_CALL = createTextAttributesKey("KOTLIN_ANDROID_EXTENSIONS_PROPERTY_CALL");
|
||||
|
||||
|
||||
+2
-1
@@ -28,6 +28,7 @@ import org.jetbrains.kotlin.psi.KtThisExpression
|
||||
import org.jetbrains.kotlin.resolve.BindingContext
|
||||
import org.jetbrains.kotlin.resolve.DescriptorUtils
|
||||
import org.jetbrains.kotlin.resolve.calls.tasks.isDynamic
|
||||
import org.jetbrains.kotlin.resolve.calls.tower.isSynthesized
|
||||
|
||||
internal class PropertiesHighlightingVisitor(holder: AnnotationHolder, bindingContext: BindingContext)
|
||||
: AfterAnalysisHighlightingVisitor(holder, bindingContext) {
|
||||
@@ -79,7 +80,7 @@ internal class PropertiesHighlightingVisitor(holder: AnnotationHolder, bindingCo
|
||||
DYNAMIC_PROPERTY_CALL
|
||||
|
||||
descriptor.extensionReceiverParameter != null ->
|
||||
EXTENSION_PROPERTY
|
||||
if (descriptor.isSynthesized) SYNTHETIC_EXTENSION_PROPERTY else EXTENSION_PROPERTY
|
||||
|
||||
DescriptorUtils.isStaticDeclaration(descriptor) ->
|
||||
PACKAGE_PROPERTY
|
||||
|
||||
Reference in New Issue
Block a user