@Override
    public @NotNull PsiExpression getNegatedExpression(@NotNull PsiElement element) {
      Project project = element.getProject();
      String negatedExpressionText = DumbService.getInstance(project)
        .computeWithAlternativeResolveEnabled(() -> BoolUtils.getNegatedExpressionText((PsiExpression)element));
      return JavaPsiFacade.getElementFactory(project).createExpressionFromText(negatedExpressionText, element);
    }
@Override
    public @NotNull PsiExpression getNegatedExpression(@NotNull PsiElement element)