final Node nodeParent = node.getParent();
if (nodeParent == null)
{
return false;
}
Group group = nodeParent.getGroup();
if (group == null)
{
return false;
}
// maybe we can move this state into the layoutstate itself so that
// we do not have to rebuild that crap all the time.
LayoutExpressionRuntime ler = null;
// OK, now we are almost complete.
while (group != null)
{
if (ler == null)
{
ler = getExpressionRuntime(fc, node);
}
ler.setDeclaringParent(group);
final Expression groupingExpression = group.getGroupingExpression();
if (groupingExpression != null)
{
groupingExpression.setRuntime(ler);
final Object groupFinished;
try
{
groupFinished = groupingExpression.computeValue();
}
finally
{
groupingExpression.setRuntime(null);
}
if (Boolean.TRUE.equals(groupFinished))
{
// If the group expression returns true, we should pack our belongings
// and stop with that process. The group is finished.
// In Cobol, this would mean that one of the group-fields has changed.
return true;
}
}
final Node parent = group.getParent();
if (parent == null)
{
group = null;
}
else