src/eric7/JediInterface/JediServer.py

branch
eric7-maintenance
changeset 10534
783d835d7fe4
parent 10460
3b34efa2857c
parent 10526
2549534fcb55
child 10694
f46c1e224e8a
equal deleted inserted replaced
10461:5fbbda78c175 10534:783d835d7fe4
16 16
17 from eric7 import Preferences 17 from eric7 import Preferences
18 from eric7.EricNetwork.EricJsonServer import EricJsonServer 18 from eric7.EricNetwork.EricJsonServer import EricJsonServer
19 from eric7.EricWidgets import EricMessageBox 19 from eric7.EricWidgets import EricMessageBox
20 from eric7.EricWidgets.EricApplication import ericApp 20 from eric7.EricWidgets.EricApplication import ericApp
21 from eric7.QScintilla.Editor import Editor, ReferenceItem 21 from eric7.QScintilla.Editor import EditorIconId, ReferenceItem
22 from eric7.SystemUtilities import PythonUtilities 22 from eric7.SystemUtilities import PythonUtilities
23 23
24 from .RefactoringPreviewDialog import RefactoringPreviewDialog 24 from .RefactoringPreviewDialog import RefactoringPreviewDialog
25 25
26 26
30 """ 30 """
31 31
32 IdProject = "Project" 32 IdProject = "Project"
33 33
34 PictureIDs = { 34 PictureIDs = {
35 "class": "?{0}".format(Editor.ClassID), 35 "class": "?{0}".format(EditorIconId.Class),
36 "_class": "?{0}".format(Editor.ClassProtectedID), 36 "_class": "?{0}".format(EditorIconId.ClassProtected),
37 "__class": "?{0}".format(Editor.ClassPrivateID), 37 "__class": "?{0}".format(EditorIconId.ClassPrivate),
38 "instance": "?{0}".format(Editor.ClassID), 38 "instance": "?{0}".format(EditorIconId.Class),
39 "_instance": "?{0}".format(Editor.ClassProtectedID), 39 "_instance": "?{0}".format(EditorIconId.ClassProtected),
40 "__instance": "?{0}".format(Editor.ClassPrivateID), 40 "__instance": "?{0}".format(EditorIconId.ClassPrivate),
41 "function": "?{0}".format(Editor.MethodID), 41 "function": "?{0}".format(EditorIconId.Method),
42 "_function": "?{0}".format(Editor.MethodProtectedID), 42 "_function": "?{0}".format(EditorIconId.MethodProtected),
43 "__function": "?{0}".format(Editor.MethodPrivateID), 43 "__function": "?{0}".format(EditorIconId.MethodPrivate),
44 "module": "?{0}".format(Editor.ModuleID), 44 "module": "?{0}".format(EditorIconId.Module),
45 "_module": "?{0}".format(Editor.ModuleID), 45 "_module": "?{0}".format(EditorIconId.Module),
46 "__module": "?{0}".format(Editor.ModuleID), 46 "__module": "?{0}".format(EditorIconId.Module),
47 "param": "?{0}".format(Editor.AttributeID), 47 "param": "?{0}".format(EditorIconId.Attribute),
48 "_param": "?{0}".format(Editor.AttributeProtectedID), 48 "_param": "?{0}".format(EditorIconId.AttributeProtected),
49 "__param": "?{0}".format(Editor.AttributePrivateID), 49 "__param": "?{0}".format(EditorIconId.AttributePrivate),
50 "statement": "?{0}".format(Editor.AttributeID), 50 "statement": "?{0}".format(EditorIconId.Attribute),
51 "_statement": "?{0}".format(Editor.AttributeProtectedID), 51 "_statement": "?{0}".format(EditorIconId.AttributeProtected),
52 "__statement": "?{0}".format(Editor.AttributePrivateID), 52 "__statement": "?{0}".format(EditorIconId.AttributePrivate),
53 "import": "", 53 "import": "",
54 "None": "", 54 "None": "",
55 } 55 }
56 56
57 def __init__(self, viewManager, project, ui): 57 def __init__(self, viewManager, project, ui):
89 "RefactoringDiff": self.__showRefactoringDiff, 89 "RefactoringDiff": self.__showRefactoringDiff,
90 "RefactoringApplyResult": self.__checkRefactoringResult, 90 "RefactoringApplyResult": self.__checkRefactoringResult,
91 "ClientException": self.__processClientException, 91 "ClientException": self.__processClientException,
92 } 92 }
93 93
94 # temporary store for editor references indexed by Uuid 94 # temporary store for editor references indexed by UUID
95 self.__editors = {} 95 self.__editors = {}
96 96
97 # Python 3 97 # Python 3
98 self.__ensureActive("Python3") 98 self.__ensureActive("Python3")
99 99
991 Public method to forget about the given editor. 991 Public method to forget about the given editor.
992 992
993 @param editor reference to the editor to forget about 993 @param editor reference to the editor to forget about
994 @type Editor 994 @type Editor
995 """ 995 """
996 for uid in self.__editors: 996 for uid in list(self.__editors):
997 if self.__editors[uid] is editor: 997 if self.__editors[uid] is editor:
998 with contextlib.suppress(KeyError): 998 with contextlib.suppress(KeyError):
999 del self.__editors[uid] 999 del self.__editors[uid]
1000 break 1000 break

eric ide

mercurial