how to read the plugin.xml file from within plugin
Hi
Does enyone know how I can read the plugin.xml descriptor file from within the plugin itself? I did not find a way to make getResourceAsStream() pick up the plugin.xml file (probably not on the classpath).
I have searched the archive but could not find anything related to that question (or my search criteria were bad...).
Thanks for any help.
etienne
请先登录再写评论。
Hi, it very depricated code, but try to look onto PLUS library. It does plugin.xml descriptor reading.
http://www.intellij.org/twiki/bin/view/Main/PlusLibrary
Something like this should work:
Alexey and Martin, thanks for your feedback. It helped!
etienne
humm and what about com.intellij.ide.plugins.IdeaPluginDescriptor ?? but I don't know how to get those, maybe there's a PluginManager or something like that..
This appears to have been slightly changed and moved into the OpenAPI in Demetra.
That works fine for certain situations. But I'm writing some common code used by different plugins, so it's exactly the plugin id which I want to read from the plugin.xml... :(
Then this is probably what you need:
> Then this is probably what you need:
Is there a code snippet missing in this post?