void (@NotNull InsertionContext context, @NotNull PsiVariable variable) { PsiElement place = context.getFile().findElementAt(context.getTailOffset() - 1); if (place == null || PsiUtil.isLanguageLevel8OrHigher(place) || JspPsiUtil.isInJspFile(place)) { return; } if (HighlightControlFlowUtil.getElementVariableReferencedFrom(variable, place) != null && !HighlightControlFlowUtil.isReassigned(variable, new HashMap<>())) { PsiUtil.setModifierProperty(variable, PsiModifier.FINAL, true); } }