Add lenses on interface methods to allow navigating to implementations
We could add lenses to interface methods in interfaces themselves, allowing navigation to the definition of methods 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:
- Classes must implement the methods of an interface themselves, unless they are abstract.
- Interfaces can also extend other interfaces, so the children of an interface must also be checked.
Care should be taken with performance (especially recursion). Perhaps recursing can be delayed until the command is resolved.
The client will need to show a list of possibilities here, so we'll need new custom commands for this.