Skip to content
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

[display] Goto Implementation #9043

Closed
nadako opened this issue Dec 18, 2019 · 4 comments · Fixed by #9079
Closed

[display] Goto Implementation #9043

nadako opened this issue Dec 18, 2019 · 4 comments · Fixed by #9079
Assignees
Milestone

Comments

@nadako
Copy link
Member

nadako commented Dec 18, 2019

Language Server Protocol (and VS Code) supports "Goto Implementation" feature. While I'm not sure what exactly it was designed for, to me it looks like something that could be used for the following things:

  • find child classes
  • find interface implementations
  • find method overrides
  • find interface field implementations

From the compiler standpoint to me this looks similar to "find references", so maybe it's not very hard to implement?

I can see this feature being very handy for us at @innogames, because we have quite an inheritance-heavy codebase and we often need to get an overview of what's going on across class hierarchies.

@nadako
Copy link
Member Author

nadako commented Dec 19, 2019

BTW I just checked how TypeScript employs this feature and it does exactly what I described here, so I guess that was the indeed the intent.

@Simn
Copy link
Member

Simn commented Dec 19, 2019

@RealyUniqueName Do you remember if cl_descendants can be relied upon for display purposes? I know we changed this a bit but I'm not sure what the current state is.

@RealyUniqueName
Copy link
Member

I think, we can't rely on it for display.
cl_descendants is populated upon filters step.

@RealyUniqueName RealyUniqueName added this to the Release 4.1 milestone Dec 19, 2019
@Simn
Copy link
Member

Simn commented Jan 5, 2020

This indeed looks like it could be solved by using the statistics module with a different filter function afterwards.

I can work on the Haxe side, but as usual I'm unable to compile vshaxe so somebody else has to set that up.

@Simn Simn self-assigned this Jan 5, 2020
Simn added a commit that referenced this issue Jan 13, 2020
Simn added a commit that referenced this issue Jan 14, 2020
* [display] reorganize statistics a bit

* [display] extend reference finding to parent/child fields

see #9044

* [display] always walk up the chain to find overrides

* [display] collect interface field implementations transitively

* [display] consider subclasses transitively as well

* [display] and make implementation relations transitive too

* [display] add display/implementation

see #9043

* [display] add GotoImplementation

* [display] speed up implementation finding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants