New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 569 - IDEs services: Find References - haxe #569
Comments
[comment from ncanna...@gmail.com, published at 11/03/2012, 11:34:41] I guess that Find-Reference is much more useful for class fields than for locals, is it ? |
[comment from ncanna...@gmail.com, published at 11/03/2012, 11:36:25] |
[comment from ncanna...@gmail.com, published at 11/03/2012, 11:51:54] |
[comment from philippe...@gmail.com, published at 11/03/2012, 12:27:42] |
[comment from back2dos@gmail.com, published at 11/03/2012, 13:44:09] For variables, take the position of the variable declaration statement (which is known already), extract the corresponding string and therein just do a backward string search for the identifier (var x = 5, x = "foo" is valid haXe code). This can be done with function arguments similarly, with a background string search from the beginning of the function body to the beginning of the member declaration. Of course this can just as easily be accomplished by every IDE, but it's a rather cheap enhancement and including this in the IDE services would provide better separation of concerns IMHO. |
[comment from ncanna...@gmail.com, published at 17/11/2012, 00:47:12] |
[comment from si...@haxe.org, published at 31/01/2013, 19:51:12] Goto: This one is really easy and works exactly like field completion, just with different output. Metadata: Likewise. References: That's quite different. We don't even want to enter display mode here, but instead type normally and mark the subject field. Then a small post-process iteration over the typed AST can easily detect usage. This will be slower than the other display modes, but that is to be expected. All this seems easy to implement, the only thing stopping me from doing so right now is the parser. Without a unique token for completion, we would have to do position checks after each identifier, which seems quite sub-optimal. Would it be viable to require IDEs to insert such a token? |
[comment from philippe...@gmail.com, published at 31/01/2013, 20:04:41] |
[comment from si...@haxe.org, published at 31/01/2013, 20:18:38] If you have to make a temp save of the file anyway (I think you do?) then this seems reasonable, no? Unless of course Nicolas had something entirely different in mind for this. |
[comment from philippe...@gmail.com, published at 31/01/2013, 20:23:22] If the problem is about Find References, then we can workaround that by calling the Goto feature from the IDE for each occurrence of the searched token. That's what FD does in AS3 for instance. |
[comment from si...@haxe.org, published at 24/02/2013, 17:12:14] |
[comment from ncanna...@gmail.com, published at 11/05/2013, 19:27:19] |
[comment from si...@haxe.org, published at 11/05/2013, 19:29:14] |
[comment from si...@haxe.org, published at 11/05/2013, 19:30:49] |
[comment from si...@haxe.org, published at 12/05/2013, 17:49:38] By the way, I never mentioned this here but -D display-mode=usage|position|metadata is already supported for class fields, although we still need to hook it into the parser. |
[comment from si...@haxe.org, published at 12/05/2013, 20:41:12] haxe -D display-mode=usage --macro addMetadata('@ :usage','Array','push') --macro include('haxe',false) -dce no |
[Google Issue #569 : https://code.google.com/p/haxe/issues/detail?id=569]
by philippe...@gmail.com, at 13/11/2011, 20:39:51
IDEs need a Find References service to offer many code-related features like:
How it would work:
and all the file:line:column where it is called.
Obviously it should work for local vars and function parameters.
The text was updated successfully, but these errors were encountered: