void (@NotNull Project project, @NotNull PsiElement label, @NotNull ModPsiUpdater updater) { final PsiElement parent = label.getParent(); if (!(parent instanceof PsiLabeledStatement labeledStatement)) { return; } final PsiStatement statement = labeledStatement.getStatement(); if (statement == null) { return; } CommentTracker commentTracker = new CommentTracker(); final String statementText = commentTracker.text(statement); PsiReplacementUtil.replaceStatement(labeledStatement, statementText, commentTracker); }