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
440
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.3k
ConcatAdapterを深掘る
androhi
1
360
Android Studio 4.1推しポイント!
androhi
0
1.2k
一人開発でつまづいたときの処方箋
androhi
0
290
Androidの物理ベースアニメーション
androhi
1
550
ConstraintLayout再入門
androhi
2
3.4k
Firebase Analytics 使用感
androhi
0
850
Support Library v23.2 overview
androhi
0
640
Support Library 総復習
androhi
2
2.4k
Other Decks in Programming
See All in Programming
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
4
640
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
250
現場で役立つモデリング 超入門
masuda220
PRO
15
3.2k
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
1
290
RubyLSPのマルチバイト文字対応
notfounds
0
120
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
110
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.3k
Featured
See All Featured
Scaling GitHub
holman
458
140k
A Tale of Four Properties
chriscoyier
156
23k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
Producing Creativity
orderedlist
PRO
341
39k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
120
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Teambox: Starting and Learning
jrom
133
8.8k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Speed Design
sergeychernyshev
24
610
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(Λߋ৽͢Δʹ࠶ੜ͢Δ͔͠ͳ͍ʢʁʣ