403 @param col column the item was activated in (integer) |
403 @param col column the item was activated in (integer) |
404 """ |
404 """ |
405 if self.noResults: |
405 if self.noResults: |
406 return |
406 return |
407 |
407 |
|
408 vm = e5App().getObject("ViewManager") |
|
409 |
408 if itm.parent(): |
410 if itm.parent(): |
409 fn = Utilities.normabspath(itm.data(0, self.filenameRole)) |
411 fn = Utilities.normabspath(itm.data(0, self.filenameRole)) |
410 lineno = itm.data(0, self.lineRole) |
412 lineno = itm.data(0, self.lineRole) |
411 index = itm.data(0, self.indexRole) |
413 index = itm.data(0, self.indexRole) |
412 error = itm.data(0, self.errorRole) |
414 error = itm.data(0, self.errorRole) |
413 |
415 |
414 vm = e5App().getObject("ViewManager") |
|
415 vm.openSourceFile(fn, lineno) |
416 vm.openSourceFile(fn, lineno) |
416 editor = vm.getOpenEditor(fn) |
417 editor = vm.getOpenEditor(fn) |
417 |
418 |
418 if itm.data(0, self.warningRole): |
419 if itm.data(0, self.warningRole): |
419 editor.toggleWarning(lineno, 0, True, error) |
420 editor.toggleWarning(lineno, 0, True, error) |
420 else: |
421 else: |
421 editor.toggleSyntaxError(lineno, index, True, error, show=True) |
422 editor.toggleSyntaxError(lineno, index, True, error, show=True) |
422 else: |
423 else: |
423 fn = Utilities.normabspath(itm.data(0, self.filenameRole)) |
424 fn = Utilities.normabspath(itm.data(0, self.filenameRole)) |
424 vm = e5App().getObject("ViewManager") |
|
425 vm.openSourceFile(fn) |
425 vm.openSourceFile(fn) |
426 editor = vm.getOpenEditor(fn) |
426 editor = vm.getOpenEditor(fn) |
427 for index in range(itm.childCount()): |
427 for index in range(itm.childCount()): |
428 citm = itm.child(index) |
428 citm = itm.child(index) |
429 lineno = citm.data(0, self.lineRole) |
429 lineno = citm.data(0, self.lineRole) |
432 if citm.data(0, self.warningRole): |
432 if citm.data(0, self.warningRole): |
433 editor.toggleWarning(lineno, 0, True, error) |
433 editor.toggleWarning(lineno, 0, True, error) |
434 else: |
434 else: |
435 editor.toggleSyntaxError( |
435 editor.toggleSyntaxError( |
436 lineno, index, True, error, show=True) |
436 lineno, index, True, error, show=True) |
|
437 |
|
438 editor = vm.activeWindow() |
|
439 editor.updateVerticalScrollBar() |
437 |
440 |
438 @pyqtSlot() |
441 @pyqtSlot() |
439 def on_showButton_clicked(self): |
442 def on_showButton_clicked(self): |
440 """ |
443 """ |
441 Private slot to handle the "Show" button press. |
444 Private slot to handle the "Show" button press. |
478 if file not in errorFiles: |
481 if file not in errorFiles: |
479 editor = vm.getOpenEditor(file) |
482 editor = vm.getOpenEditor(file) |
480 editor.clearSyntaxError() |
483 editor.clearSyntaxError() |
481 editor.clearFlakesWarnings() |
484 editor.clearFlakesWarnings() |
482 |
485 |
|
486 editor = vm.activeWindow() |
|
487 editor.updateVerticalScrollBar() |
|
488 |
483 def __clearErrors(self, files): |
489 def __clearErrors(self, files): |
484 """ |
490 """ |
485 Private method to clear all error and warning markers of |
491 Private method to clear all error and warning markers of |
486 open editors to be checked. |
492 open editors to be checked. |
487 |
493 |