IDEA-54765 Code Style -> Order of Members should have extra items for statics

Refactoring-based class members manipulation is corrected
This commit is contained in:
Denis Zhdanov
2010-05-11 15:56:47 +04:00
parent c9feccea15
commit f0fb771128
@@ -407,7 +407,13 @@ public class ClassElement extends CompositeElement implements Constants {
return nextSibling == null ? aClass.getLBrace().getNextSibling() : nextSibling;
}
else {
return aClass.getLBrace().getNextSibling();
// The main idea is to avoid to anchor to 'white space' element because that causes reformatting algorithm
// to perform incorrectly. The algorithm is encapsulated at PostprocessReformattingAspect.doPostponedFormattingInner().
PsiElement result = aClass.getLBrace().getNextSibling();
while (result instanceof PsiWhiteSpace) {
result = result.getNextSibling();
}
return result;
}
}
lastMember = child;