Skip to content

Commit 4023f16

Browse files
committed
fix(documentation): use correct color for a field owner
1 parent baa2328 commit 4023f16

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/main/kotlin/org/tonstudio/tact/ide/documentation/documentation.kt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,24 @@ import org.tonstudio.tact.ide.documentation.DocumentationUtils.asStruct
3838
import org.tonstudio.tact.ide.documentation.DocumentationUtils.asTrait
3939
import org.tonstudio.tact.lang.TactSyntaxHighlighter
4040
import org.tonstudio.tact.lang.doc.psi.TactDocComment
41-
import org.tonstudio.tact.lang.psi.impl.TactPsiImplUtil.getInheritedTraitsBase
4241

4342
private fun StringBuilder.generateOwnerDpc(element: TactNamedElement) {
4443
val owner = element.getOwner() ?: return
4544

4645
val kind = owner.kindPresentation()
4746
val name = owner.name ?: ""
4847

48+
val nameColor = when (element) {
49+
is TactContractDeclaration -> asContract
50+
is TactTraitDeclaration -> asTrait
51+
is TactMessageDeclaration -> asMessage
52+
is TactStructDeclaration -> asStruct
53+
else -> asStruct
54+
}
55+
4956
colorize(kind, asKeyword)
5057
append(" ")
51-
colorize(name, asStruct)
58+
colorize(name, nameColor)
5259
append("\n")
5360
}
5461

0 commit comments

Comments
 (0)