title: ClassNotFoundException JavaRecursiveElementVisitor
body: <p>Hi all I am trying to build a plugin in intellij and I am getting this following error at runtime - </p>
  
  <pre><code>Caused by: java.lang.ClassNotFoundException: com.intellij.psi.JavaRecursiveElementVisitor PluginClassLoader[com.rahul.gqlformat, 1.0] com.intellij.ide.plugins.cl.PluginClassLoader@2a707a23
  </code></pre>
  
  <p>I am getting the exception inside <code>function</code> named - <code>printSelectedFileName</code> 
  Here is the full class - </p>
  
  <pre><code>package com.rahul.gqlformat;
  
  import com.intellij.openapi.fileEditor.FileEditorManager;
  import com.intellij.openapi.project.Project;
  import com.intellij.openapi.vfs.VirtualFile;
  import com.intellij.openapi.wm.ToolWindow;
  import com.intellij.psi.*;
  
  import javax.swing.*;
  
  public class GqlView {
      private JTextArea textArea;
      private JButton btn;
      private JPanel panel;
      private Project project;
  
      public GqlView(Project project) {
          this.project = project;
          btn.addActionListener(actionEvent -&gt; {
              textArea.append("Hello");
  //            printSelectedFileName();
          });
  
      }
  
  
      void printSelectedFileName() {
          FileEditorManager fileEditorManager = FileEditorManager.getInstance(project);
          VirtualFile[] virtualFile = fileEditorManager.getOpenFiles();
          if (virtualFile != null &amp;&amp; virtualFile.length &gt; 0) {
              VirtualFile vf = virtualFile[0];
              PsiFile psiFile = PsiManager.getInstance(project).findFile(vf);
  
              psiFile.accept(new JavaRecursiveElementVisitor() {
                  @Override
                  public void visitLocalVariable(PsiLocalVariable variable) {
                      super.visitLocalVariable(variable);
                      System.out.println("Found a variable at offset " + variable.getTextRange().getStartOffset());
                  }
              });
          }
  
      }
  
      public JPanel getPanel() {
          return panel;
      }
  }
  
  </code></pre>
  
  <p>build.gradle</p>
  
  <pre><code>plugins {
      id 'java'
      id 'org.jetbrains.intellij' version '0.4.21'
      id 'org.jetbrains.kotlin.jvm' version '1.3.72'
  }
  
  group 'com.rahul.gqlformal'
  version '1.0'
  
  sourceCompatibility = 1.8
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
      testCompile group: 'junit', name: 'junit', version: '4.12'
  }
  
  intellij {
      version = '2020.1'
      plugins = ['java']
  }
  
  
  buildSearchableOptions {
      enabled = false
  }
  
  patchPluginXml {
      version = project.version
      sinceBuild = '201'
      untilBuild = '201.*'
  }
  </code></pre>