@Override
    public CachedValueProvider.Result<Map<PsiAnonymousClass, String>> compute(final PsiClass upper) {
      final Map<PsiAnonymousClass, String> map = new HashMap<>();
      upper.accept(new JavaRecursiveElementWalkingVisitor() {
        int index;

        @Override
        public void visitAnonymousClass(@NotNull PsiAnonymousClass aClass) {
          if (upper == aClass) {
            super.visitAnonymousClass(aClass);
            return;
          }
          final PsiExpressionList arguments = aClass.getArgumentList();
          if (arguments != null) {
            for (PsiExpression expression : arguments.getExpressions()) {
              expression.acceptChildren(new JavaRecursiveElementVisitor() {
                @Override
                public void visitAnonymousClass(@NotNull PsiAnonymousClass aClass) {
                  index++;
                  map.put(aClass, "$" + index);
                }
              });
            }
          }

          index++;
          map.put(aClass, "$" + index);
        }

        @Override
        public void visitClass(@NotNull PsiClass aClass) {
          if (aClass == upper) {
            super.visitClass(aClass);
          }
        }
      });
      return CachedValueProvider.Result.create(map, upper);
    }
@Override
    public CachedValueProvider.Result<Map<PsiAnonymousClass, String>> compute(final PsiClass upper)