186 @param userListId the ID of the user list (should be 1) |
186 @param userListId the ID of the user list (should be 1) |
187 @type int |
187 @type int |
188 @param txt the selected text |
188 @param txt the selected text |
189 @type str |
189 @type str |
190 """ |
190 """ |
191 from QScintilla.Editor import EditorAutoCompletionListID |
191 from eric7.QScintilla.Editor import EditorAutoCompletionListID |
192 |
192 |
193 if userListId == EditorAutoCompletionListID: |
193 if userListId == EditorAutoCompletionListID: |
194 lst = txt.split() |
194 lst = txt.split() |
195 if len(lst) > 1: |
195 if len(lst) > 1: |
196 self.__lastFullContext = lst[1][1:].split(")")[0] |
196 self.__lastFullContext = lst[1][1:].split(")")[0] |
296 col -= 1 |
296 col -= 1 |
297 if col > 0 and beg[col - 1] != " ": |
297 if col > 0 and beg[col - 1] != " ": |
298 col -= 1 |
298 col -= 1 |
299 prefix = editor.getWordLeft(line, col) |
299 prefix = editor.getWordLeft(line, col) |
300 if editor.isPyFile(): |
300 if editor.isPyFile(): |
301 from Utilities.ModuleParser import Module |
301 from eric7.Utilities.ModuleParser import Module |
302 |
302 |
303 src = editor.text() |
303 src = editor.text() |
304 fn = editor.getFileName() |
304 fn = editor.getFileName() |
305 if fn is None: |
305 if fn is None: |
306 fn = "" |
306 fn = "" |
570 """ |
570 """ |
571 completionsList = [] |
571 completionsList = [] |
572 |
572 |
573 prefixFound = False |
573 prefixFound = False |
574 if prefix and module: |
574 if prefix and module: |
575 from QScintilla.Editor import Editor |
575 from eric7.QScintilla.Editor import Editor |
576 |
576 |
577 line, col = editor.getCursorPosition() |
577 line, col = editor.getCursorPosition() |
578 if prefix in ["cls", "self"]: |
578 if prefix in ["cls", "self"]: |
579 prefixFound = True |
579 prefixFound = True |
580 for cl in module.classes.values(): |
580 for cl in module.classes.values(): |