Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Essential Refactoring for Scala with IDE
Search
Ryuhei Ishibashi
July 02, 2021
0
18
Essential Refactoring for Scala with IDE
Ryuhei Ishibashi
July 02, 2021
Tweet
Share
More Decks by Ryuhei Ishibashi
See All by Ryuhei Ishibashi
Scalaエンジニアなら知っておきたいJVMの話
rysh
0
46
QA素人がゼロからQA組織を立ち上げるno
rysh
0
130
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
60
14k
What's in a price? How to price your products and services
michaelherold
237
11k
How STYLIGHT went responsive
nonsquared
92
4.8k
GraphQLとの向き合い方2022年版
quramy
32
12k
It's Worth the Effort
3n
180
27k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
6
1.5k
Building an army of robots
kneath
300
41k
The Brand Is Dead. Long Live the Brand.
mthomps
49
29k
A Tale of Four Properties
chriscoyier
151
22k
Typedesign – Prime Four
hannesfritz
36
2.1k
BBQ
matthewcrist
80
8.8k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
357
22k
Transcript
Essential Refactoring for Scala with IDEA twitter: @cactaceae
突然ですが、
リファクタリングしてますか?
IDEの機能つかってますか?
体の一部のように IDEを使いこなして欲しい
思考を中断せずに リファクタリングして欲しい
息をするように リファクタリングして欲しい
ショートカットを覚えよう!
どんな機能がある?
ScalaIDE http://scala-ide.org/docs/2.0.x/features/refactoring.html
Intellij IDEA https://www.jetbrains.com/help/idea/2017.1/refactoring-source-c ode.html
リファクタリング四天王
• リネーム • メソッド抽出 • 変数抽出 • インライン化 リファクタリング四天王
4つの操作を組み合わせると 安全にロジックを変形できる
リネーム
リネーム IntelliJ IDEA Help : Rename Shift + F6
メソッド抽出
メソッド抽出
メソッド抽出 IntelliJ IDEA Help : Extract Method Option + Command
+ Method
変数抽出
変数抽出 IntelliJ IDEA Help : Extract Variable Option + Command
+ Variable
インライン化
インライン化 IntelliJ IDEA Help : Inline Option + Command +
N
ローカル変数のインライン化
メソッドのインライン化
引数つきメソッドのインライン化
Inline of functions with parameters is not supported!!!
インライン化
インライン化
TODO: comment と vote する https://youtrack.jetbrains.com/issue/SCL-208 4 https://youtrack.jetbrains.com/issue/SCL-895 1