godotengine / godotengine/godot-vscode-plugin

Documentation popup is confused by inheritance

Open
#166 0 comments 0 reactions 0 assignees View on GitHub
bug language server
Dominant language
TypeScript
Stars
2.1k
Forks
257
PR merge metrics
No merged PRs in 30d

Description

## Bug description

Hovering an overriden method either shows the documentation of the parent method or the documentations of _all_ "siblings" overriden methods.

Given [this project demo](https://github.com/godotengine/godot-demo-projects/tree/master/2d/platformer), with the following classes:


class diagram where Actor extends Node, Player extends Actor, Enemy extends Actor

1. Hovering `_physics_process` in `Actor` shows the documentation of the method in the `Node` class:

![image](https://user-images.githubusercontent.com/25926433/80585868-53e95100-8a14-11ea-92ba-7635f353eef8.png)

2. While hovering `_physics_process` in `Player` shows the documentation of all `_physics_process` methods:

![image](https://user-images.githubusercontent.com/25926433/80586003-8b57fd80-8a14-11ea-992c-0dc800020ffa.png)

3. Same thing when hovering a direct method call:

![image](https://user-images.githubusercontent.com/25926433/80586081-b3dff780-8a14-11ea-95f8-3f7be1af6624.png)

## Expected behavior

Case 1: showing the documentation of the parent is great, but honestly unexpected when hovering the method declaration. Showing both parent documentation + method documentation would be perfect.

Case 2: as previously, only the documentations of the parent method(s) and of the actual method should be shown

Case 3: idem, _but_ the more specific documentation (here `Player._physics_process`'s one) should be shown first

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.