package Ġcom . int elligent comments . ui . comments . model . content . list Ċ Ċ import Ġcom . int elligent comments . core . domain . core . List Content Segment Ċ import Ġcom . int elligent comments . core . domain . core . ListItem Ċ import Ġcom . int elligent comments . ui . comments . model . Expand able Ui Model Ċ import Ġcom . int elligent comments . ui . comments . model . Ui Interaction Model Base Ċ import Ġcom . int elligent comments . ui . comments . model . content . Content Segment Ui Model Ċ import Ġcom . int elligent comments . ui . comments . model . content . Content Segments Ui Model Ċ import Ġcom . int elligent comments . ui . comments . render ers . NotSupported For Rendering Error Ċ import Ġcom . int elligent comments . ui . comments . render ers . segments . List Segment Renderer Ċ import Ġcom . int elligent comments . ui . core . Renderer Ċ import Ġcom . int elligent comments . ui . util . Hash Util Ċ import Ġcom . intellij . openapi . project . Project Ċ Ċ class ĠList Content Segment Ui Model ( ĊĠ Ġproject : ĠProject , ĊĠ Ġparent : ĠUi Interaction Model Base ?, ĊĠ Ġlist Segment : ĠList Content Segment Ċ ) Ġ: ĠContent Segment Ui Model ( project , Ġparent ), ĠExpand able Ui Model Ġ{ ĊĠ Ġprivate Ġval Ġheader Ġ= Ġlist Segment . header ĊĠ Ġval Ġheader Ui Model Ġ= Ġif Ġ( header Ġ== Ġnull ) Ġnull Ġelse Ġ{ ĊĠĠĠ ĠList Content Segment Header Ui Model ( project , Ġthis , Ġheader ) ĊĠ Ġ} ĊĊĠ Ġval Ġlist Kind Ġ= Ġlist Segment . list Kind ĊĠ Ġval Ġitems Ġ= Ġlist Segment . content . map Ġ{ ĠListItem Ui Model ( project , Ġthis , Ġit ) Ġ} ĊĊĠ Ġoverride Ġvar Ġis Expanded Ġ= Ġtrue ĊĊĠ Ġoverride Ġfun Ġcalculate State Hash (): ĠInt Ġ{ ĊĠĠĠ Ġval Ġheader Hash Ġ= Ġheader Ui Model ?. calculate State Hash () Ġ?: Ġ 1 ĊĠĠĠ Ġreturn ĠHash Util . hashCode ( header Hash , ĠHash Util . calculate Hash For ( items ) Ġ{ Ġit . calculate State Hash () Ġ}, Ġis Expanded . hashCode ()) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġdump Model (): ĠString Ġ{ ĊĠĠĠ Ġreturn Ġ"${ super . dump Model ()} :: ${ header Ui Model ?. dump Model ()} :: ${ list Kind }: Ġ\ n {\ n ${ items . join ToString ("\ n ") Ġ{ Ġit . dump Model () Ġ}} \ n }" ĊĠ Ġ} ĊĠ Ġoverride Ġfun Ġcreate Renderer (): ĠRenderer Ġ= ĠList Segment Renderer ( this ) Ċ } Ċ Ċ class ĠListItem Ui Model ( ĊĠ Ġproject : ĠProject , ĊĠ Ġparent : ĠUi Interaction Model Base ?, ĊĠ Ġlist Item : ĠListItem Ċ ) Ġ: ĠUi Interaction Model Base ( project , Ġparent ) Ġ{ ĊĠ Ġval Ġheader Ġ= Ġif Ġ( list Item . header Ġ== Ġnull ) Ġnull Ġelse ĠContent Segments Ui Model ( project , Ġthis , Ġlist Item . header ) ĊĠ Ġval Ġdescription Ġ= Ġif Ġ( list Item . description Ġ== Ġnull ) Ġnull Ġelse ĠContent Segments Ui Model ( project , Ġthis , Ġlist Item . description ) ĊĊĊĠ Ġoverride Ġfun Ġcalculate State Hash (): ĠInt Ġ{ ĊĠĠĠ Ġvar Ġhash Ġ= Ġheader ?. calculate State Hash () Ġ?: Ġ 1 ĊĠĠĠ Ġhash Ġ*= Ġdescription ?. calculate State Hash () Ġ?: Ġ 1 ĊĊĠĠĠ Ġreturn Ġhash ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġdump Model () Ġ= Ġ"${ super . dump Model ()} : Ġ\ n \ t {\ n ${ header ?. dump Model () }\ n }\ n \ t {\ n ${ description ?. dump Model () }\ n }" ĊĊĠ Ġoverride Ġfun Ġcreate Renderer (): ĠRenderer Ġ= Ġthrow ĠNot Supported For Rendering Error () Ċ }