PluginRefactoringRope.py

branch
server_client_variant
changeset 195
5d614a567be3
parent 191
2af42804bca2
child 197
7046ac1bcb4b
diff -r 5c297b473425 -r 5d614a567be3 PluginRefactoringRope.py
--- a/PluginRefactoringRope.py	Sun Sep 24 19:36:17 2017 +0200
+++ b/PluginRefactoringRope.py	Mon Sep 25 20:08:59 2017 +0200
@@ -155,7 +155,7 @@
         Private slot to (re)initialize the plugin.
         """
         self.__refactoringServer = None
-        self.__codeAssist = None
+        self.__codeAssistServer = None
         
         self.__editors = []
         
@@ -172,8 +172,8 @@
         global refactoringRopePluginObject
         refactoringRopePluginObject = self
         
-        from RefactoringRope.CodeAssist import CodeAssist
-        self.__codeAssist = CodeAssist(self, self)
+        from RefactoringRope.CodeAssistServer import CodeAssistServer
+        self.__codeAssistServer = CodeAssistServer(self, self.__ui)
         
         from RefactoringRope.RefactoringServer import RefactoringServer
         self.__refactoringServer = RefactoringServer(self, self.__ui)
@@ -287,7 +287,7 @@
         
         return langs
     
-    # TODO: move this to CodeAssist
+    # TODO: move this to CodeAssistServer
     def __editorOpened(self, editor):
         """
         Private slot called, when a new editor was opened.
@@ -302,7 +302,7 @@
         editor.languageChanged.connect(self.__editorLanguageChanged)
         self.__editors.append(editor)
     
-    # TODO: move this to CodeAssist
+    # TODO: move this to CodeAssistServer
     def __editorClosed(self, editor):
         """
         Private slot called, when an editor was closed.
@@ -314,7 +314,7 @@
             self.__disconnectEditor(editor)
             self.__editors.remove(editor)
     
-    # TODO: move this to CodeAssist
+    # TODO: move this to CodeAssistServer
     def __editorLanguageChanged(self, language):
         """
         Private slot to handle the language change of an editor.
@@ -340,7 +340,7 @@
         editor.editorAboutToBeSaved.connect(self.__editorAboutToBeSaved)
         editor.editorSaved.connect(self.__editorSaved)
         
-        # TODO: move this to CodeAssist
+        # TODO: move this to CodeAssistServer
         if self.getPreferences("CodeAssistEnabled"):
             self.__setAutoCompletionHook(editor)
         if self.getPreferences("CodeAssistCalltipsEnabled"):
@@ -377,7 +377,7 @@
             # just ignore it
             pass
         
-        # TODO: move this to CodeAssist
+        # TODO: move this to CodeAssistServer
         if editor.getCompletionListHook("rope"):
             self.__unsetAutoCompletionHook(editor)
         if editor.getCallTipHook("rope"):
@@ -385,7 +385,7 @@
         
         self.__disconnectMouseClickHandler(editor)
     
-    # TODO: move this to CodeAssist
+    # TODO: move this to CodeAssistServer
     def __disconnectMouseClickHandler(self, editor):
         """
         Private method to disconnect the mouse click handler from an editor.
@@ -394,7 +394,7 @@
         """
         editor.removeMouseClickHandlers("rope")
     
-    # TODO: move this to CodeAssist
+    # TODO: move this to CodeAssistServer
     def __setAutoCompletionHook(self, editor):
         """
         Private method to set the autocompletion hook.
@@ -403,7 +403,7 @@
         """
         editor.addCompletionListHook("rope", self.getCompletionsList)
     
-    # TODO: move this to CodeAssist
+    # TODO: move this to CodeAssistServer
     def __unsetAutoCompletionHook(self, editor):
         """
         Private method to unset the autocompletion hook.
@@ -412,7 +412,7 @@
         """
         editor.removeCompletionListHook("rope")
     
-    # TODO: move this to CodeAssist
+    # TODO: move this to CodeAssistServer
     def getCompletionsList(self, editor, context):
         """
         Public method to get a list of possible completions.
@@ -422,7 +422,7 @@
         @param context flag indicating to autocomplete a context (boolean)
         @return list of possible completions (list of strings)
         """
-        completions = self.__codeAssist.getCompletions(editor)
+        completions = self.__codeAssistServer.getCompletions(editor)
         return completions
     
     def __editorAboutToBeSaved(self, filename):
@@ -450,13 +450,13 @@
         if filename == self.__savedEditorName and self.__oldEditorText:
             self.__refactoringServer.reportChanged(self.__savedEditorName,
                                         self.__oldEditorText)
-            self.__codeAssist.reportChanged(self.__savedEditorName,
+            self.__codeAssistServer.reportChanged(self.__savedEditorName,
                                           self.__oldEditorText)
         else:
             self.__refactoringServer.reportChanged(filename, "")
-            self.__codeAssist.reportChanged(filename, "")
+            self.__codeAssistServer.reportChanged(filename, "")
     
-    # TODO: move this to CodeAssist
+    # TODO: move this to CodeAssistServer
     def __setCalltipsHook(self, editor):
         """
         Private method to set the calltip hook.
@@ -465,7 +465,7 @@
         """
         editor.addCallTipHook("rope", self.codeAssistCallTip)
     
-    # TODO: move this to CodeAssist
+    # TODO: move this to CodeAssistServer
     def __unsetCalltipsHook(self, editor):
         """
         Private method to unset the calltip hook.
@@ -474,7 +474,7 @@
         """
         editor.removeCallTipHook("rope")
     
-    # TODO: move this to CodeAssist
+    # TODO: move this to CodeAssistServer
     def codeAssistCallTip(self, editor, pos, commas):
         """
         Public method to return a list of calltips.
@@ -485,7 +485,7 @@
             (integer)
         @return list of possible calltips (list of strings)
         """
-        cts = self.__codeAssist.getCallTips(pos, editor)
+        cts = self.__codeAssistServer.getCallTips(pos, editor)
         return cts
 
 #

eric ide

mercurial