/* Ċ Ġ* ĠCopyright Ġ 2 0 1 0 - 2 0 1 7 ĠJetBrains Ġs . r . o . Ċ Ġ* Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ*/ Ċ Ċ package Ġorg . jetbrains . kotlin . idea . intent ions Ċ Ċ import Ġcom . intellij . openapi . editor . Editor Ċ import Ġcom . intellij . psi . Psi Class Ċ import Ġorg . jetbrains . kotlin . idea . references . main Reference Ċ import Ġorg . jetbrains . kotlin . psi . Kt Dot Qualified Expression Ċ Ċ abstract Ġclass ĠConvert Dot Qualified To Scope Int ention ( ĊĠĠĠ Ġtext : ĠString Ċ ) Ġ: ĠConvert To Scope Int ention < Kt Dot Qualified Expression >( Kt Dot Qualified Expression :: class . java , Ġtext ) Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġis Applicable To ( element : ĠK t Dot Qualified Expression , Ġcaret Offset : ĠInt ): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġreceiver Expression Ġ= Ġelement . get Left Most Receiver Expression () ĊĠĠĠĠĠĠĠ Ġif Ġ( receiver Expression . main Reference ?. resolve () Ġis ĠPsi Class ) Ġreturn Ġfalse ĊĠĠĠĠĠĠĠ Ġval Ġreceiver Expression Text Ġ= Ġreceiver Expression . text ĊĠĠĠĠĠĠĠ Ġif Ġ( receiver Expression Text Ġin ĠBLACK LIST _ RECE IVER _ NAME ) Ġreturn Ġfalse ĊĠĠĠĠĠĠĠ Ġif Ġ(! is Applicable With Given Receiver Text ( element , Ġreceiver Expression Text )) Ġreturn Ġfalse ĊĠĠĠĠĠĠĠ Ġval Ġnext Sibling Ġ= Ġelement . get Dot Qualified Sibling If Any ( forward Ġ= Ġtrue ) ĊĠĠĠĠĠĠĠ Ġif Ġ( next Sibling Ġ!= Ġnull Ġ&& Ġis Applicable With Given Receiver Text ( next Sibling , Ġreceiver Expression Text )) Ġreturn Ġtrue ĊĠĠĠĠĠĠĠ Ġval Ġprev Sibling Ġ= Ġelement . get Dot Qualified Sibling If Any ( forward Ġ= Ġfalse ) ĊĠĠĠĠĠĠĠ Ġreturn Ġprev Sibling Ġ!= Ġnull Ġ&& Ġis Applicable With Given Receiver Text ( prev Sibling , Ġreceiver Expression Text ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġapply To ( element : ĠK t Dot Qualified Expression , Ġeditor : ĠEditor ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġreceiver Expression Text Ġ= Ġelement . get Receiver Expression Text () Ġ?: Ġreturn ĊĠĠĠĠĠĠĠ Ġapply With Given Receiver Text ( element , Ġreceiver Expression Text ) ĊĠĠĠ Ġ} Ċ }