* @return true if the plugin has been unloaded successfully, false otherwise.
* If it wasn't found, false is return.
*/
protected boolean unloadPlugin ( String pluginName ) {
// Iterate through the plugin list and find the right plugin
PluginAdapter pluginToRemove = null;
for ( int i = this.objPluginMgr.getPluginCount() - 1 ; i >= 0 && pluginToRemove == null ; i-- ) {
PluginAdapter plugin = this.objPluginMgr.getPlugin( i );
// Checks if we get a valid plugin
if ( plugin != null ) {
// The plugin is valid.
// Checks if this is the one we are look for.
if ( plugin.getName().equals( pluginName ) ) {
// This is the plugin to unload
pluginToRemove = plugin;
}
}
}