void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { PsiExpression qualifier = updater.getWritable(myQualifierPointer.getElement()); if (qualifier == null) return; PsiExpression replacement = JavaPsiFacade.getElementFactory(project) .createExpressionFromText("java.util.Objects.requireNonNull(" + qualifier.getText() + ")", qualifier); JavaCodeStyleManager.getInstance(project).shortenClassReferences(qualifier.replace(replacement)); }