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
Google の LLM ライブラリ を Android アプリで 使うには?
takahirom
0
1.2k
Robolectric Native Graphics and Roborazzi
takahirom
1
1.7k
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
860
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
Other Decks in Programming
See All in Programming
Recoilを剥がしている話
kirik
5
7.2k
Go の GC の不得意な部分を克服したい
taiyow
3
840
testcontainers のススメ
sgash708
1
130
Kaigi on Railsに初参加したら、その日にLT登壇が決定した件について
tama50505
0
110
useSyncExternalStoreを使いまくる
ssssota
6
1.4k
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
130
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
300
Cloudflare MCP ServerでClaude Desktop からWeb APIを構築
kutakutat
1
570
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
7
1.5k
命名をリントする
chiroruxx
1
450
採用事例の少ないSvelteを選んだ理由と それを正解にするためにやっていること
oekazuma
2
1.1k
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Mobile First: as difficult as doing things right
swwweet
222
9k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Building Applications with DynamoDB
mza
91
6.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
Done Done
chrislema
182
16k
How STYLIGHT went responsive
nonsquared
96
5.2k
Thoughts on Productivity
jonyablonski
68
4.4k
Producing Creativity
orderedlist
PRO
342
39k
A better future with KSS
kneath
238
17k
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ͷϦϙδτϦʹ˒͚͍ͭͯͩ͘͞ʂ