void (@NotNull ActionContext context, @NotNull PsiMethod constructor, @NotNull ModPsiUpdater updater) { PsiStatement superCall = JavaPsiFacade.getElementFactory(context.project()).createStatementFromText(myCall,null); PsiCodeBlock body = Objects.requireNonNull(constructor.getBody()); PsiJavaToken lBrace = body.getLBrace(); body.addAfter(superCall, lBrace); lBrace = (PsiJavaToken) new PsiMatcherImpl(body) .firstChild(PsiMatchers.hasClass(PsiExpressionStatement.class)) .firstChild(PsiMatchers.hasClass(PsiMethodCallExpression.class)) .firstChild(PsiMatchers.hasClass(PsiExpressionList.class)) .firstChild(PsiMatchers.hasClass(PsiJavaToken.class)) .dot(PsiMatchers.hasText("(")) .getElement(); updater.moveTo(lBrace.getTextOffset()+1); }