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
IntelliJ Plugin 開発で実装したこと
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Takahiro Shimokawa
September 15, 2015
Programming
490
0
Share
IntelliJ Plugin 開発で実装したこと
IntelliJ Plugin開発をしている中で学んだことをまとめました
Takahiro Shimokawa
September 15, 2015
More Decks by Takahiro Shimokawa
See All by Takahiro Shimokawa
PlayStoreでの新しいユーザー訴求 -LiveOpsの活用とその成果-
androhi
0
2.9k
ConcatAdapterを深掘る
androhi
1
480
Android Studio 4.1推しポイント!
androhi
0
1.5k
一人開発でつまづいたときの処方箋
androhi
0
400
Androidの物理ベースアニメーション
androhi
1
680
ConstraintLayout再入門
androhi
2
3.5k
Firebase Analytics 使用感
androhi
0
930
Support Library v23.2 overview
androhi
0
750
Support Library 総復習
androhi
2
2.6k
Other Decks in Programming
See All in Programming
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
2.6k
Are We Really Coding 10× Faster with AI?
kohzas
0
140
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
1
200
when storing skills in S3 file
watany
3
1.4k
AIを導入する前にやるべきこと
negima
2
340
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
490
Claude CodeでETLジョブ実行テストを自動化してみた
yoshikikasama
0
1.2k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
550
My daily life on Ruby
a_matsuda
3
200
ソースコード→AST→オペコード、の旅を覗いてみる
o0h
PRO
1
130
Agentic Elixir
whatyouhide
0
440
UaaL×Androidアプリのメモリ計測 — Memory Profilerの先へ
rio432
0
130
Featured
See All Featured
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.5k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
280
Optimizing for Happiness
mojombo
378
71k
Claude Code のすすめ
schroneko
67
220k
Done Done
chrislema
186
16k
My Coaching Mixtape
mlcsv
0
120
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
43k
Docker and Python
trallard
47
3.8k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
230
Transcript
IntelliJ(Plugin(։ൃͰ࣮ͨ͜͠ͱ androhi(at(IntelliJ(Plugin(ษڧձ(#2
࡞ͬͨ!Plugin • Android(Drawable(Viewer • 1,300(DL͑ͨ • ॳ(Android(Arsenal • ॳ(Pull(Request((shiraji(͞Μ)
࣮ͨ͜͠ͱ • ToolWindow • FactoryΫϥε • setToolbarϝιου • setContentϝιου •
refresh?
ToolWindow)*)extensions plugin.xml <idea-plugin version="2"> <extensions defaultExtensionNs="com.intellij"> <!-- Add your extensions
here --> <toolWindow anchor="right" canCloseContents="true" id="DrawableViewer" factoryClass="xxx.AndroidDrawableViewerToolWindowFactory" /> ... </extensions> ...
ToolWindow)*)ToolWindowFactory AndroidDrawableViewerToolWindowFactory public class AndroidDrawableViewerToolWindowFactory implements ToolWindowFactory { @Override public
void createToolWindowContent(Project project, ToolWindow toolWindow) { DrawableViewer viewer = new DrawableViewer(project); final ContentManager contentManager = toolWindow.getContentManager(); final Content content = contentManager.getFactory().createContent(viewer, null, false); contentManager.addContent(content); } }
ToolWindow)*)SimpleToolWindowPanel DrawableViewer public class DrawableViewer extends SimpleToolWindowPanel implements ActionListener {
public DrawableViewer(final Project project) { super(true, true); ... setToolbar(createToolbarPanel()); setContent(createContentPanel()); } ...
ToolWindow)ͷߏ
ToolWindow)*)setToolbar(JComponent) private JComponent createToolbarPanel() { final DefaultActionGroup actionGroup = new
DefaultActionGroup(); actionGroup.add(new EditTargetResDirAction()); final ActionToolbar actionToolbar = ActionManager.getInstance().createActionToolbar( "AndroidDrawableViewer", actionGroup, true); return actionToolbar.getComponent(); }
ToolWindow)*)setContent(JComponent) private JScrollPane createContentPanel() { ... itemList = new JBList(panels);
... return ScrollPaneFactory.createScrollPane(itemList); }
ToolWindow)*)refresh? Se#ngsDialog @Override protected void doOKAction() { super.doOKAction(); ... resetContent(project);
} private void resetContent(Project project) { DrawableViewer drawableViewer = new DrawableViewer(project); ContentManager contentManager = ToolWindowManager.getInstance(project) .getToolWindow(Constants.TOOL_WINDOW_ID).getContentManager(); Content content = contentManager.getFactory().createContent(drawableViewer, null, false); contentManager.removeAllContents(true); contentManager.addContent(content); } ...
ToolWindow)·ͱΊ • anchor(Ͱࢦఆͨ͠ॴʹৗறͰ͖Δίϯϙʔωϯτ • Toolbar(ͱ(Content(Ͱߏ͞Ε͍ͯΔ • ToolWindow(Λߋ৽͢Δʹ࠶ੜ͢Δ͔͠ͳ͍ʢʁʣ