redhat-developer / redhat-developer/vscode-java

Renaming a Java object to change the case without changing the name does not result in a properly renamed file

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

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

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

説明

If you have a class, say someClassIWrote, tied to a file someClassIWrote.java and you rename the class using the F2 refactor command changing only the case, to, say, SomeClassIWrote, the filename's case does not change to match. This causes the error "The public type SomeClassIWrote must be defined in its own fileJava(16777541)" to be emitted. Renaming the file itself fixes the problem. (Interestingly, the Tab filename does not change to match.) This is probably due to a mismatch between the case sensitivity of the Linux OS vs the case insensitivity of the Windows OS.

Environment
  • Operating System: Windows 10
  • JDK version:
    openjdk version "17.0.8.1" 2023-08-24
    OpenJDK Runtime Environment Temurin-17.0.8.1+1 (build 17.0.8.1+1)
    OpenJDK 64-Bit Server VM Temurin-17.0.8.1+1 (build 17.0.8.1+1, mixed mode, sharing)
  • Visual Studio Code version: 1.85.1 (WPILib FIRST Robotics edition)
  • Java extension version: v1.30.2024042308
Steps To Reproduce
  1. Create an object
  2. Change the case of a single letter via the F2 command

I'm somewhat inexperienced with this IDE, so I will go after logs on request. I figure checking for this behavior is extremely easy.

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

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

はじめの一歩

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

調査の方向性

VS Code Java extension の F2 リネームコマンドから始め、Windows で大文字と小文字だけが変わるクラスのリネームを再現します。リネームによって Java ファイルとエディタータブがどのように更新されるかを追跡します。完了条件は、両方が新しいクラス名の大文字と小文字に一致し、public-type diagnostic が表示されないことです。

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

評価

技術スタック
java, vscode
領域
developer-experience, tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

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

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