Examples of AddCustomConstructorOperation


Examples of org.eclipse.jdt.internal.corext.codemanipulation.AddCustomConstructorOperation

    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());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.