intellij-rust/intellij-rust

Improve "extract function" dialog

Aperta

#2186 aperta il 10 gen 2018

 (1 commento) (0 reazioni) (0 assegnatari)Kotlin (376 fork)batch import
E-unknownhelp wantedimprovementsubsystem::code insightsubsystem::ui

Metriche repository

Star
 (4526 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Current "extract function" dialog is not ideal and can be improved:

  • Don't allow press "OK" button if function name is empty (it leads to exception) or invalid
  • Show simple text field if we can't suggest function name instead of empty drop down list
  • Reformat code in "Signature" field (and maybe drop function body at all)
  • Enable window resizing
  • Allow renaming arguments
  • Allow to manually select arguments
  • Allow changing argument's ownership/mutability (T/&T/&mut T/mut T)
  • Allow changing argument's type

Good example is kotlin "Extract function" dialog

Guida contributor