Remove Redundant Type Hierarchy
Les mainteneurs répondent en général sous 1 jour
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 66/100
- Type d'issue
- Refactorisation
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- typescript, vscode
- Domaine
- tooling
Piste de recherche
Start in package.json and find the command IDs and menu contributions for the custom type hierarchy, then grep those IDs across the extension. Read typeHierarchyTree.ts and references-view.d.ts to see what can be deleted, and check the command implementations registered elsewhere. Done means the duplicate "Show Type Hierarchy" entry is gone, the custom commands and UI code are removed, and the extension builds and tests pass.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Describe the bug
Currently, when you right click a class name, there are two context menu entries called "Show Type Hierarchy".
One is contributed by us (vscode-java) and one is a default one provided by VS Code.
We should remove the entry provided by us, along with all the associated UI code, since the default type hierarchy UI provided by VS Code is sufficient, and removing code with reduce the complexity of this project. VS Code provides this UI automatically, since jdtls advertises it supports type hierarchy. The other entry exists because we implemented type hierarchy support before it was added into the LSP specification.
There is one minor difference between our custom type hierarchy UI and the default UI: we provide a "Class Hierarchy" view that shows both super classes and sub classes at the same time. However, after talking this through with Rob, I don't think it's worth saving this UI, since then there would be two different ways to access the same information, which would be confusing to end users.
Here's a list of things we'll need to remove: (hopefully complete but there might be other things as well):
- The UI itself, i.e.
typeHierarchyTree.ts - The typings we have for interacting with VS Code's references view API (
references-view.d.ts) - The commands to open the type hierarchy view (these are registered in package.json and implemented throughout the codebase; grepping for the id listed in the package.json should find the implementations)
- The registration of various commands (also in the package.json)
- There's separate "Subtype hierarchy" and "Supertype hierarchy" commands that are referenced in code, but only appear in the command palette and currently don't seem to function. These should be removed
See https://github.com/redhat-developer/vscode-java/pull/2376 for some more context
To Reproduce
Steps to reproduce the behaviour:
- Make a type that inherits from a few other types:
public class B extends A implements Serializable {
}
- Right click on the type name (in this case
B). - There are two "Show Type Hierarchy"
Expected behaviour
There should instead be one "Show Type Hierarchy" entry
Environment
- Operating System: Linux (but it's not Linux specific)
- JDK version: 25
- Visual Studio Code version: 1.143.1
- Java extension version: 1.59.0
Additional Information
- Langage dominant
- TypeScript
- Étoiles
- 2.3k
- Forks
- 549
- Merge moyen
- 4 j 16 h
- PR mergées (30 j)
- 20
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de redhat-developer/vscode-java
-
bug
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
redhat-developer/vscode-java#4564 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
redhat-developer/vscode-java#4550 · 1 commentaire · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
redhat-developer/vscode-java#4537 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
bug need info
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
redhat-developer/vscode-java#4520 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
redhat-developer/vscode-java#4517 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de redhat-developer/vscode-java
Issues similaires
-
backend bug documentation
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
geolens-io/geolens#3568 ·
Les mainteneurs répondent en général sous 1 jour
-
area:docs documentation good first issue priority:low
Difficulté 1/5 Moins d'une heure Accessibilité débutants 80/100
rtk-ai/rtk#4900 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
API: `tsc.exe` opens a visible console window on Windows when the parent process has no consoleOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
microsoft/TypeScript#65083 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
Les mainteneurs répondent en général sous 1 jour
-
bug p2 platform:web triaged
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour