private static void addNewGridConstraints(final FormSourceCodeGenerator generator, final LwComponent component) {
    final GridConstraints constraints = component.getConstraints();

    generator.startConstructor(GridConstraints.class.getName());
    generator.push(constraints.getRow());
    generator.push(constraints.getColumn());
    generator.push(constraints.getRowSpan());
    generator.push(constraints.getColSpan());
    generator.push(constraints.getAnchor(), myAnchors);
    generator.push(constraints.getFill(), myFills);
    pushSizePolicy(generator, constraints.getHSizePolicy());
    pushSizePolicy(generator, constraints.getVSizePolicy());
    generator.newDimensionOrNull(constraints.myMinimumSize);
    generator.newDimensionOrNull(constraints.myPreferredSize);
    generator.newDimensionOrNull(constraints.myMaximumSize);
    generator.push(constraints.getIndent());
    generator.push(constraints.isUseParentLayout());
    generator.endConstructor();
  }
private static void addNewGridConstraints(final FormSourceCodeGenerator generator, final LwComponent component)