PluginManager/PluginManager.py

changeset 6629
643ec3a53d17
parent 6611
59b262a8e31c
child 6645
ad476851d7e0
--- a/PluginManager/PluginManager.py	Fri Dec 14 19:51:12 2018 +0100
+++ b/PluginManager/PluginManager.py	Fri Dec 14 19:52:38 2018 +0100
@@ -338,6 +338,36 @@
             self.loadPlugin(develPluginName, develPluginPath)
             self.__develPluginName = develPluginName
     
+    def loadDocumentationSetPlugins(self):
+        """
+        Public method to load just the documentation sets plugins.
+        
+        @exception PluginModulesError raised to indicate the absence of
+            plug-in modules
+        """
+        if not self.__pluginModulesExist():
+            raise PluginModulesError
+        
+        self.__insertPluginsPaths()
+        
+        for pluginName in self.__foundGlobalModules:
+            # user and core plug-ins have priority
+            if pluginName not in self.__foundUserModules and \
+               pluginName not in self.__foundCoreModules and \
+               pluginName.startswith("PluginDocumentationSets"):
+                self.loadPlugin(pluginName, self.pluginDirs["global"])
+        
+        for pluginName in self.__foundUserModules:
+            # core plug-ins have priority
+            if pluginName not in self.__foundCoreModules and \
+               pluginName.startswith("PluginDocumentationSets"):
+                self.loadPlugin(pluginName, self.pluginDirs["user"])
+        
+        for pluginName in self.__foundCoreModules:
+            # plug-in under development has priority
+            if pluginName.startswith("PluginDocumentationSets"):
+                self.loadPlugin(pluginName, self.pluginDirs["eric6"])
+    
     def loadPlugin(self, name, directory, reload_=False):
         """
         Public method to load a plugin module.

eric ide

mercurial