--- a/RefactoringRope/CodeAssist.py Sun Mar 22 17:33:44 2015 +0100 +++ b/RefactoringRope/CodeAssist.py Sun Mar 22 18:58:31 2015 +0100 @@ -25,6 +25,8 @@ from PyQt5.QtCore import QObject +from QScintilla.Editor import Editor + import Globals @@ -32,6 +34,14 @@ """ Class implementing the autocompletion interface to rope. """ + PictureIDs = { + "class": "?{0}".format(Editor.ClassID), + "instance": "?{0}".format(Editor.ClassID), + "function": "?{0}".format(Editor.MethodID), + "module": "?{0}".format(Editor.AttributeID), + "None": "", + } + def __init__(self, plugin, parent=None): """ Constructor @@ -68,7 +78,8 @@ proposals = rope.contrib.codeassist.code_assist( self.__project, source, offset, resource, maxfixes=maxfixes) proposals = rope.contrib.codeassist.sorted_proposals(proposals) - names = [proposal.name for proposal in proposals] + names = [proposal.name + self.PictureIDs[proposal.type] + for proposal in proposals] return names except Exception: return []