String (@NotNull PsiFileSystemItem root, @NotNull String relativePath) { PsiFile ignoreFile = getContainingFile(); VirtualFile rootVF = root.getVirtualFile(); if (rootVF != null && ignoreFile != null && ignoreFile.getVirtualFile() != null && ignoreFile.getVirtualFile().getParent() != null && !rootVF.equals(ignoreFile.getVirtualFile().getParent())) { VirtualFile relativeFile = rootVF.findFileByRelativePath(relativePath); if (relativeFile != null) { String relativeToIgnoreFileParent = VfsUtilCore.getRelativePath(relativeFile, ignoreFile.getVirtualFile().getParent()); if (relativeToIgnoreFileParent != null) { return absoluteUrlNeedsStartSlash() ? "/" + relativeToIgnoreFileParent : relativeToIgnoreFileParent; } } } return super.getNewAbsolutePath(root, relativePath); }