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
Android Postfix Completionで爆速コーディング
Search
takahirom
November 06, 2015
Programming
2
690
Android Postfix Completionで爆速コーディング
takahirom
November 06, 2015
Tweet
Share
More Decks by takahirom
See All by takahirom
Robolectric Native Graphics and Roborazzi
takahirom
1
1.6k
Androidアプリで安定して動作させ継続的に開発するために設計の原則を利用して開発した話
takahirom
2
1.3k
Android Tools & Performance
takahirom
1
1.1k
Jetpack Compose State Practices
takahirom
1
1.3k
Inside Jetpack Compose
takahirom
1
820
What’s new in Android Jetpack and Tools
takahirom
0
360
ABEMAのKotlin Multiplatform
takahirom
4
5.5k
What's new in Kotlin Coroutines on Android
takahirom
2
2.6k
DroidKaigiアプリの Kotlin Multiplatform
takahirom
2
2.5k
Other Decks in Programming
See All in Programming
PLoP 2024: The evolution of the microservice architecture pattern language
cer
PRO
0
2.4k
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
3
430
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
340
Kubernetes for Data Engineers: Building Scalable, Reliable Data Pipelines
sucitw
1
220
讓數據說話:用 Python、Prometheus 和 Grafana 講故事
eddie
0
390
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
170
受け取る人から提供する人になるということ
little_rubyist
0
180
Importmapを使ったJavaScriptの 読み込みとブラウザアドオンの影響
swamp09
4
1.3k
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
160
Realtime API 入門
riofujimon
0
140
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
420
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.1k
Featured
See All Featured
RailsConf 2023
tenderlove
29
890
Docker and Python
trallard
40
3.1k
For a Future-Friendly Web
brad_frost
175
9.4k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Code Review Best Practice
trishagee
64
17k
[RailsConf 2023] Rails as a piece of cake
palkan
51
4.9k
Facilitating Awesome Meetings
lara
49
6.1k
Gamification - CAS2011
davidbonilla
80
5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Intergalactic Javascript Robots from Outer Space
tanoku
268
27k
What's new in Ruby 2.0
geeforr
343
31k
Transcript
Android Postfix Completion ͰരίʔσΟϯά takahirom
takahirom • Android͕͖Ͱ͢ • AndroidͷϥΠϒϥϦ,AndroidStudioϓϥάΠϯΛ࡞͍ͬͯͨΓ͠·͢ • Github͕झຯͰ͢ • 11ίϛοτΛଓ͚͍ͯ·͢ •
Contribution streak͕365ʹͳΓ·ͨ͠ʂ
takahirom • Android͕͖Ͱ͢ • AndroidͷϥΠϒϥϦ,AndroidStudioϓϥάΠϯΛ࡞͍ͬͯͨΓ͠·͢ • Github͕झຯͰ͢ • 11ίϛοτΛଓ͚͍ͯ·͢ •
Contribution streak͕365ʹͳΓ·ͨ͠ʂ ↑ͷΛ͠·͢
Postfix Completionͱ
Postfix Completionͱ • AndroidStudioͷݩͷIntelliJ IDEAʹ͋Δػೳ
Postfix Completionͱ • AndroidStudioͷݩͷIntelliJ IDEAʹ͋Δػೳ • test.par Ͱ (test)ͱ͍ͬͨมΛͯ͘͠ΕͨΓͱ͍ͬͨิ͕ Ͱ͖ΔͷͰ͢ɻ
Postfix Completionͱ • AndroidStudioͷݩͷIntelliJ IDEAʹ͋Δػೳ • test.par Ͱ (test)ͱ͍ͬͨมΛͯ͘͠ΕͨΓͱ͍ͬͨิ͕ Ͱ͖ΔͷͰ͢ɻ
• Android StudioσϑΥϧτͰར༻Ͱ͖·͢ɻ
Postfix Completionͱ • AndroidStudioͷݩͷIntelliJ IDEAʹ͋Δػೳ • test.par Ͱ (test)ͱ͍ͬͨมΛͯ͘͠ΕͨΓͱ͍ͬͨิ͕ Ͱ͖ΔͷͰ͢ɻ
• Android StudioσϑΥϧτͰར༻Ͱ͖·͢ɻ • ৭Μͳछྨ͕͋ͬͯศརͰ͢
Postfix Completion σϞ • new ArrayList<String>().var • list.for • savedInstanceState.nn
• list.field • ɻɻɻɻ
Postfix Completion σϞ • new ArrayList<String>().var • list.for • savedInstanceState.nn
• list.field • ɻɻɻɻ • ઃఆը໘ʹҰཡ͕͋Γ·͢
࠷ߴʂAndroid൛ཉ͍͠ʂ
࠷ߴʂAndroid൛ཉ͍͠ʂ • ઃఆը໘͔Β͍͡Εͳ͍ɺɺ
࠷ߴʂAndroid൛ཉ͍͠ʂ • ઃఆը໘͔Β͍͡Εͳ͍ɺɺ • ࡞ΕΔΈ͍ͨͳͷͰ࡞Γ·ͨ͠ʂ
࠷ߴʂAndroid൛ཉ͍͠ʂ • ઃఆը໘͔Β͍͡Εͳ͍ɺɺ • ࡞ΕΔΈ͍ͨͳͷͰ࡞Γ·ͨ͠ʂ • →Android Postfix Completion
Android Postfix Completionͱ
Android Postfix Completionͱ • “Postfix Completion”ΛAndroidಛԽʹͨ͠ͷ
Android Postfix Completionͱ • “Postfix Completion”ΛAndroidಛԽʹͨ͠ͷ • ࣗ࡞Android StudioϓϥάΠϯ
Android Postfix Completionͱ • “Postfix Completion”ΛAndroidಛԽʹͨ͠ͷ • ࣗ࡞Android StudioϓϥάΠϯ •
6000μϯϩʔυಥഁ
Android Postfix Completionͱ • “Postfix Completion”ΛAndroidಛԽʹͨ͠ͷ • ࣗ࡞Android StudioϓϥάΠϯ •
6000μϯϩʔυಥഁ • https://plugins.jetbrains.com/plugin/7775?pr=
ϥΠϒίʔσΟϯά • Ϣʔβʔ໊ͱύεϫʔυ͕ೖ͍ͬͯͯ • fabΛλοϓ͢Δͱ • ”ొྃ”ͱ͍͏τʔετΛදࣔ͢Δ
Android Postfix CompletionͰͰ͖Δ͜ͱ • .toast ←τʔετ࡞ΕΔ • .log←ϩάग़ͤΔ • .findv←findViewग़ͤΔ
• isemp←TextUtils.isEmpty (@kikuchy͞Μ͋Γ͕ͱ͏) • ͳͲͳͲ
ࣗͰςϯϓϨʔτΛՃͯ͠ΈΑ͏ • ։ൃڥߏஙʹ͍ͭͯ • ͜ͷϓϥάΠϯͷΈʹ͍ͭͯ
ڥߏங 1. git clone
[email protected]
:takahirom/android-postfix-plugin.git 2. IntelliJ IDEAͰΠϯϙʔτ(Πϯετʔϧ͓͍͍ͯͯͩ͘͠͞) 3. Run/Debug
configuration͔ΒGradleͰઃఆ 4. ࣮ߦ͢ΔͱPluginΠϯετʔϧࡁΈIntelliJ IDEA͕ىಈ͢Δ
ڥߏங • Run/Debug configuration͔Β GradleͰઃఆ • ݁ߏ؆୯Ͱ͢
͜ͷϓϥάΠϯͷΈʹ͍ͭͯ (݁ߏख୳ΓͳͷͰࣗ৴͕ͳ͍෦͕ ଟʑ͋Γ·͢)
1:postfixTemplateProviderΛఆٛ • plugin.xml͕AndroidManifest.xmlͷΑ͏ͳͷͰ͢ɻ • (Ճ͢Δ߹͢Ͱʹొ͞Ε͍ͯΔͷͰมߋ͢Δඞཁ ͳ͍Ͱ͢)
2:ProviderͷΫϥεΛ࡞ΓςϯϓϨʔτҰཡΛฦ͢ • ͲΜͳςϯϓϨʔτ͕͋Δͷ͔ΛAndroidStudioʹೝࣝͤ͞Δ
3:TemplateΛ࡞Δ • .soutͰSystem.out.println($expr);Λग़͢ྫ
3:TemplateΛ࡞Δ • .soutͰSystem.out.println($expr);Λग़͢ྫ ม.soutͰදࣔ͞ΕΔ
3:TemplateΛ࡞Δ • .soutͰSystem.out.println($expr);Λग़͢ྫ ม.soutͰදࣔ͞ΕΔ ม࣌ʹީิʹදࣔ͞ΕΔྫ
3:TemplateΛ࡞Δ • .soutͰSystem.out.println($expr);Λग़͢ྫ ม.soutͰදࣔ͞ΕΔ ม࣌ʹީิʹදࣔ͞ΕΔྫ ީิʹදࣔ͢Δมͷ݅
3:TemplateΛ࡞Δ • .soutͰSystem.out.println($expr);Λग़͢ྫ ม.soutͰදࣔ͞ΕΔ ม࣌ʹީิʹදࣔ͞ΕΔྫ ީิʹදࣔ͢Δมͷ݅ ςϯϓϨʔτ $expr$ม.soutͷม $END$ऴྃ࣌ͷΧʔιϧͷҐஔ
4:มͷ༰ͳͲʹΑͬͯಈతʹม͑Δ • .logͰLog.d(“MainActivity”, “i:” + i)Ͱ͍ͬͯΔ͜ͱ
4:มͷ༰ͳͲʹΑͬͯಈతʹม͑Δ • .logͰLog.d(“MainActivity”, “i:” + i)Ͱ͍ͬͯΔ͜ͱ static import͍ͯ͠Δ͔ Ͳ͏͔Ͱɺग़͢จࣈΛม͑Δ
4:มͷ༰ͳͲʹΑͬͯಈతʹม͑Δ • .logͰLog.d(“MainActivity”, “i:” + i)Ͱ͍ͬͯΔ͜ͱ ςϯϓϨʔτจࣈྻ $TAG $expr $END$͕͋Δ
static import͍ͯ͠Δ͔ Ͳ͏͔Ͱɺग़͢จࣈΛม͑Δ
4:มͷ༰ͳͲʹΑͬͯಈతʹม͑Δ • .logͰLog.d(“MainActivity”, “i:” + i)Ͱ͍ͬͯΔ͜ͱ ςϯϓϨʔτจࣈྻ $TAG $expr $END$͕͋Δ
$exprʹೖ͢Δ Log.dͷҾStringͳͷͰ ඞཁʹԠͯ͡”expr:”+exprʹ͢Δ static import͍ͯ͠Δ͔ Ͳ͏͔Ͱɺग़͢จࣈΛม͑Δ
4:มͷ༰ͳͲʹΑͬͯಈతʹม͑Δ • .logͰLog.d(“MainActivity”, “i:” + i)Ͱ͍ͬͯΔ͜ͱ ςϯϓϨʔτจࣈྻ $TAG $expr $END$͕͋Δ
$exprʹೖ͢Δ Log.dͷҾStringͳͷͰ ඞཁʹԠͯ͡”expr:”+exprʹ͢Δ $TAGʹೖ͢Δ ඞཁʹԠͯ͡TAGมΛͬͨΓɺ Ϋϥε໊ΛͬͨΓ͢Δ static import͍ͯ͠Δ͔ Ͳ͏͔Ͱɺग़͢จࣈΛม͑Δ
5:ઃఆը໘ʹදࣔ͞ΕΔtemplateϑΝΠϧΛॻ͘
ͭΒ͍͜ͱ • ݁ߏ࣮ํ๏ख୳ΓͰ͢ • AOSP͔ΒAndroid StudioͷίʔυΛམͱͤΔͷͰɺGrep͠·͘Γ· ͠ΐ͏(R.id.text→TextViewΈ͍ͨͳͷΛ୳ͨ͠Γ͠·ͨ͠) • AOSPͷAndroid StudioͷcloneͱϏϧυ:http://tools.android.com/build
• IntelliJ Plugin ษڧձͰݟ͕ٵ͑·͢ɻ(Gradle-intellij-pluginΛڭ͑ͯ ͑ͨΓ͠·ͨ͠ɻ)
·ͱΊ • ͥͻͬͯΈ͍ͯͩ͘͞ʂ https://plugins.jetbrains.com/plugin/7775 • ϑΟʔυόοΫ͍ͬͯ·͢ʂ • ϓϧϦΫΤετ͍ͬͯ·͢ʂhttps://github.com/takahirom/android- postfix-plugin •
GradleରԠ͍ͯ͠ΔͷͰ݁ߏ؆୯ʹ։ൃڥ࡞Ε·͢ʂ • GithubͷϦϙδτϦʹ˒͚͍ͭͯͩ͘͞ʂ