585 @exception PluginActivationError raised to indicate an issue during the |
585 @exception PluginActivationError raised to indicate an issue during the |
586 plug-in activation |
586 plug-in activation |
587 """ |
587 """ |
588 try: |
588 try: |
589 try: |
589 try: |
590 if onDemand: |
590 module = ( |
591 module = self.__onDemandInactiveModules[name] |
591 self.__onDemandInactiveModules[name] |
592 else: |
592 if onDemand else |
593 module = self.__inactiveModules[name] |
593 self.__inactiveModules[name] |
|
594 ) |
594 except KeyError: |
595 except KeyError: |
595 return None |
596 return None |
596 |
597 |
597 if not self.__canActivatePlugin(module): |
598 if not self.__canActivatePlugin(module): |
598 raise PluginActivationError(module.eric6PluginModuleName) |
599 raise PluginActivationError(module.eric6PluginModuleName) |
693 @param name name of the module to be deactivated |
694 @param name name of the module to be deactivated |
694 @param onDemand flag indicating deactivation of an |
695 @param onDemand flag indicating deactivation of an |
695 on demand plugin (boolean) |
696 on demand plugin (boolean) |
696 """ |
697 """ |
697 try: |
698 try: |
698 if onDemand: |
699 module = ( |
699 module = self.__onDemandActiveModules[name] |
700 self.__onDemandActiveModules[name] |
700 else: |
701 if onDemand else |
701 module = self.__activeModules[name] |
702 self.__activeModules[name] |
|
703 ) |
702 except KeyError: |
704 except KeyError: |
703 return |
705 return |
704 |
706 |
705 if self.__canDeactivatePlugin(module): |
707 if self.__canDeactivatePlugin(module): |
706 pluginObject = None |
708 pluginObject = None |