PsiElement () { final String value = myAttribute.getValue(); final String resourceLocation = myResourceManager.getResourceLocation(value); if (!Objects.equals(resourceLocation, value)) { VirtualFile file; try { file = VfsUtil.findFileByURL(new URL(resourceLocation)); } catch (MalformedURLException e) { try { file = VfsUtil.findFileByURL(new File(resourceLocation).toURI().toURL()); } catch (MalformedURLException e1) { file = null; } } if (file != null) { return myAttribute.getManager().findFile(file); } } return null; }