previousKind = targetAlignment.kind;
targetAlignment = targetAlignment.enclosing;
relativeDepth++;
}
if (outerMostDepth >= 0) {
throw new AlignmentException(AlignmentException.LINE_TOO_LONG, outerMostDepth);
}
// look for innermost breakable one
relativeDepth = 0;
targetAlignment = this.currentAlignment;
AlignmentException alignmentException = null;
int msgArgsDepth = -1;
while (targetAlignment != null) {
if (targetAlignment.kind == Alignment.MESSAGE_ARGUMENTS) {
msgArgsDepth = relativeDepth;
}
if (alignmentException == null) {
if (targetAlignment.couldBreak()) {
// do not throw the exception immediately to have a chance to reset
// previously broken alignments (see bug 203588)
alignmentException = new AlignmentException(AlignmentException.LINE_TOO_LONG, relativeDepth);
if (insideStringConcat) throw alignmentException;
}
} else if (targetAlignment.wasSplit) {
// reset the nearest already broken outermost alignment.
// Note that it's not done twice to avoid infinite loop while raising