Closed vovakyrychenko closed 7 years ago
I thinks it's not an issue, but a feature. For what we need a reference on every clause?
Just a convenience. One does not have to search for the top manually to find usages using ide.
I did some programming in Erlang and I think it would be awesome to have reference on every clause. It would enable us to improve 'Find usages' action. Say, you have the following code (copied from erlang interpreter):
meta(Meta, step) -> dbg_icmd:step(Meta);
meta(Meta, next) -> dbg_icmd:next(Meta);
meta(Meta, continue) -> dbg_icmd:continue(Meta);
meta(Meta, finish) -> dbg_icmd:finish(Meta).
here you can see how atoms are used to do completely different things depending on argument (it would be implemented using virtual functions or something like that in OO languages). So 'Find usages' could utilize this information to show, say, usages of function 'meta' with 'step' as it's second argument, before showing all other results. Same can be done in 'Go to declaration' action.