9 |
9 |
10 import contextlib |
10 import contextlib |
11 import os |
11 import os |
12 import uuid |
12 import uuid |
13 |
13 |
14 from PyQt6.QtCore import pyqtSlot, QCoreApplication, QTimer, QThread |
14 from PyQt6.QtCore import QCoreApplication, QThread, QTimer, pyqtSlot |
15 from PyQt6.QtWidgets import QInputDialog, QLineEdit, QDialog |
15 from PyQt6.QtWidgets import QDialog, QInputDialog, QLineEdit |
16 |
16 |
|
17 from eric7 import Globals, Preferences |
|
18 from eric7.EricNetwork.EricJsonServer import EricJsonServer |
|
19 from eric7.EricWidgets import EricMessageBox |
17 from eric7.EricWidgets.EricApplication import ericApp |
20 from eric7.EricWidgets.EricApplication import ericApp |
18 from eric7.EricWidgets import EricMessageBox |
21 from eric7.QScintilla.Editor import Editor, ReferenceItem |
19 |
|
20 from eric7.EricNetwork.EricJsonServer import EricJsonServer |
|
21 |
|
22 from eric7.QScintilla.Editor import Editor |
|
23 |
|
24 from eric7 import Globals, Preferences |
|
25 |
22 |
26 from .RefactoringPreviewDialog import RefactoringPreviewDialog |
23 from .RefactoringPreviewDialog import RefactoringPreviewDialog |
27 |
24 |
28 |
25 |
29 class JediServer(EricJsonServer): |
26 class JediServer(EricJsonServer): |
142 if ( |
139 if ( |
143 self.__ericProject.isOpen() |
140 self.__ericProject.isOpen() |
144 and self.__ericProject.getProjectLanguage() == language |
141 and self.__ericProject.getProjectLanguage() == language |
145 ): |
142 ): |
146 filename = editor.getFileName() |
143 filename = editor.getFileName() |
147 if self.__ericProject.isProjectSource(filename): |
144 if self.__ericProject.isProjectCategory(filename, "SOURCES"): |
148 idString = JediServer.IdProject |
145 idString = JediServer.IdProject |
149 |
146 |
150 if not idString and language in self.__editorLanguageMapping: |
147 if not idString and language in self.__editorLanguageMapping: |
151 idString = self.__editorLanguageMapping[language] |
148 idString = self.__editorLanguageMapping[language] |
152 |
149 |
414 @param result dictionary containing the result data |
411 @param result dictionary containing the result data |
415 @type dict |
412 @type dict |
416 """ |
413 """ |
417 euuid = result["Uuid"] |
414 euuid = result["Uuid"] |
418 with contextlib.suppress(ImportError): |
415 with contextlib.suppress(ImportError): |
419 from eric7.QScintilla.Editor import ReferenceItem |
|
420 |
|
421 if "Error" not in result: |
416 if "Error" not in result: |
422 # ignore errors silently |
417 # ignore errors silently |
423 references = result["GotoReferencesList"] |
418 references = result["GotoReferencesList"] |
424 if references: |
419 if references: |
425 try: |
420 try: |