void ( PsiElement element, String contentVariableName, PsiVariable listVariable, PsiVariable indexVariable, PsiElement childToSkip, CommentTracker commentTracker, StringBuilder out) { if (isListGetLookup(element, indexVariable, listVariable)) { out.append(contentVariableName); } else { final PsiElement[] children = element.getChildren(); if (children.length == 0) { if (PsiUtil.isJavaToken(element, JavaTokenType.INSTANCEOF_KEYWORD) && out.charAt(out.length() - 1) != ' ') { out.append(' '); } out.append(commentTracker.text(element)); } else { boolean skippingWhiteSpace = false; for (final PsiElement child : children) { if (child.equals(childToSkip)) { skippingWhiteSpace = true; } else if (child instanceof PsiWhiteSpace && skippingWhiteSpace) { //don't do anything } else { skippingWhiteSpace = false; replaceCollectionGetAccess(child, contentVariableName, listVariable, indexVariable, childToSkip, commentTracker, out); } } } } }