Slicer: underline element range in addition to bold font (better do it in IDEA code)
This commit is contained in:
@@ -20,6 +20,7 @@ import org.jetbrains.kotlin.renderer.DescriptorRenderer
|
|||||||
import org.jetbrains.kotlin.renderer.render
|
import org.jetbrains.kotlin.renderer.render
|
||||||
import org.jetbrains.kotlin.resolve.descriptorUtil.isCompanionObject
|
import org.jetbrains.kotlin.resolve.descriptorUtil.isCompanionObject
|
||||||
import org.jetbrains.kotlin.resolve.descriptorUtil.isExtension
|
import org.jetbrains.kotlin.resolve.descriptorUtil.isExtension
|
||||||
|
import java.awt.Font
|
||||||
|
|
||||||
// Based on com.intellij.slicer.SliceUsageCellRenderer
|
// Based on com.intellij.slicer.SliceUsageCellRenderer
|
||||||
object KotlinSliceUsageCellRenderer : SliceUsageCellRendererBase() {
|
object KotlinSliceUsageCellRenderer : SliceUsageCellRendererBase() {
|
||||||
@@ -39,6 +40,10 @@ object KotlinSliceUsageCellRenderer : SliceUsageCellRendererBase() {
|
|||||||
attributes = attributes.derive(attributes.style, JBColor.LIGHT_GRAY, attributes.bgColor, attributes.waveColor)
|
attributes = attributes.derive(attributes.style, JBColor.LIGHT_GRAY, attributes.bgColor, attributes.waveColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (attributes.fontStyle == Font.BOLD) {
|
||||||
|
attributes = attributes.derive(attributes.style or SimpleTextAttributes.STYLE_UNDERLINE, null, null, null)
|
||||||
|
}
|
||||||
|
|
||||||
append(textChunk.text, attributes)
|
append(textChunk.text, attributes)
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
append(FontUtil.spaceAndThinSpace())
|
append(FontUtil.spaceAndThinSpace())
|
||||||
|
|||||||
Reference in New Issue
Block a user