/* Ċ Ġ* ĠCopyright Ġ 2 0 0 0 - 2 0 2 0 ĠJetBrains Ġs . r . o . Ġand Ġother Ġcontributors . ĠUse Ġof Ġthis Ġsource Ġcode Ġis Ġgoverned Ġby Ġthe ĠApache Ġ 2 . 0 Ġlicense Ġthat Ġcan Ġbe Ġfound Ġin Ġthe ĠLICENSE Ġfile . Ċ Ġ*/ Ċ Ċ package Ġcom . jetbrains . plugin verifier . reporting . ign oring Ċ Ċ import Ġcom . jetbrains . plugin . structure . base . utils . close Logged Ċ import Ġcom . jetbrains . plugin . structure . base . utils . write Text Ċ import Ġcom . jetbrains . plugin verifier . Plugin Verification Target Ċ import Ġcom . jetbrains . plugin verifier . reporting . Reporter Ċ import Ġcom . jetbrains . plugin verifier . reporting . common . Collect ing Reporter Ċ import Ġjava . nio . file . Path Ċ Ċ /** Ċ Ġ* ĠCollect s Ġall Ġ[ Problem Ignored Event ] s Ġreported Ċ Ġ* Ġfor Ġone Ġplugin Ġagainst Ġone Ġtarget Ċ Ġ* Ġand Ġsaves Ġthem Ġto Ġ`< plugin - verification >/ ignored - problems . txt ` Ġfile . Ċ Ġ*/ Ċ class ĠIgnore d Problems Reporter ( ĊĠ Ġprivate Ġval Ġplugin Verification Directory : ĠPath , ĊĠ Ġprivate Ġval Ġverification Target : ĠPlugin Verification Target Ċ ) Ġ: ĠReport er < Problem Ignored Event > Ġ{ ĊĊĠ Ġprivate Ġval Ġcollecting Reporter Ġ= ĠCollect ing Reporter < Problem Ignored Event >() ĊĊĠ Ġoverride Ġfun Ġreport ( t : ĠProblem Ignored Event ) Ġ{ ĊĠĠĠ Ġcollecting Reporter . report ( t ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġclose () Ġ{ ĊĠĠĠ Ġtry Ġ{ ĊĠĠĠĠĠ Ġsave Ignored Problems () ĊĠĠĠ Ġ} Ġfinally Ġ{ ĊĠĠĠĠĠ Ġcollecting Reporter . close Logged () ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġsave Ignored Problems () Ġ{ ĊĠĠĠ Ġval Ġall Ignored Problems Ġ= Ġcollecting Reporter . all Reported ĊĠĠĠ Ġif Ġ( all Ignored Problems . isNotEmpty ()) Ġ{ ĊĠĠĠĠĠ Ġval Ġignored Problems File Ġ= Ġplugin Verification Directory . resolve (" ignored - problems . txt ") ĊĠĠĠĠĠ Ġignored Problems File . write Text ( ĊĠĠĠĠĠĠĠ ĠAll Ignored Problems Reporter . format Many Ignored Problems ( verification Target , Ġall Ignored Problems ) ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊ Ċ }