redhat-developer / redhat-developer/vscode-java

[Request] Auto-Import Priority

Offen
#4,217 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

enhancement ux
Vorherrschende Sprache
TypeScript
Sterne
2.3k
Forks
546
Ø Merge
20 Std. 1 Min.
Gemergte PRs (30 T.)
11

Beschreibung

I've been using VSCode for Java development for the past 5 years, and I keep having the friction when working with an API - there's no (obvious) way to prioritise one package over another.

I'd like an option to provide a list of type filter-strings which organise the imports based upon those filters - like how java.completion.filteredTypes operates:

All types whose fully qualified name matches the selected filter strings will be ignored in content assist or quick fix proposals and when organizing imports. For example 'java.awt.*' will hide all types from the awt packages.

Simply put, if I put org.bukkit at the top of the entry, then suggestions from org.bukkit.* should be at the top of the import list, so you can just hit [Enter], rather than having to select the correct option.
I.e. I only use, and will probably only use the second option, yet there's no way to prioritise that package:
Image

As I've mentioned, I'm aware of filteredTypes, but I don't want these types filtered in-case I want to use them later-on. Being able to prioritise types, such as an importPriority option, would allow this problem to be fixed in-general, for any project, rather than having to set filteredTypes for every project individually.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginnen Sie mit der Überprüfung des bestehenden Verhaltens von java.completion.filteredTypes sowie der completion- und organize-import-Einstiegspunkte in der VS Code Java extension. Legen Sie fest, wie geordnete Typfilter Vorschläge und die Importorganisation beeinflussen sollen, ohne passende Typen auszublenden, und fügen Sie anschließend Tests für das angeforderte Prioritätsverhalten hinzu.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java, typescript, vscode
Bereich
developer-experience, tooling
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.