void (@NotNull ParameterInfo info, @NotNull StringBuilder result) { final PsiElement element = info.getElement(); final PsiElement prevSibling = PsiTreeUtil.skipWhitespacesBackward(element); if (prevSibling instanceof PsiJavaToken && isRemovableToken(prevSibling)) { final int start = info.getBeforeDelimiterPos() - (prevSibling.getTextLength() - 1); final int end = info.getStartIndex(); result.delete(start, end); return; } final PsiElement nextSibling = PsiTreeUtil.skipWhitespacesForward(element); if (isRemovableToken(nextSibling)) { final int start = info.getStartIndex(); final int end = info.getAfterDelimiterPos() + nextSibling.getTextLength(); result.delete(start, end); return; } else if (element instanceof PsiTypeElement && nextSibling instanceof PsiIdentifier) { final int start = info.getStartIndex(); final int end = info.getAfterDelimiterPos(); result.delete(start, end); return; } if (element == null || !(element.getParent() instanceof PsiForStatement)) { removeExtraSemicolon(info, 0, result, null); } }