@Override
      public void visitElement(@NotNull RefEntity refEntity) {
        if (refEntity instanceof RefElementImpl refElement) {
          if (!refElement.isSuspicious()) return;

          PsiFile file = refElement.getContainingFile();
          if (file == null) return;
          if (!((GlobalInspectionContextBase)globalContext).isToCheckFile(file, UnusedDeclarationInspectionBase.this) && !scope.contains(file)) {
            getEntryPointsManager(globalContext).addEntryPoint(refElement, false);
          }
        }
      }
@Override
      public void visitElement(@NotNull RefEntity refEntity)