Started correcting the source code documentation. server_client_variant

Wed, 27 Sep 2017 19:50:44 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 27 Sep 2017 19:50:44 +0200
branch
server_client_variant
changeset 202
a111134b5dc7
parent 201
e677d82706d4
child 203
c38750e1bafd

Started correcting the source code documentation.

PluginRefactoringRope.py file | annotate | diff | comparison | revisions
RefactoringRope/CodeAssistServer.py file | annotate | diff | comparison | revisions
RefactoringRope/RefactoringServer.py file | annotate | diff | comparison | revisions
--- a/PluginRefactoringRope.py	Wed Sep 27 19:30:16 2017 +0200
+++ b/PluginRefactoringRope.py	Wed Sep 27 19:50:44 2017 +0200
@@ -293,7 +293,8 @@
         """
         Private slot called, when a new editor was opened.
         
-        @param editor reference to the new editor (QScintilla.Editor)
+        @param editor reference to the new editor
+        @type QScintilla.Editor
         """
         if self.__codeAssistServer.isSupportedLanguage(editor.getLanguage()):
             self.__connectEditor(editor)
@@ -305,7 +306,8 @@
         """
         Private slot called, when an editor was closed.
         
-        @param editor reference to the editor (QScintilla.Editor)
+        @param editor reference to the editor
+        @type QScintilla.Editor
         """
         if editor in self.__editors:
             editor.languageChanged.disconnect(self.__editorLanguageChanged)
@@ -316,7 +318,8 @@
         """
         Private slot to handle the language change of an editor.
         
-        @param language programming language of the editor (string)
+        @param language programming language of the editor
+        @type str
         """
         editor = self.sender()
         
@@ -331,7 +334,8 @@
         """
         Private method to connect an editor.
         
-        @param editor reference to the editor (QScintilla.Editor)
+        @param editor reference to the editor
+        @type QScintilla.Editor
         """
         editor.editorAboutToBeSaved.connect(self.__editorAboutToBeSaved)
         editor.editorSaved.connect(self.__editorSaved)
@@ -349,7 +353,8 @@
         """
         Private method to connect the mouse click handler to an editor.
         
-        @param editor reference to the editor (QScintilla.Editor)
+        @param editor reference to the editor
+        @type QScintilla.Editor
         """
         if self.getPreferences("MouseClickGotoButton"):
             editor.setMouseClickHandler(
@@ -363,7 +368,8 @@
         """
         Private method to disconnect an editor.
         
-        @param editor reference to the editor (QScintilla.Editor)
+        @param editor reference to the editor
+        @type QScintilla.Editor
         """
         try:
             editor.editorAboutToBeSaved.disconnect(self.__editorAboutToBeSaved)
@@ -383,7 +389,8 @@
         """
         Private method to disconnect the mouse click handler from an editor.
         
-        @param editor reference to the editor (QScintilla.Editor)
+        @param editor reference to the editor
+        @type QScintilla.Editor
         """
         editor.removeMouseClickHandlers("rope")
     
@@ -391,7 +398,8 @@
         """
         Private method to set the autocompletion hook.
         
-        @param editor reference to the editor (QScintilla.Editor)
+        @param editor reference to the editor
+        @type QScintilla.Editor
         """
         editor.addCompletionListHook("rope", self.getCompletionsList)
     
@@ -399,7 +407,8 @@
         """
         Private method to unset the autocompletion hook.
         
-        @param editor reference to the editor (QScintilla.Editor)
+        @param editor reference to the editor
+        @type QScintilla.Editor
         """
         editor.removeCompletionListHook("rope")
     
@@ -408,9 +417,11 @@
         Public method to get a list of possible completions.
         
         @param editor reference to the editor object, that called this method
-            (QScintilla.Editor)
-        @param context flag indicating to autocomplete a context (boolean)
-        @return list of possible completions (list of strings)
+        @type QScintilla.Editor
+        @param context flag indicating to autocomplete a context
+        @type bool
+        @return list of possible completions
+        @rtype list of str
         """
         completions = self.__codeAssistServer.getCompletions(editor)
         return completions
@@ -419,7 +430,8 @@
         """
         Private slot to get the old contents of the named file.
         
-        @param filename name of the file about to be saved (string)
+        @param filename name of the file about to be saved
+        @type str
         """
         if filename and os.path.exists(filename):
             try:
@@ -435,7 +447,8 @@
         """
         Private slot to activate SOA.
         
-        @param filename name of the file that was saved (string)
+        @param filename name of the file that was saved
+        @type str
         """
         if filename == self.__savedEditorName and self.__oldEditorText:
             self.__refactoringServer.reportChanged(self.__savedEditorName,
@@ -450,7 +463,8 @@
         """
         Private method to set the calltip hook.
         
-        @param editor reference to the editor (QScintilla.Editor)
+        @param editor reference to the editor
+        @type QScintilla.Editor
         """
         editor.addCallTipHook("rope", self.codeAssistCallTip)
     
@@ -458,7 +472,8 @@
         """
         Private method to unset the calltip hook.
         
-        @param editor reference to the editor (QScintilla.Editor)
+        @param editor reference to the editor
+        @type QScintilla.Editor
         """
         editor.removeCallTipHook("rope")
     
@@ -466,11 +481,14 @@
         """
         Public method to return a list of calltips.
         
-        @param editor reference to the editor (QScintilla.Editor)
-        @param pos position in the text for the calltip (integer)
+        @param editor reference to the editor
+        @type QScintilla.Editor
+        @param pos position in the text for the calltip
+        @type int
         @param commas minimum number of commas contained in the calltip
-            (integer)
-        @return list of possible calltips (list of strings)
+        @type int
+        @return list of possible calltips
+        @rtype list of str
         """
         cts = self.__codeAssistServer.getCallTips(pos, editor)
         return cts
--- a/RefactoringRope/CodeAssistServer.py	Wed Sep 27 19:30:16 2017 +0200
+++ b/RefactoringRope/CodeAssistServer.py	Wed Sep 27 19:50:44 2017 +0200
@@ -10,16 +10,12 @@
 from __future__ import unicode_literals
 
 import os
-import sys
 
 from PyQt5.QtCore import pyqtSlot, QCoreApplication, QTimer
 
 from E5Gui.E5Application import e5App
 
-# TODO: eliminate this
-sys.path.insert(0, os.path.dirname(__file__))
-
-from JsonServer import JsonServer
+from .JsonServer import JsonServer
 
 import Globals
 import Preferences
@@ -135,7 +131,7 @@
         """
         Private method to process the completions sent by the client.
         
-        @param result dictionary containg the result sent by the client
+        @param result dictionary containing the result sent by the client
         @type dict
         """
         if "Error" in result:
@@ -188,7 +184,7 @@
         """
         Private method to process the calltips sent by the client.
         
-        @param result dictionary containg the result sent by the client
+        @param result dictionary containing the result sent by the client
         @type dict
         """
         if "Error" in result:
@@ -224,9 +220,6 @@
         """
         Public method to handle a method call from the client.
         
-        Note: This is an empty implementation that must be overridden in
-        derived classes.
-        
         @param method requested method name
         @type str
         @param params dictionary with method specific parameters
@@ -274,6 +267,9 @@
     def activate(self):
         """
         Public method to activate the code assist server.
+        
+        Note: This method provides for some growth potential.
+            Currently it is empty.
         """
         pass
     
--- a/RefactoringRope/RefactoringServer.py	Wed Sep 27 19:30:16 2017 +0200
+++ b/RefactoringRope/RefactoringServer.py	Wed Sep 27 19:50:44 2017 +0200
@@ -16,6 +16,7 @@
 import os
 import sys
 
+# TODO: eliminate this
 sys.path.insert(0, os.path.dirname(__file__))
 
 from PyQt5.QtCore import pyqtSlot
@@ -2179,9 +2180,6 @@
         """
         Public method to handle a method call from the client.
         
-        Note: This is an empty implementation that must be overridden in
-        derived classes.
-        
         @param method requested method name
         @type str
         @param params dictionary with method specific parameters

eric ide

mercurial