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

0
8 comments
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

Something like this should work:

0

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

etienne

0

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
Avatar
Permanently deleted user


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

0
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

Then this is probably what you need:

0
Avatar
Permanently deleted user

> Then this is probably what you need:

Is there a code snippet missing in this post?

 

0

Please sign in to leave a comment.