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
Takahiro Shimokawa
September 15, 2015
Programming
0
480
IntelliJ Plugin 開発で実装したこと
IntelliJ Plugin開発をしている中で学んだことをまとめました
Takahiro Shimokawa
September 15, 2015
Tweet
Share
More Decks by Takahiro Shimokawa
See All by Takahiro Shimokawa
PlayStoreでの新しいユーザー訴求 -LiveOpsの活用とその成果-
androhi
0
2.8k
ConcatAdapterを深掘る
androhi
1
450
Android Studio 4.1推しポイント!
androhi
0
1.4k
一人開発でつまづいたときの処方箋
androhi
0
380
Androidの物理ベースアニメーション
androhi
1
650
ConstraintLayout再入門
androhi
2
3.5k
Firebase Analytics 使用感
androhi
0
910
Support Library v23.2 overview
androhi
0
710
Support Library 総復習
androhi
2
2.5k
Other Decks in Programming
See All in Programming
Java 25, Nuevas características
czelabueno
0
120
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
200
開発に寄りそう自動テストの実現
goyoki
2
1.5k
これならできる!個人開発のすゝめ
tinykitten
PRO
0
130
Go コードベースの構成と AI コンテキスト定義
andpad
0
140
GISエンジニアから見たLINKSデータ
nokonoko1203
0
190
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
400
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
3
620
Grafana:建立系統全知視角的捷徑
blueswen
0
230
ゆくKotlin くるRust
exoego
1
160
AIコーディングエージェント(Manus)
kondai24
0
220
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
900
Featured
See All Featured
エンジニアに許された特別な時間の終わり
watany
106
220k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
410
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
0
960
Why Our Code Smells
bkeepers
PRO
340
57k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
130
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Done Done
chrislema
186
16k
Typedesign – Prime Four
hannesfritz
42
2.9k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
The untapped power of vector embeddings
frankvandijk
1
1.5k
A Tale of Four Properties
chriscoyier
162
23k
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(Λߋ৽͢Δʹ࠶ੜ͢Δ͔͠ͳ͍ʢʁʣ