src/eric7/Plugins/PluginEricapi.py

branch
eric7
changeset 10437
2f70ca07f0af
parent 10317
f1b00d7dec16
child 10439
21c28b0f9e41
equal deleted inserted replaced
10436:f6881d10e995 10437:2f70ca07f0af
44 """ 44 """
45 Public method to support the display of some executable info. 45 Public method to support the display of some executable info.
46 46
47 @return dictionary containing the data to query the presence of 47 @return dictionary containing the data to query the presence of
48 the executable 48 the executable
49 @rtype dict
49 """ 50 """
50 exe = "eric7_api" 51 exe = "eric7_api"
51 if OSUtilities.isWindowsPlatform(): 52 if OSUtilities.isWindowsPlatform():
52 for exepath in ( 53 for exepath in (
53 getConfig("bindir"), 54 getConfig("bindir"),
95 96
96 def __init__(self, ui): 97 def __init__(self, ui):
97 """ 98 """
98 Constructor 99 Constructor
99 100
100 @param ui reference to the user interface object (UI.UserInterface) 101 @param ui reference to the user interface object
102 @type UserInterface
101 """ 103 """
102 super().__init__(ui) 104 super().__init__(ui)
103 self.__ui = ui 105 self.__ui = ui
104 self.__initialize() 106 self.__initialize()
105 107
112 114
113 def activate(self): 115 def activate(self):
114 """ 116 """
115 Public method to activate this plugin. 117 Public method to activate this plugin.
116 118
117 @return tuple of None and activation status (boolean) 119 @return tuple of None and activation status
120 @rtype bool
118 """ 121 """
119 menu = ericApp().getObject("Project").getMenu("Apidoc") 122 menu = ericApp().getObject("Project").getMenu("Apidoc")
120 if menu: 123 if menu:
121 self.__projectAct = EricAction( 124 self.__projectAct = EricAction(
122 self.tr("Generate API file (eric7_api)"), 125 self.tr("Generate API file (eric7_api)"),
158 def __projectShowMenu(self, menuName, menu): # noqa: U100 161 def __projectShowMenu(self, menuName, menu): # noqa: U100
159 """ 162 """
160 Private slot called, when the the project menu or a submenu is 163 Private slot called, when the the project menu or a submenu is
161 about to be shown. 164 about to be shown.
162 165
163 @param menuName name of the menu to be shown (string) 166 @param menuName name of the menu to be shown
164 @param menu reference to the menu (QMenu) 167 @type str
168 @param menu reference to the menu
169 @type QMenu
165 """ 170 """
166 if menuName == "Apidoc" and self.__projectAct is not None: 171 if menuName == "Apidoc" and self.__projectAct is not None:
167 self.__projectAct.setEnabled( 172 self.__projectAct.setEnabled(
168 ericApp().getObject("Project").getProjectLanguage() 173 ericApp().getObject("Project").getProjectLanguage()
169 in ["Python", "Python3", "Ruby", "MicroPython"] 174 in ["Python", "Python3", "Ruby", "MicroPython"]

eric ide

mercurial