title: Resolve exception java.lang.ClassCastException: org.jetbrains.kotlin.psi.KtFile
body: <p>I'm writing a plugin for Intellij Idea, where the main idea is to get the structure of a Kotlin class as: properties, methods, etc.
  In my <strong>plugin.xml</strong> I added the following line <code>&lt;depends&gt;org.jetbrains.kotlin&lt;/depends&gt;</code></p>
  
  <p>And as a library to access the class <code>KtVisitor</code> I added to gradle the following library:
  <code>org.jetbrains.kotlin:kotlin-compiler:1.2.30</code></p>
  
  <p>Everything is compiling with exception, that when I'm running the code and listen to the action, I'm getting the following error:
  <code>java.lang.ClassCastException: org.jetbrains.kotlin.psi.KtFile cannot be cast to com.intellij.psi.PsiFile</code></p>
  
  <p>Mine class responsible for listening to the action is following:</p>
  
  <pre><code>class ConvertAction: AnAction(), DumbAware {
  override fun actionPerformed(event: AnActionEvent?) {
      val psiFile = event?.getData(PlatformDataKeys.PSI_FILE)
      val s = true
  }}
  </code></pre>
  
  <p>Appreciate any help how to resolve this issue. Thank you.</p>