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
450
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.4k
ConcatAdapterを深掘る
androhi
1
380
Android Studio 4.1推しポイント!
androhi
0
1.3k
一人開発でつまづいたときの処方箋
androhi
0
310
Androidの物理ベースアニメーション
androhi
1
560
ConstraintLayout再入門
androhi
2
3.4k
Firebase Analytics 使用感
androhi
0
860
Support Library v23.2 overview
androhi
0
650
Support Library 総復習
androhi
2
2.4k
Other Decks in Programming
See All in Programming
2025.01.17_Sansan × DMM.swift
riofujimon
2
630
社内フレームワークとその依存性解決 / in-house framework and its dependency management
vvakame
1
440
Spring gRPC について / About Spring gRPC
mackey0225
0
110
AWSのLambdaで PHPを動かす選択肢
rinchoku
2
400
定理証明プラットフォーム lapisla.net
abap34
1
610
毎日13時間もかかるバッチ処理をたった3日で60%短縮するためにやったこと
sho_ssk_
1
670
月刊 競技プログラミングをお仕事に役立てるには
terryu16
1
1.2k
Внедряем бюджетирование, или Как сделать хорошо?
lamodatech
0
970
自分ひとりから始められる生産性向上の取り組み #でぃーぷらすオオサカ
irof
8
2.1k
振り返れば奴(Cline)がいる
keiyagi
0
100
動作確認やテストで漏れがちな観点3選
starfish719
5
720
ASP.NET Core の OpenAPIサポート
h455h1
0
150
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
260
Automating Front-end Workflow
addyosmani
1367
200k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
980
Into the Great Unknown - MozCon
thekraken
34
1.6k
A designer walks into a library…
pauljervisheath
205
24k
For a Future-Friendly Web
brad_frost
176
9.5k
Six Lessons from altMBA
skipperchong
27
3.6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
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(Λߋ৽͢Δʹ࠶ੜ͢Δ͔͠ͳ͍ʢʁʣ