@Override
          protected void innerResolveInContext(@NotNull String text,
                                               @NotNull PsiFileSystemItem context,
                                               @NotNull Collection<? super ResolveResult> result,
                                               boolean caseSensitive) {
            if (model == null) {
              DomElement rootElement = DomUtil.getFileElement(genericDomValue).getRootElement();
              if (rootElement instanceof MavenDomProjectModel) {
                model = (MavenDomProjectModel)rootElement;
              }
            }

            String resolvedText = model == null ? text : MavenPropertyResolver.resolve(text, model);

            if (resolvedText.equals(text)) {
              if (getIndex() == 0 && resolvedText.length() == 2 && OSAgnosticPathUtil.startsWithWindowsDrive(resolvedText)) {
                // it's root on windows, e.g. "C:"
                VirtualFile file = LocalFileSystem.getInstance().findFileByPath(resolvedText + '/');
                if (file != null) {
                  PsiDirectory psiDirectory = context.getManager().findDirectory(file);
                  if (psiDirectory != null) {
                    result.add(new PsiElementResolveResult(psiDirectory));
                  }
                }
              }
              else if (getIndex() == getAllReferences().length - 1 &&
                       Objects.equals("relativePath", genericDomValue.getXmlElementName()) &&
                       context.getVirtualFile() != null) {
                // it is a last context and should be resolved to pom.xml

                VirtualFile parentFile = context.getVirtualFile().findChild(text);
                if (parentFile != null) {
                  VirtualFile parentPom = parentFile.isDirectory() ? parentFile.findChild("pom.xml") : parentFile;
                  if (parentPom != null) {
                    PsiFile psiFile = context.getManager().findFile(parentPom);
                    if (psiFile != null) {
                      result.add(new PsiElementResolveResult(psiFile));
                    }
                  }
                }
              }
              else if ("..".equals(resolvedText)) {
                PsiFileSystemItem resolved = context.getParent();
                if (resolved != null) {
                  if (context instanceof XmlFileImpl) {
                    resolved = resolved.getParent();  // calculated regarding parent directory, not the pom itself
                  }
                  if (resolved != null) {
                  result.add(new PsiElementResolveResult(resolved));
                  }
                }
              }
              else {
                super.innerResolveInContext(resolvedText, context, result, caseSensitive);
              }
            }
            else {
              VirtualFile contextFile = context.getVirtualFile();
              if (contextFile == null) return;

              VirtualFile file = null;

              if (getIndex() == 0) {
                file = LocalFileSystem.getInstance().findFileByPath(resolvedText);
              }

              if (file == null) {
                file = LocalFileSystem.getInstance().findFileByPath(contextFile.getPath() + '/' + resolvedText);
              }

              if (file != null) {
                PsiFileSystemItem res = file.isDirectory() ? context.getManager().findDirectory(file) : context.getManager().findFile(file);

                if (res != null) {
                  result.add(new PsiElementResolveResult(res));
                }
              }
            }
          }
@Override
          protected void innerResolveInContext(@NotNull String text,
                                               @NotNull PsiFileSystemItem context,
                                               @NotNull Collection<? super ResolveResult> result,
                                               boolean caseSensitive)