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
34
0
Share
Essential Refactoring for Scala with IDE
Ryuhei Ishibashi
July 02, 2021
More Decks by Ryuhei Ishibashi
See All by Ryuhei Ishibashi
Scalaエンジニアなら知っておきたいJVMの話
rysh
0
74
QA素人がゼロからQA組織を立ち上げるno
rysh
0
160
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Building AI with AI
inesmontani
PRO
1
1k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
930
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
250
Mobile First: as difficult as doing things right
swwweet
225
10k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
460
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
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