84 self.syntaxCheckService.batchFinished.connect(self.__batchFinished) |
84 self.syntaxCheckService.batchFinished.connect(self.__batchFinished) |
85 self.syntaxCheckService.error.connect(self.__processError) |
85 self.syntaxCheckService.error.connect(self.__processError) |
86 except KeyError: |
86 except KeyError: |
87 self.syntaxCheckService = None |
87 self.syntaxCheckService = None |
88 self.filename = None |
88 self.filename = None |
|
89 |
|
90 self.__remotefsInterface = ( |
|
91 ericApp().getObject("EricServer").getServiceInterface("FileSystem") |
|
92 ) |
89 |
93 |
90 def __resort(self): |
94 def __resort(self): |
91 """ |
95 """ |
92 Private method to resort the tree. |
96 Private method to resort the tree. |
93 """ |
97 """ |
419 |
423 |
420 if codestring: |
424 if codestring: |
421 self.source = Utilities.normalizeCode(codestring) |
425 self.source = Utilities.normalizeCode(codestring) |
422 else: |
426 else: |
423 try: |
427 try: |
424 self.source = Utilities.readEncodedFile(self.filename)[0] |
428 if FileSystemUtilities.isRemoteFileName(self.filename): |
|
429 bSource = self.__remotefsInterface.readFile( |
|
430 FileSystemUtilities.plainFileName(self.filename) |
|
431 ) |
|
432 self.source = Utilities.decode(bSource)[0] |
|
433 else: |
|
434 self.source = Utilities.readEncodedFile(self.filename)[0] |
425 self.source = Utilities.normalizeCode(self.source) |
435 self.source = Utilities.normalizeCode(self.source) |
426 except (OSError, UnicodeError) as msg: |
436 except (OSError, UnicodeError) as msg: |
427 self.noResults = False |
437 self.noResults = False |
428 self.__createResultItem( |
438 self.__createResultItem( |
429 self.filename, |
439 self.filename, |
456 if time.monotonic() - self.__timenow > 0.01: |
466 if time.monotonic() - self.__timenow > 0.01: |
457 QApplication.processEvents() |
467 QApplication.processEvents() |
458 self.__timenow = time.monotonic() |
468 self.__timenow = time.monotonic() |
459 |
469 |
460 try: |
470 try: |
461 source = Utilities.readEncodedFile(filename)[0] |
471 if FileSystemUtilities.isRemoteFileName(self.filename): |
|
472 bSource = self.__remotefsInterface.readFile( |
|
473 FileSystemUtilities.plainFileName(self.filename) |
|
474 ) |
|
475 source = Utilities.decode(bSource)[0] |
|
476 else: |
|
477 source = Utilities.readEncodedFile(filename)[0] |
462 source = Utilities.normalizeCode(source) |
478 source = Utilities.normalizeCode(source) |
463 except (OSError, UnicodeError) as msg: |
479 except (OSError, UnicodeError) as msg: |
464 self.noResults = False |
480 self.noResults = False |
465 self.__createResultItem( |
481 self.__createResultItem( |
466 self.filename, |
482 self.filename, |