redhat-developer / redhat-developer/vscode-java

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

Aperta
#2,848 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

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

Descrizione

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

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

Nell’issue non sono indicati file sorgente, test o punti di ingresso. Inizia dall’azione di refactoring Java e dalla sua integrazione con l’estensione VS Code, quindi segui come vengono eseguiti gli spostamenti delle classi. Il lavoro è completato quando lo spostamento di una classe preserva la cronologia Git nella configurazione Windows indicata, mantenendo al contempo il comportamento di refactoring esistente.

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

Valutazione

Stack tecnologico
git, java, typescript, vscode
Ambito
developer-experience, devtools
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.