156 |
158 |
157 def activate(self): |
159 def activate(self): |
158 """ |
160 """ |
159 Public method to activate this plugin. |
161 Public method to activate this plugin. |
160 |
162 |
161 @return tuple of None and activation status (boolean) |
163 @return tuple of None and activation status |
|
164 @rtype bool |
162 """ |
165 """ |
163 menu = ericApp().getObject("Project").getMenu("Apidoc") |
166 menu = ericApp().getObject("Project").getMenu("Apidoc") |
164 if menu: |
167 if menu: |
165 self.__projectAct = EricAction( |
168 self.__projectAct = EricAction( |
166 self.tr("Generate documentation (eric7_doc)"), |
169 self.tr("Generate documentation (eric7_doc)"), |
202 def __projectShowMenu(self, menuName, menu): # noqa: U100 |
205 def __projectShowMenu(self, menuName, menu): # noqa: U100 |
203 """ |
206 """ |
204 Private slot called, when the the project menu or a submenu is |
207 Private slot called, when the the project menu or a submenu is |
205 about to be shown. |
208 about to be shown. |
206 |
209 |
207 @param menuName name of the menu to be shown (string) |
210 @param menuName name of the menu to be shown |
208 @param menu reference to the menu (QMenu) |
211 @type str |
|
212 @param menu reference to the menu |
|
213 @type QMenu |
209 """ |
214 """ |
210 if menuName == "Apidoc" and self.__projectAct is not None: |
215 if menuName == "Apidoc" and self.__projectAct is not None: |
211 self.__projectAct.setEnabled( |
216 self.__projectAct.setEnabled( |
212 ericApp().getObject("Project").getProjectLanguage() |
217 ericApp().getObject("Project").getProjectLanguage() |
213 in ["Python", "Python3", "Ruby", "MicroPython"] |
218 in ["Python", "Python3", "Ruby", "MicroPython"] |