IDEA-121140 format spock tables in the end of a file

This commit is contained in:
Max Medvedev
2014-03-04 16:58:48 +04:00
parent f2fea0a951
commit ed39848efd
@@ -405,7 +405,7 @@ public class GroovyBlockGenerator implements GroovyElementTypes {
PsiElement psi = child.getPsi();
if (psi instanceof GrLabeledStatement) {
alignGroup(currentGroup, spock, classLevel);
currentGroup = ContainerUtil.newArrayList(/*(GrStatement)psi*/);
currentGroup = ContainerUtil.newArrayList();
spock = true;
}
else if (currentGroup != null && spock && isTablePart(psi)) {
@@ -428,6 +428,10 @@ public class GroovyBlockGenerator implements GroovyElementTypes {
currentGroup = null;
}
}
if (currentGroup != null) {
alignGroup(currentGroup, spock, classLevel);
}
}
private boolean shouldSkip(boolean classLevel, PsiElement psi) {