if (model instanceof FieldOption) {
FieldOption option = (FieldOption) model;
model = option.eContainer();
}
if (model instanceof Literal) {
Literal literal = (Literal) model;
if (shouldCalculateIndex(literal, LITERAL__INDEX)) {
long index = literals.calculateNewIndexOf(literal);
literal.setIndex(index);
commentsToUpdate.add(Tuples.create(model, index));
shouldInsertSemicolon.set(false);
}
}
if (model instanceof MessageField) {