use of net.sf.sdedit.diagram.MessageData in project abstools by abstools.
the class TextHandler method nextMessage.
/**
* Returns the {@linkplain MessageData} object made from the current line.
*
* @return the {@linkplain MessageData} object made from the current line
* @throws SyntaxError
* if the next message cannot be parsed
*/
public MessageData nextMessage() throws SyntaxError {
if (section == 0) {
throw new IllegalStateException("not all objects have been read");
}
if (currentLine == null) {
throw new IllegalStateException("nothing to read");
}
MessageData data;
try {
data = new TextBasedMessageData(currentLine);
} catch (SyntaxError e) {
e.setProvider(this);
throw e;
}
currentLine = null;
return data;
}
Aggregations