You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
finding the callers of a constructor of a data class could be useful, but right now this is hard to do,
because there's no constructor. By creating the various components of a @ Data annotation in the
right order, it may be possible to ensure that eclipse will always pick the (static) constructor when
hitting 'find callers' whilst the annotation is under the cursor.
anecdotal evidence, sample size 1: Right now you get callers of hashCode(), which is pointless.
The 'right' answer is to pick the (static) constructor - for getters/setters, you can just annotate the
field and then run 'find callers' on that annotation, and trying to find the callers of
hashCode/equals/toString is silly.
Okay, this trick works, but only for the static constructor. The real constructor will not show up at the end even if
you add it last.
HOWEVER: You can start 'find callers' while the class name is under the cursor (the "Bar" in "public @ Data class
Bar") and that'll work just fine, so this is no biggy. The change to generate the static constructor last is in commit f74109f
Migrated from Google Code (issue 5)
The text was updated successfully, but these errors were encountered: