Code refactors that convert between multiple attributes in a list and multiple attribute lists into a single attribute list
Details
The proposed refactors are the following:
provided on attribute lists that contain multiple attributes, splitting them into multiple attribute lists, each with one attribute, with the following options:
only split attributes that have constructor arguments
split all attributes
provided on the attribute list collection of the declared symbol, merging the attributes into one attribute list with the following options:
only merge attributes that have no constructor arguments
merge all attributes
Examples
[A, B, C, D(1), E]
[F]
[G, H]
public class C;
The proposed attribute list splitting refactoring will be available within each attribute list that contains more than one attributes, resulting in the following code:
split all attributes
// Only fixes the selected attribute list, in this case [A, B...]
[A]
[B]
[C]
[D(1)]
[E]
[F]
[G, H]
public class C;
only split attributes that have constructor arguments
[A, B, C, E]
[D(1)]
[F]
[G, H]
public class C;
For attribute merging, the inverse process will be applied.
Summary
Code refactors that convert between multiple attributes in a list and multiple attribute lists into a single attribute list
Details
The proposed refactors are the following:
Examples
The proposed attribute list splitting refactoring will be available within each attribute list that contains more than one attributes, resulting in the following code:
split all attributes
only split attributes that have constructor arguments
For attribute merging, the inverse process will be applied.