boolean (PsiElement element) { final PsiElement parent = element.getParent(); if (!(parent instanceof PsiTryStatement tryStatement)) { return false; } final PsiResourceList resourceList = tryStatement.getResourceList(); if (resourceList == null) { return false; } final PsiCodeBlock tryBlock = tryStatement.getTryBlock(); if (tryBlock == null) { return false; } return resourceList.getResourceVariablesCount() > 1; }