redhat-developer / redhat-developer/vscode-java

[Request] Auto-Import Priority

オープン
#4,217 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

enhancement ux
主要言語
TypeScript
スター
2.3k
フォーク
546
平均マージ
20時間 1分
マージ済み PR(30日)
11

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、既存の java.completion.filteredTypes の動作と、VS Code Java extension における completion および organize-import のエントリーポイントを確認します。順序付きの型フィルターが、該当する型を非表示にすることなく候補と import の整理にどのような影響を与えるべきかを定義し、その後、要求された優先順位の動作に対するテストカバレッジを追加します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java, typescript, vscode
領域
developer-experience, tooling
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。