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
470
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.6k
ConcatAdapterを深掘る
androhi
1
420
Android Studio 4.1推しポイント!
androhi
0
1.3k
一人開発でつまづいたときの処方箋
androhi
0
350
Androidの物理ベースアニメーション
androhi
1
610
ConstraintLayout再入門
androhi
2
3.5k
Firebase Analytics 使用感
androhi
0
900
Support Library v23.2 overview
androhi
0
690
Support Library 総復習
androhi
2
2.5k
Other Decks in Programming
See All in Programming
ReadMoreTextView
fornewid
1
420
Passkeys for Java Developers
ynojima
3
860
ASP.NETアプリケーションのモダナイズ インフラ編
tomokusaba
1
260
AIコーディング道場勉強会#2 君(エンジニア)たちはどう生きるか
misakiotb
1
210
Datadog RUM 本番導入までの道
shinter61
1
280
イベントストーミングから始めるドメイン駆動設計
jgeem
4
840
実はすごいスピードで進化しているCSS
hayato_yokoyama
0
110
Blueskyのプラグインを作ってみた
hakkadaikon
1
550
Cursor Meetup Tokyo ゲノミクスとCursor: 進化と制約のあいだ
koido
2
1k
Julia という言語について (FP in Julia « SIDE: F ») for 関数型まつり2025
antimon2
3
950
Java on Azure で LangGraph!
kohei3110
0
130
GraphRAGの仕組みまるわかり
tosuri13
6
330
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
Raft: Consensus for Rubyists
vanstee
140
7k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Building a Modern Day E-commerce SEO Strategy
aleyda
41
7.3k
Building Applications with DynamoDB
mza
95
6.4k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.9k
Speed Design
sergeychernyshev
31
990
Thoughts on Productivity
jonyablonski
69
4.7k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
How to train your dragon (web standard)
notwaldorf
92
6.1k
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(Λߋ৽͢Δʹ࠶ੜ͢Δ͔͠ͳ͍ʢʁʣ