/* Ċ Ġ* ĠCopyright Ġ 2 0 1 0 - 2 0 1 6 Ġ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 . resolve Ċ Ċ import Ġcom . intellij . psi . Psi Element Ċ import Ġorg . jetbrains . kotlin . as Java . elements . Kt Light Element Ċ import Ġorg . jetbrains . kotlin . idea . de compiler . class File . Kt Cls File Ċ import Ġorg . jetbrains . kotlin . idea . test . J dk And Mock Library Project Descriptor Ċ import Ġorg . jetbrains . kotlin . idea . test . Plugin TestCase Base Ċ import Ġorg . jetbrains . kotlin . psi . Kt Declaration Ċ import Ġorg . junit . Assert Ċ Ċ private Ġval ĠFILE _ WITH _ K OT LIN _ CODE Ġ= ĠPlugin TestCase Base . TEST _ DATA _ DIR Ġ+ Ġ"/ resolve / reference In Java / dependency / dependencies . kt " Ċ Ċ abstract Ġclass ĠAbstract Reference Resolve In Java Test Ġ: ĠAbstract Reference Resolve Test () Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġdo Test ( path : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġassert ( path . endsWith (". java ")) Ġ{ Ġpath Ġ} ĊĠĠĠĠĠĠĠ Ġmy Fixture . configure By File ( FILE _ WITH _ K OT LIN _ CODE ) ĊĠĠĠĠĠĠĠ Ġmy Fixture . configure By File ( path ) ĊĠĠĠĠĠĠĠ Ġperform Checks () ĊĠĠĠ Ġ} Ċ } Ċ Ċ abstract Ġclass ĠAbstract Reference To Compiled Kotlin Resolve In Java Test Ġ: ĠAbstract Reference Resolve Test () Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġdo Test ( path : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġmy Fixture . configure By File ( path ) ĊĠĠĠĠĠĠĠ Ġperform Checks () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġget Project Descriptor () Ġ= ĠJ dk And Mock Library Project Descriptor ( FILE _ WITH _ K OT LIN _ CODE , Ġtrue ) ĊĊĠĠĠ Ġoverride Ġval Ġref Marker Text : ĠString ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġ" CLS _ REF " ĊĊĠĠĠ Ġoverride Ġfun Ġcheck Resolved To ( element : ĠPsi Element ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġnavigation Element Ġ= Ġelement . navigation Element ĊĠĠĠĠĠĠĠ ĠAssert . assertFalse (" Reference Ġshould Ġnot Ġnavigate Ġto Ġa Ġlight Ġelement \ n Was : Ġ${ navigation Element :: class . java . simple Name }", Ġnavigation Element Ġis ĠK t Light Element < *, Ġ* >) ĊĠĠĠĠĠĠĠ ĠAssert . assertTrue (" Reference Ġshould Ġnavigate Ġto Ġa Ġkotlin Ġdeclaration \ n Was : Ġ${ navigation Element :: class . java . simple Name }", Ġnavigation Element Ġis ĠK t Declaration Ġ|| Ġnavigation Element Ġis ĠK t Cls File ) ĊĠĠĠ Ġ} Ċ } Ċ