Where to put images in project for plugins
I am writing my first plugin that has UI elements and I'm not sure how to configure my project to ensure that images are available to the plugin (e.g. getResource() calls). Is there a specific directorty structure I should use. Do I need to configure my project in a certain manner to include the images in the classpath of the generated plugin .jar?
Thanks!
Todd
Please sign in to leave a comment.
Hello Todd,
You can essentially put them anywhere you want as long as they end up in
the plugin classpath. Either pack them into the main plugin jar or have a
separate icons jar. To load the icons, use the IconLoader class in the OpenAPI.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Thanks for the quick reply, Dmitry.
I guess I'm really asking how I configure IntelliJ to automatically copy the images into the .jar file when I build the plugin jar.
Todd
Hello Todd,
Make sure that the extension of your image files is listed in Settings |
Compiler | Resource patterns.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Thanks!
That was the problem
Todd