redhat-developer / redhat-developer/vscode-java

[Feature Request] Execute git mv when class is moved via refactor

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

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

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

説明

Currently when refactoring a class in a git repo, the refactoring action provided by the Java language server simply creates a new class file and deletes the old one. The git mv command requires the file being moved to exist not only in the change history, but also within the repo itself. This means that if one would like to execute git mv to preserve the commit history of the file, they must initiate the refactor, manually move the file back to its original location, prompt the language server to skip refactoring for this second move, and finally execute git mv to have change history be preserved.

Environment
  • Operating System: Windows 11
  • JDK version: 17
  • Visual Studio Code version: 1.74.2
  • Java extension version: 1.13.0
Steps To Reproduce
  1. Initiate refactoring of a Java class
  2. Observe the class is moved, but the git history is not preserved
Current Result

Git history is not preserved

Expected Result

Git history is preserved

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

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

はじめの一歩

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

調査の方向性

Issue にはソースファイル、テスト、エントリポイントが記載されていません。Java リファクタリングアクションとその VS Code 拡張機能との統合部分から始め、クラスの移動がどのように実行されるかを追ってください。指定された Windows セットアップ上でクラスの移動によって Git 履歴が保持され、既存のリファクタリング動作も維持されれば完了です。

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

評価

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

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

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