I apologize if this is really basic but, after much searching in the forums, I still haven't found the answer. I have some java source files that exist within my project's content root but outside of any source paths. When examining the virtual files associated to each of the java files, they are all identifed as PsiFile(plain text), and their language is TEXT.
How can I turn such a reference into a PsiJavaFile reference so that I can manipulate/query its structure? The ultimate goal is to obtain the package of the file so that I can resolve the proper parent folder and add it to the source path.
Thank you very much,