Presentation (@NotNull ActionContext context) { Presentation presentation = Presentation.of(myCauseWithDepth.toString()); Segment segment = myCauseWithDepth.myCauseItem.getTargetSegment(); if (segment != null) { presentation = presentation.withHighlighting(TextRange.create(segment)); } return presentation; }