fileName = fileOrDir + ".java";
for (VirtualFile path : Play.javaPath) {
// 1. check if there is a folder (without extension)
VirtualFile javaFile = path.child(fileOrDir);
if (javaFile.exists() && javaFile.isDirectory() && javaFile.matchName(fileOrDir)) {
// we found a directory (package)
return null;
}
// 2. check if there is a file
javaFile = path.child(fileName);