private static PsiExpression @NotNull [] getStandardExpressions(PsiElement place) {
    ArrayList<PsiExpression> array = new ArrayList<>();
    PsiElementFactory factory = JavaPsiFacade.getElementFactory(place.getProject());
    try {
      array.add(factory.createExpressionFromText("true", null));
      array.add(factory.createExpressionFromText("false", null));

      PsiElement scope = place;
      boolean innermostClass = true;
      while (scope != null) {
        if (scope instanceof PsiClass aClass) {
          String name = aClass.getName();
          if (innermostClass) {
            array.add(factory.createExpressionFromText("this", place));
          }
          else if (name != null) {
            array.add(factory.createExpressionFromText(name + ".this", place));
          }

          innermostClass = false;
          if (aClass.hasModifierProperty(PsiModifier.STATIC)) break;
        }
        else if (scope instanceof PsiMember) {
          if (((PsiMember)scope).hasModifierProperty(PsiModifier.STATIC)) break;
        }
        scope = scope.getParent();
      }
    }
    catch (IncorrectOperationException e) {
      LOG.error(e);
    }
    return array.toArray(PsiExpression.EMPTY_ARRAY);
  }
private static PsiExpression @NotNull [] getStandardExpressions(PsiElement place)