Plugins/PluginSyntaxChecker.py

changeset 12
1d8dd9706f46
parent 6
52e8c820d0dd
child 13
1af94a91f439
equal deleted inserted replaced
11:b0996e4a289e 12:1d8dd9706f46
155 155
156 @param menuName name of the menu to be shown (string) 156 @param menuName name of the menu to be shown (string)
157 @param menu reference to the menu (QMenu) 157 @param menu reference to the menu (QMenu)
158 """ 158 """
159 if menuName == "Checks" and \ 159 if menuName == "Checks" and \
160 e4App().getObject("Project").getProjectLanguage() == "Python": 160 e4App().getObject("Project").getProjectLanguage() == "Python3":
161 self.__projectBrowserMenu = menu 161 self.__projectBrowserMenu = menu
162 if self.__projectBrowserAct is None: 162 if self.__projectBrowserAct is None:
163 self.__projectBrowserAct = E4Action(self.trUtf8('Check Syntax'), 163 self.__projectBrowserAct = E4Action(self.trUtf8('Check Syntax'),
164 self.trUtf8('&Syntax...'), 0, 0, 164 self.trUtf8('&Syntax...'), 0, 0,
165 self, "") 165 self, "")
237 @param editor reference to the editor 237 @param editor reference to the editor
238 """ 238 """
239 if menuName == "Checks": 239 if menuName == "Checks":
240 if not self.__editorAct in menu.actions(): 240 if not self.__editorAct in menu.actions():
241 menu.addAction(self.__editorAct) 241 menu.addAction(self.__editorAct)
242 self.__editorAct.setEnabled(editor.isPyFile()) 242 self.__editorAct.setEnabled(editor.isPy3File())
243 243
244 def __editorSyntaxCheck(self): 244 def __editorSyntaxCheck(self):
245 """ 245 """
246 Private slot to handle the syntax check context menu action of the editors. 246 Private slot to handle the syntax check context menu action of the editors.
247 """ 247 """

eric ide

mercurial