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

8 comments
Comment actions Permalink

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

0
Comment actions Permalink

Something like this should work:

0
Comment actions Permalink

Alexey and Martin, thanks for your feedback. It helped!

etienne

0
Comment actions Permalink

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..

0
Comment actions Permalink


This appears to have been slightly changed and moved into the OpenAPI in Demetra.

0
Comment actions Permalink

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... :(

0
Comment actions Permalink

Then this is probably what you need:

0
Comment actions Permalink

> Then this is probably what you need:

Is there a code snippet missing in this post?

 

0

Please sign in to leave a comment.