redhat-developer / redhat-developer/vscode-java

"Show Call Hierarchy" should have the ability to filter calls, or apply name filter patterns

Aperta
#2,179 3 commenti 4 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

enhancement navigation upstream
Lingua principale
TypeScript
Stelle
2.3k
Fork
546
Merge medio
20h 1m
PR unite (30g)
11

Descrizione

When I use Show Call Hierarchy on a property in a Java class object that is frequently used in both the main source code, as well as in the unit tests, the Call Hierarchy list would display a bunch of results. Because, the results include both the main source code and unit tests references, there isn't a way to automatically exclude certain folder directories or paths out from unwanted invocations.

I would like to request for the feature to apply any one of the following options:

  • Filter test codes. (unit test codes, or codes residing under src/test/java)
  • Apply name filter patterns. (Only includes reference names that matches the given filter patterns.)
  • Limit the call depth of a given number. (Only goes down in depth up to the given number, inclusive.)

This feature is similar to Eclipse's "Filter Calls" dialog:

image

This is accessed by invoking "Show Call Hierarchy" on a class member, then opening "Filters" in the "More Options" menu in Eclipse IDE.

Currently, we don't have anything similar to this in Visual Studio Code with RedHat Java extensions installed.

Environment
  • Operating System: Ubuntu 20.04.2 LTS
  • JDK version: AdoptOpenJDK 11 (jdk-11.0.11+9)
  • Visual Studio Code version: 1.61.2
  • Java extension version: v1.0.0 (October 19, 2021)
Steps To Reproduce
  1. Open any Java class object whose object is used in both the main source code, as well as in the unit test codes.
  2. On any identifiers (method name, class field name, etc.), do SHIFT+ALT+H to invoke "Show Call Hierarchy".
  3. Observe in the list, notice how there aren't any options available to filter certain call invocations from the results. You would have to manually click on the "X" button to remove the entry you don't want, one by one.
Current Result

The "Show Call Hierarchy" looks something like this.

image

Expected Result

After filtering out either all test codes, or applying a name filter pattern to exclude any references containing "test", it should look something like this:

image

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia dal punto di ingresso Show Call Hierarchy dell’estensione VS Code Java e verifica come vengono presentati i relativi risultati. Confronta il filtraggio richiesto del codice di test, i pattern dei nomi e il limite della profondità delle chiamate, quindi determina l’ambito accettato. Il lavoro è completo quando il comportamento di filtraggio scelto è disponibile dalla call hierarchy UI e copre il caso d’uso indicato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java, typescript, vscode
Ambito
devtools
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.