settings.createComments = true;
boolean isDefault = constructor.getDeclaringClass()
.getQualifiedName().equals("java.lang.Object") ||
constructor.isDefaultConstructor();
AddCustomConstructorOperation op = new AddCustomConstructorOperation(
cu, typeBinding,
variables, constructor,
getSibling((IType)typeBinding.getJavaElement()), settings, true, true);
op.setOmitSuper(!commandLine.hasOption(Options.SUPERTYPE_OPTION) || isDefault);
if (!typeBinding.isEnum()){
op.setVisibility(Modifier.PUBLIC);
}
op.run(null);
TextEdit edit = op.getResultingEdit();
if (edit != null){
edit = edit.getChildren()[0];
JavaUtils.format(
src, CodeFormatter.K_COMPILATION_UNIT,
edit.getOffset(), edit.getLength());