RefactoringRope/CodeAssistServer.py

changeset 273
803593e12756
parent 270
efc48da49a75
child 280
45f0a0511acd
diff -r b92aa38f8cc2 -r 803593e12756 RefactoringRope/CodeAssistServer.py
--- a/RefactoringRope/CodeAssistServer.py	Mon Jun 25 18:24:07 2018 +0200
+++ b/RefactoringRope/CodeAssistServer.py	Mon Jul 09 18:54:48 2018 +0200
@@ -355,6 +355,9 @@
             for
         @type QScintilla.Editor.Editor
         """
+        if self.__documentationViewer is None:
+            return
+        
         language = editor.getLanguage()
         if language not in self.__editorLanguageMapping:
             if Preferences.getDocuViewer("ShowInfoAsRichText"):
@@ -395,6 +398,9 @@
         @param result dictionary containing the result sent by the client
         @type dict with keys 'name', 'argspec', 'note', 'docstring', 'typ'
         """
+        if self.__documentationViewer is None:
+            return
+        
         docu = None
         
         if "Error" not in result:
@@ -573,9 +579,10 @@
         """
         try:
             self.__documentationViewer = self.__ui.documentationViewer()
-            self.__documentationViewer.registerProvider(
-                "rope", self.tr("Rope"), self.requestCodeDocumentation,
-                self.isSupportedLanguage)
+            if self.__documentationViewer is not None:
+                self.__documentationViewer.registerProvider(
+                    "rope", self.tr("Rope"), self.requestCodeDocumentation,
+                    self.isSupportedLanguage)
         except AttributeError:
             # eric6 before 17.11 doesn't have this
             pass

eric ide

mercurial