Hey guys :slightly_smiling_face: I am starting to ...
# kontributors
j
Hey guys 🙂 I am starting to write an IDEA plugin, which adds an action on some files. I get to a point where I have a string which is the fully qualified name of a Java or Kotlin class (e.g. "android.widget.TextView") and I need some kind of descriptor (e.g. PsiJavaElement/KtElement or similar). All I have access to is the com.intellij.openapi.actionSystem.AnActionEvent event (hence the Project and everything available in the event) and I suppose the class is in the classpath of the project. Can anyone give me some pointers on how to achieve that ? Thanks a lot !
Found
PsiShortNamesCache.getInstance(project).getClassesByName(className, project.allScope())
but not sure this is the right way.