Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

find usages of function works only on top clause. #115

Closed
vladimirk opened this Issue Oct 30, 2012 · 3 comments

Comments

Projects
None yet
3 participants
Contributor

vladimirk commented Oct 30, 2012

g(_X) -> ok;
g(_X) -> ok. % <- does not work here
Owner

ignatov commented Oct 30, 2012

I thinks it's not an issue, but a feature. For what we need a
reference on every clause?

Contributor

vladimirk commented Oct 30, 2012

Just a convenience. One does not have to search for the top manually to find usages using ide.

Collaborator

deadok22 commented Sep 21, 2013

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.

@vladimirk vladimirk closed this Feb 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment