skip spaces after incomplete members only

This commit is contained in:
anna
2013-02-21 18:26:23 +01:00
parent 9ab097b11d
commit c4c870f1c5
@@ -195,11 +195,15 @@ public class JavaPsiImplementationHelperImpl extends JavaPsiImplementationHelper
if (anchor != null && anchor != aClass) {
anchor = anchor.getNextSibling();
while (anchor instanceof PsiJavaToken && (anchor.getText().equals(",") || anchor.getText().equals(";"))) {
final boolean afterComma = anchor.getText().equals(",");
anchor = anchor.getNextSibling();
if (afterComma) {
newAnchor = skipWhitespaces(aClass, anchor);
if (newAnchor != null) return newAnchor;
}
}
if (anchor != null) {
newAnchor = skipWhitespaces(aClass, anchor);
return newAnchor != null ? newAnchor : anchor;
return anchor;
}
}