Gert-dev / php-ide-serenata

Atom IDE package that integrates the Serenata server to provide PHP code assistance
https://serenata.gitlab.io/
Other
274 stars 19 forks source link

Add annotations on interface methods to their implementations #390

Closed Gert-dev closed 5 years ago

Gert-dev commented 6 years ago

We could add annotations to interface methods in interfaces themselves, allowing the user to navigate to the definition of the method in classes that implement the method. This involves using the directImplementors property of the class information to analyze classes that directly use the interface, as well as any subclasses (recursively) of those classes.

Note that the following applies:

Care should be taken that this does not hurt performance (especially the recursing). Perhaps the recursing itself can be delayed until the intention is clicked and directInterfaces can be used as an indication if the annotation should be shown.

We could use something like the intentions package [1] to show a list of matches if there is more than one, allowing the user to click the one he wants to navigate to. An alternative would be to show a view, much like the "Find in project" in Atom itself. This view could show a spinner while matching is occurring.

[1] https://atom.io/packages/intentions

Gert-dev commented 5 years ago

Replaced by this Serenata ticket as this is now handled by the server since #460.