Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Plugin-Reloding

While it would be useful to be able to shut down and restart a plugin 
during plugin development, it's not clear that this is a trivial thing to 
add simply because each plugin has its own classloader.
There is no way to forcibly shutdown a classloader.
A classloader is only garbage collected when there are no longer any 
references to it or any classes it has loaded, including any instances.
To do so would require closing all open views and editors from the plugin 
in question, resetting any activated action contributions to their 
pre-activated state, etc.
If any references remained to any of these parts, the classloader would 
stick around.  This can easily happen, for example if a view hooks itself 
as a part listener, but forgets to unhook on dispose().
Note that it's not just UI components you need to be concerned with, 
either.  In fact, shutdown protocol would probably have to be added to the 
Plugin class since a basic shutdown mechanism itself could not know how to 
tell all parts to shutdown.

It may be possible to add support for shutting down a plugin, by taking a 
best effort approach at shutting down all its parts, then creating a new 
classloader for the plugin the next time it is activated.
But this would not be a trivial effort to add.

Our schedule is pretty well full for 2.0.  If you would like to 
investigate this area, we would certainly encourage you, and would be 
interested in any results you come up with.

Nick






"N V S Rama Krishna" <ram_kri@xxxxxxxxx>
Sent by: platform-ui-dev-admin@xxxxxxxxxxx
01/02/02 07:41 PM
Please respond to platform-ui-dev

 
        To:     <platform-ui-dev@xxxxxxxxxxx>
        cc: 
        Subject:        [platform-ui-dev] Plugin-Reloding

Hi ! 
   I strongly feel there should be a provision in WSAD with which one can 
reload the plugin instead of closing down the IDE and then starting it 
again. Since each plugin is loaded by a different class-loader 
implementing this shouldnt be a deal !!! 
   Any comments on this ?
 
Regards,
Kris




Back to the top