I have file name, only name not path. File is xml. I want to provide GotoRelatedItem for it and it requires PsiElement. How can I get PsiElemnt by file name?
You can use the FilenameIndex class to find all files in a project that have a given name. Note that it can return multiple files, and it's up to you to find the right one.
You can use the FilenameIndex class to find all files in a project that have a given name. Note that it can return multiple files, and it's up to you to find the right one.