238 self.__serviceError(fn, msg) |
238 self.__serviceError(fn, msg) |
239 else: |
239 else: |
240 self.__serviceError(self.tr("JavaScript batch check"), msg) |
240 self.__serviceError(self.tr("JavaScript batch check"), msg) |
241 self.batchJobDone(fx, lang) |
241 self.batchJobDone(fx, lang) |
242 |
242 |
|
243 def serviceErrorYAML(self, fx, lang, fn, msg): |
|
244 """ |
|
245 Public method handling service errors for YAML. |
|
246 |
|
247 @param fx service name (string) |
|
248 @param lang language (string) |
|
249 @param fn file name (string) |
|
250 @param msg message text (string) |
|
251 """ |
|
252 if fx in ['YAMLSyntax', 'batch_YAMLSyntax']: |
|
253 if fx == 'YAMLSyntax': |
|
254 self.__serviceError(fn, msg) |
|
255 else: |
|
256 self.__serviceError(self.tr("YAML batch check"), msg) |
|
257 self.batchJobDone(fx, lang) |
|
258 |
|
259 def serviceErrorJSON(self, fx, lang, fn, msg): |
|
260 """ |
|
261 Public method handling service errors for JSON. |
|
262 |
|
263 @param fx service name (string) |
|
264 @param lang language (string) |
|
265 @param fn file name (string) |
|
266 @param msg message text (string) |
|
267 """ |
|
268 if fx in ['JSONSyntax', 'batch_JSONSyntax']: |
|
269 if fx == 'JSONSyntax': |
|
270 self.__serviceError(fn, msg) |
|
271 else: |
|
272 self.__serviceError(self.tr("JSON batch check"), msg) |
|
273 self.batchJobDone(fx, lang) |
|
274 |
243 def batchJobDone(self, fx, lang): |
275 def batchJobDone(self, fx, lang): |
244 """ |
276 """ |
245 Public slot handling the completion of a batch job. |
277 Public slot handling the completion of a batch job. |
246 |
278 |
247 @param fx service name (string) |
279 @param fx service name (string) |
248 @param lang language (string) |
280 @param lang language (string) |
249 """ |
281 """ |
250 if fx in ['Python2Syntax', 'batch_Python2Syntax', |
282 if fx in [ |
251 'Python3Syntax', 'batch_Python3Syntax', |
283 'Python2Syntax', 'batch_Python2Syntax', |
252 'JavaScriptSyntax', 'batch_JavaScriptSyntax']: |
284 'Python3Syntax', 'batch_Python3Syntax', |
|
285 'JavaScriptSyntax', 'batch_JavaScriptSyntax', |
|
286 'YAMLSyntax', 'batch_YAMLSyntax', |
|
287 'JSONSyntax', 'batch_JSONSyntax', |
|
288 ]: |
253 if lang in self.queuedBatches: |
289 if lang in self.queuedBatches: |
254 self.queuedBatches.remove(lang) |
290 self.queuedBatches.remove(lang) |
255 # prevent sending the signal multiple times |
291 # prevent sending the signal multiple times |
256 if len(self.queuedBatches) == 0 and not self.batchesFinished: |
292 if len(self.queuedBatches) == 0 and not self.batchesFinished: |
257 self.batchFinished.emit() |
293 self.batchFinished.emit() |