RefactoringRope/CodeAssistClient.py

branch
server_client_variant
changeset 200
1584892147ef
parent 199
ae2ad82725b0
child 201
e677d82706d4
--- a/RefactoringRope/CodeAssistClient.py	Wed Sep 27 18:42:35 2017 +0200
+++ b/RefactoringRope/CodeAssistClient.py	Wed Sep 27 19:02:58 2017 +0200
@@ -60,6 +60,7 @@
         self.__methodMapping = {
             "getCompletions": self.__getCompletions,
             "getCallTips": self.__getCallTips,
+            "reportChanged": self.__reportChanged,
         }
         
         self.__projectpath = projectPath
@@ -139,7 +140,7 @@
     
     def __getCallTips(self, params):
         """
-        Private method to calculate possible completions.
+        Private method to calculate possible calltips.
         
         @param params dictionary containing the method parameters
         @type dict
@@ -173,6 +174,24 @@
         result.update(errorDict)
         
         self.sendJson("CallTipsResult", result)
+    
+    def __reportChanged(self, params):
+        """
+        Private method to register some changed sources.
+        
+        @param params dictionary containing the method parameters sent by
+            the server
+        @type dict
+        """
+        filename = params["FileName"]
+        oldSource = params["OldSource"]
+        
+        try:
+            rope.base.libutils.report_change(
+                self.__project, filename, oldSource)
+        except Exception:
+            # simply ignore it
+            pass
 
 
 if __name__ == '__main__':

eric ide

mercurial