Some initializers' implementation is quite expectable, e.g. a field-wise naive initializer. Thus, we can implement an automated refactoring to help developers adding such initializer, e.g.
// Right click on Animal and apply "add field-wise init" refactoringclassAnimal {
varage: Intvarkind: AnimalKindvargender: Gender
}
An available refactoring "add field-wise init" shows up when the user right clicks the declared name `Animal`. After applying the local refactoring, the code snippet transforms to:
@nkcsgexi I will be starting work on this in the next day or two. I think this will be pretty quick as I can use everything I learn't from my recently closed PR... I will have to figure out how to get the correct location in the source code to write out the initializer...
nkcsgexi commentedMar 27, 2018
Additional Detail from JIRA
md5: 717c1a5493eaa3054e6b1fecb975394a
Issue Description:
Some initializers' implementation is quite expectable, e.g. a field-wise naive initializer. Thus, we can implement an automated refactoring to help developers adding such initializer, e.g.
An available refactoring "add field-wise init" shows up when the user right clicks the declared name `Animal`. After applying the local refactoring, the code snippet transforms to:
The text was updated successfully, but these errors were encountered: