LL> Can anybody explain me the way plugins are loaded in InteeliJ IDEA LL> from a ClassLoader point of view?
This is briefly described in the "Plugin Structure.html" document included in the Plugin Development Package. If that document does not give you enough information, please ask more specific questions.
-- Dmitry Jemerov Software Developer JetBrains, Inc. http://www.jetbrains.com "Develop with pleasure!"
LL> Hello, LL> Can anybody explain me the way plugins are loaded in InteeliJ IDEA LL> from a LL> ClassLoader LL> point of view?
1. For everyone plugin created special personal classloader. 2. If plugin have dependencies to other plugins, their classloaders are shared. 3. Plugin loaded throught this personal classloader.
The classes of plugin may lookup classes of depended plugins, but if plugin have no dependencies, it have no access to classes of other plugins installed.
IDEA system Classloader + Plugin classloader
Plugin may lookup classes of IDEA core, but IDEA have no access to loaded classes of plugin through IDEA system Classloader. This one may cause throubles with GUI Designer I18N if you forget to include forms_rt.jar into plugin's lib folder. IDEA will not found your I18N resources, becouse forms_rt.jar will used from IDEA system Classloader, and this one don't know about plugins classes and resources.
Would it be possible to develop a plugin say "Development Plugin Helper" which has the following features: - other plugins may depend of it and then they register themself into this plugin. - when pressing a defined button (in the menu bar for example), the "Development Plugin Helper" shutdown the registered plugins by destroying the classloaders of the registered plugins and then reload them...
Thus it can improve the development process of plugins by preventing to start/stop a new IDEA application instance each time we want to test some modifications.
A sort of dynamic deployment/undeployment of plugins.
I think there must be something that prevent it but what?
LL> Hello, LL> Can anybody explain me the way plugins are loaded in InteeliJ IDEA LL> from a LL> ClassLoader LL> point of view?
>
1. For everyone plugin created special personal classloader. 2. If plugin have dependencies to other plugins, their classloaders are
shared.
3. Plugin loaded throught this personal classloader.
>
The classes of plugin may lookup classes of depended plugins, but if
plugin
have no dependencies, it have no access to classes of other plugins
installed. >
IDEA system Classloader + Plugin classloader
>
Plugin may lookup classes of IDEA core, but IDEA have no access to loaded classes of plugin through IDEA system Classloader. This one may cause
throubles
with GUI Designer I18N if you forget to include forms_rt.jar into plugin's lib folder. IDEA will not found your I18N resources, becouse forms_rt.jar will used from IDEA system Classloader, and this one don't know about
LL> Thus it can improve the development process of plugins by preventing LL> to start/stop a new IDEA application instance each time we want to LL> test some modifications.
Have you tried HotSwap?
-- Dmitry Jemerov Software Developer JetBrains, Inc. http://www.jetbrains.com "Develop with pleasure!"
Hello Loïc,
LL> Can anybody explain me the way plugins are loaded in InteeliJ IDEA
LL> from a ClassLoader point of view?
This is briefly described in the "Plugin Structure.html" document included
in the Plugin Development Package. If that document does not give you enough
information, please ask more specific questions.
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"
Hello Loïc,
LL> Hello,
LL> Can anybody explain me the way plugins are loaded in InteeliJ IDEA
LL> from a
LL> ClassLoader
LL> point of view?
1. For everyone plugin created special personal classloader.
2. If plugin have dependencies to other plugins, their classloaders are shared.
3. Plugin loaded throught this personal classloader.
The classes of plugin may lookup classes of depended plugins, but if plugin
have no dependencies, it have no access to classes of other plugins installed.
IDEA system Classloader
+ Plugin classloader
Plugin may lookup classes of IDEA core, but IDEA have no access to loaded
classes of plugin through IDEA system Classloader. This one may cause throubles
with GUI Designer I18N if you forget to include forms_rt.jar into plugin's
lib folder. IDEA will not found your I18N resources, becouse forms_rt.jar
will used from IDEA system Classloader, and this one don't know about plugins
classes and resources.
Thanks!
--
Alexey Efimov, Java Developer
Tops BI
Thank you Alexey and Dmitry.
Here is my next question:
Would it be possible to develop a plugin say "Development Plugin Helper"
which has the following features:
- other plugins may depend of it and then they register themself into this
plugin.
- when pressing a defined button (in the menu bar for example), the
"Development Plugin Helper" shutdown the registered plugins by destroying
the
classloaders of the registered plugins and then reload them...
Thus it can improve the development process of plugins by preventing to
start/stop a new IDEA application instance each time we want to test some
modifications.
A sort of dynamic deployment/undeployment of plugins.
I think there must be something that prevent it but what?
What do you think?
Loic
"Alexey Efimov" <aefimov.box@gmail.com> a ecrit dans le message de
news:2cac73a6e4f8c77ac16ff718dd@news.intellij.net...
>
>
shared.
>
plugin
installed.
>
>
throubles
plugins
>
>
>
Hello Loic,
LL> Thus it can improve the development process of plugins by preventing
LL> to start/stop a new IDEA application instance each time we want to
LL> test some modifications.
Have you tried HotSwap?
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"