ExtensionPoints and the System
Hi alltogether,
i have defined my own extension point and provided several implemetations for it.
so far so good :)
now i want to configure my extensions:
optimally the extension would be a project component (if thats possible) and store its settings in $PROJECT_FILE$. but if i try to define the component like this, i get always a picocontainer exception, because picocontainer is not able to resolve the project in an extension.
any suggestions would be great. thanks in advace
请先登录再写评论。
Hello Christian,
Extensions and project components are different things: an extension is instantiated
similarly to a project component but it can't be a project component itself.
If you need your extensions to have project scope, you need to register the
extension point with area IDEA_PROJECT.
To make an extension store settings (assuming you're developing for IDEA
7.0), your extension class needs to implement the PersistentStateComponent
interface and to provide annotations describing where the data should be
stored. As an example, you can look at SvnBranchConfigurationManager class
in the source code of the Subversion plugin.
Does that answer your question?
(In the future, please post plugin development questions to the OpenAPI forum
/ newsgroup, not the plugins forum. The plugins forum is for discussion of
plugin users.)
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
After many consideration a persistent state feature was removed from
extensions, since extensions are meant to be a declarative
configuration. If you need a persistent state you should be using
components or services.
Mike, where can I get full protocol of your considerations? :)