eric6/PluginManager/PluginManager.py

branch
maintenance
changeset 8043
0acf98cd089a
parent 7968
e3d251e74f2d
parent 7967
f5da85158db2
child 8176
31965986ecd1
equal deleted inserted replaced
7991:866adc8c315b 8043:0acf98cd089a
592 def activatePlugin(self, name, onDemand=False): 592 def activatePlugin(self, name, onDemand=False):
593 """ 593 """
594 Public method to activate a plugin. 594 Public method to activate a plugin.
595 595
596 @param name name of the module to be activated 596 @param name name of the module to be activated
597 @keyparam onDemand flag indicating activation of an 597 @param onDemand flag indicating activation of an
598 on demand plugin (boolean) 598 on demand plugin (boolean)
599 @return reference to the initialized plugin object 599 @return reference to the initialized plugin object
600 @exception PluginActivationError raised to indicate an issue during the 600 @exception PluginActivationError raised to indicate an issue during the
601 plug-in activation 601 plug-in activation
602 """ 602 """
708 def deactivatePlugin(self, name, onDemand=False): 708 def deactivatePlugin(self, name, onDemand=False):
709 """ 709 """
710 Public method to deactivate a plugin. 710 Public method to deactivate a plugin.
711 711
712 @param name name of the module to be deactivated 712 @param name name of the module to be deactivated
713 @keyparam onDemand flag indicating deactivation of an 713 @param onDemand flag indicating deactivation of an
714 on demand plugin (boolean) 714 on demand plugin (boolean)
715 """ 715 """
716 try: 716 try:
717 if onDemand: 717 if onDemand:
718 module = self.__onDemandActiveModules[name] 718 module = self.__onDemandActiveModules[name]
761 Public method to activate an ondemand plugin given by type and 761 Public method to activate an ondemand plugin given by type and
762 typename. 762 typename.
763 763
764 @param type_ type of the plugin to be activated (string) 764 @param type_ type of the plugin to be activated (string)
765 @param typename name of the plugin within the type category (string) 765 @param typename name of the plugin within the type category (string)
766 @keyparam maybeActive flag indicating, that the plugin may be active 766 @param maybeActive flag indicating, that the plugin may be active
767 already (boolean) 767 already (boolean)
768 @return reference to the initialized plugin object 768 @return reference to the initialized plugin object
769 """ 769 """
770 for name, module in list(self.__onDemandInactiveModules.items()): 770 for name, module in list(self.__onDemandInactiveModules.items()):
771 if ( 771 if (
1244 def checkPluginUpdatesAvailable(self): 1244 def checkPluginUpdatesAvailable(self):
1245 """ 1245 """
1246 Public method to check the availability of updates of plug-ins. 1246 Public method to check the availability of updates of plug-ins.
1247 """ 1247 """
1248 period = Preferences.getPluginManager("UpdatesCheckInterval") 1248 period = Preferences.getPluginManager("UpdatesCheckInterval")
1249 if period == 0 or not self.__ui.isOnline(): 1249 if period == 0:
1250 return 1250 return
1251 elif period in [1, 2, 3]: 1251 elif period in [1, 2, 3]:
1252 lastModified = QFileInfo(self.pluginRepositoryFile).lastModified() 1252 lastModified = QFileInfo(self.pluginRepositoryFile).lastModified()
1253 if lastModified.isValid() and lastModified.date().isValid(): 1253 if lastModified.isValid() and lastModified.date().isValid():
1254 lastModifiedDate = lastModified.date() 1254 lastModifiedDate = lastModified.date()

eric ide

mercurial