package Ġcom . jetbrains . edu . course creator . actions . placeholder Ċ Ċ import Ġcom . intellij . openapi . action System . Presentation Ċ import Ġcom . intellij . openapi . diagnostic . Logger Ċ import Ġcom . intellij . openapi . file Editor . File Editor Manager Ċ import Ġcom . intellij . openapi . project . Project Ċ import Ġcom . jetbrains . edu . learning . E du State Ċ import Ġcom . jetbrains . edu . learning . course Dir Ċ import Ġcom . jetbrains . edu . learning . messages . E du Core Bundle Ċ import Ġcom . jetbrains . edu . learning . yaml . config FileName Ċ import Ġorg . jetbrains . annotations . Non N ls Ċ Ċ open Ġclass ĠCC Edit Answer Placeholder Ġ: ĊĠ ĠCC Answer Placeholder Action ( E du Core Bundle . lazy Message (" action . edit . answer . placeholder . text "), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠE du Core Bundle . lazy Message (" action . edit . answer . placeholder . description ")) Ġ{ ĊĊĠ Ġoverride Ġfun Ġperform Answer Placeholder Action ( project : ĠProject , Ġstate : ĠE du State ) Ġ{ ĊĠĠĠ Ġval Ġanswer Placeholder Ġ= Ġstate . answer Placeholder Ġ?: Ġreturn ĊĠĠĠ Ġval Ġtask Ġ= Ġanswer Placeholder . task File . task ĊĠĠĠ Ġval Ġconfig FileName Ġ= Ġtask . config FileName ĊĠĠĠ Ġval Ġtask Dir Ġ= Ġtask . get Dir ( project . course Dir ) ĊĠĠĠ Ġif Ġ( task Dir Ġ== Ġnull ) Ġ{ ĊĠĠĠĠĠ ĠLOG . error (" Failed Ġto Ġfind Ġtask Ġdirectory ") ĊĠĠĠĠĠ Ġreturn ĊĠĠĠ Ġ} ĊĠĠĠ Ġval Ġconfig File Ġ= Ġtask Dir . find Child ( config FileName ) ĊĠĠĠ Ġif Ġ( configFile Ġ== Ġnull ) Ġ{ ĊĠĠĠĠĠ ĠLOG . error (" Failed Ġto Ġfind Ġtask Ġconfig Ġfile ") ĊĠĠĠĠĠ Ġreturn ĊĠĠĠ Ġ} ĊĠĠĠ ĠFile Editor Manager . getInstance ( project ). open File ( configFile , Ġtrue ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġupdate Presentation ( edu State : ĠE du State , Ġpresentation : ĠPresentation ) Ġ{ ĊĠĠĠ Ġpresentation . isEnabled And Visible Ġ= Ġedu State . answer Placeholder Ġ!= Ġnull ĊĠ Ġ} ĊĊĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠ Ġprivate Ġval ĠLOG Ġ= ĠLogger . getInstance ( CC Edit Answer Placeholder :: class . java ) ĊĊĠĠĠ Ġ@ Non N ls ĊĠĠĠ Ġconst Ġval ĠACTION _ ID Ġ= Ġ" Ed uc ational . Ed uc ator . Edit Answer Placeholder " ĊĠ Ġ} Ċ }