@NotNull
  @Override
  public Result checkAutoPopup(char charTyped, @NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) {
    if (charTyped == '$') {
      if (!(file instanceof XPathFile)) return Result.CONTINUE;

      AutoPopupController.getInstance(project).autoPopupMemberLookup(editor, null);
      return Result.CONTINUE;
    } else if (charTyped == '.') {
      if (!(file instanceof XPathFile)) return Result.CONTINUE;
      return Result.STOP;
    } else {
      return super.checkAutoPopup(charTyped, project, editor, file);
    }
  }
@NotNull
  @Override
  public Result checkAutoPopup(char charTyped, @NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file)