private static @Nullable CachedValueProvider.Result<PsiClass> computeInjectedControllerClass(PsiFile containingFile) {
    return RecursionManager.doPreventingRecursion(containingFile, true, () -> {
      final Project project = containingFile.getProject();
      final Ref<PsiClass> injectedController = new Ref<>();
      final PsiClass fxmlLoader =
        JavaPsiFacade.getInstance(project).findClass(JavaFxCommonNames.JAVAFX_FXML_FXMLLOADER, GlobalSearchScope.allScope(project));
      if (fxmlLoader != null) {
        final PsiMethod[] injectControllerMethods = fxmlLoader.findMethodsByName("setController", false);
        if (injectControllerMethods.length == 1) {
          final GlobalSearchScope globalSearchScope = GlobalSearchScope
            .getScopeRestrictedByFileTypes(containingFile.getResolveScope(), JavaFileType.INSTANCE);
          final VirtualFile[] virtualFiles = CacheManager.getInstance(project).getVirtualFilesWithWord(
            ClassUtil.extractClassName(JavaFxCommonNames.JAVAFX_FXML_FXMLLOADER), UsageSearchContext.IN_CODE, globalSearchScope, true);
          if (virtualFiles.length == 0) {
            return new CachedValueProvider.Result<>(null, PsiModificationTracker.MODIFICATION_COUNT);
          }
          final GlobalSearchScope filesScope = GlobalSearchScope.filesScope(project, Arrays.asList(virtualFiles));
          final Processor<PsiReference> processor =
            loaderReference -> findControllerClassInjection(loaderReference, injectedController, injectControllerMethods[0]);
          ReferencesSearch.search(containingFile, filesScope).forEach(reference -> {
            final PsiElement element = reference.getElement();
            if (element instanceof PsiLiteralExpression) {
              final PsiNewExpression expression = PsiTreeUtil.getParentOfType(element, PsiNewExpression.class);
              if (expression != null) {
                final PsiType type = expression.getType();
                if (type != null && type.equalsToText(JavaFxCommonNames.JAVAFX_FXML_FXMLLOADER)) {
                  final PsiElement parent = expression.getParent();
                  if (parent instanceof PsiLocalVariable) {
                    ReferencesSearch.search(parent).forEach(processor);
                    final PsiClass controller = injectedController.get();
                    if (controller != null) {
                      return false;
                    }
                  }
                }
              }
            }
            return true;
          });
        }
      }
      return new CachedValueProvider.Result<>(injectedController.get(), PsiModificationTracker.MODIFICATION_COUNT);
    });
  }
private static @Nullable CachedValueProvider.Result<PsiClass> computeInjectedControllerClass(PsiFile containingFile)