Collection<PhpClass> phpClasses = PhpIndex.getInstance(psiElement.getProject()).getClassesByFQN(jumpFileName);
if (phpClasses.isEmpty()) {
VirtualFileManager virtualFileManager = VirtualFileManager.getInstance();
CakeConfig cakeConfig = CakeConfig.getInstance(psiElement.getProject());
if (cakeConfig.isEmpty()) {
VirtualFile tmpVirtualFile = psiElement.getContainingFile().getVirtualFile();
cakeConfig.init(tmpVirtualFile, CakeIdentifier.getIdentifier(tmpVirtualFile));
}
VirtualFile virtualFile = psiElement.getContainingFile().getVirtualFile();
if (virtualFile == null)
return PsiReference.EMPTY_ARRAY;
String pluginDirPath = FileSystem.getPluginDir(psiElement.getContainingFile().getVirtualFile());
String controllerName = cakeConfig.getBetweenDirectoryPath(virtualFile.getName());
String filePath = cakeConfig.getPath(CakeIdentifier.View, controllerName, jumpFileName, pluginDirPath);
virtualFile = virtualFileManager.refreshAndFindFileByUrl(FileSystem.getAppPath(psiElement.getContainingFile().getVirtualFile()) + filePath);
if (virtualFile == null) {
if (pluginDirPath != null) {
// Plugin Directory element
VirtualFile pluginDir = virtualFileManager.refreshAndFindFileByUrl("file://" + psiElement.getProject().getBasePath() + "/app/" + cakeConfig.cakeVersionAbsorption.get(CakeIdentifier.Plugin));