Remove Redundant Type Hierarchy
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 66/100
- Tipo de issue
- Refatoração
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript, vscode
- Domínio
- tooling
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- TypeScript
- Estrelas
- 2.3k
- Forks
- 549
- Merge médio
- 4d 21h
- PRs com merge (30d)
- 19
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de redhat-developer/vscode-java
-
bug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
redhat-developer/vscode-java#4564 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
redhat-developer/vscode-java#4550 · 1 comentário · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
redhat-developer/vscode-java#4537 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug need info
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
redhat-developer/vscode-java#4520 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
redhat-developer/vscode-java#4517 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de redhat-developer/vscode-java
Issues semelhantes
-
bug
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 86/100
awslabs/visual-asset-management-system#937 ·
Mantenedores costumam responder em até 1 dia
-
t0ggles
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
nolimits4web/swiper#8255 · 1 comentário ·
Mantenedores costumam responder em até 15 dias
-
render: --variables-file (and --variables <path>) fails with "io.readFile is not a function" since 0.8.212Talvez já em andamento @miguel-heygen assumiu hoje. Abertabug triage/needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
heygen-com/hyperframes#6830 ·
Mantenedores costumam responder em até 1 dia
-
bug launch local use
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
Mantenedores costumam responder em até 1 dia
-
account: profile bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 5 dias