public void format(FormattingModel model, boolean sequentially) {
    if (sequentially) {
      myStateProcessor.setNextState(new AdjustWhiteSpacesState(myWrapState, myProgressCallback, myReformatContext));
      myStateProcessor.setNextState(new ExpandChildrenIndentState(myDocument, myWrapState));
      myStateProcessor.setNextState(new ApplyChangesState(model, myWrapState, myProgressCallback));
    }
    else {
      formatWithoutRealModifications(false);
      performModifications(model, false);
    }
  }
public void format(FormattingModel model, boolean sequentially)