helospark / SparkBuilderGenerator

Eclipse plugin to generate builders
MIT License
38 stars 12 forks source link

Inheritance of class with full constructor does not work #30

Closed martinariehm closed 6 years ago

martinariehm commented 6 years ago

See attached code. In case of inheritance, the complete constructor of base class is not called. TestChild shows the generated code, TestChildCorrect shows the code without compile errors. In addition, the builder functionality for the field a of the parent class is not generated. If the field is public, it is generated, but not working since the constructor is not called. inheritance.zip

helospark commented 6 years ago

Thanks for reporting.

AC

Considerations

:question: Which constructor to select in case of multiple constructor? :white_check_mark: Configurable, either the largest or empty

:question: Investigate the super constructor body, to check that the constructor parameter is the same as the method parameter name? :white_check_mark: No, go with convention.

:question: Same visible parameter in the super class as in the constructor? :white_check_mark: Use only constructor

In scope:

:white_check_mark: Regular builder generator :white_check_mark: Staged builder generator

Configuration

:white_check_mark: Turn off this feature entirely for backward compatibility :white_check_mark: Prefer empty super constructor or prefer largest constructor

helospark commented 6 years ago

Hey @martinariehm,

This change is available in version 0.0.13. Please update and check if everything is working as expected.

martinariehm commented 6 years ago

Updated and it works. Thanks a lot!