Adjusted to the latest eric6 development state. server_client_variant

Sat, 21 Oct 2017 16:05:42 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 21 Oct 2017 16:05:42 +0200
branch
server_client_variant
changeset 223
d30d3b0d1df5
parent 222
5771e459f94c
child 224
22a43e85bcf6
child 227
c3638cbbc1e8

Adjusted to the latest eric6 development state.

PluginRefactoringRope.zip file | annotate | diff | comparison | revisions
RefactoringRope/CodeAssistServer.py file | annotate | diff | comparison | revisions
Binary file PluginRefactoringRope.zip has changed
--- a/RefactoringRope/CodeAssistServer.py	Mon Oct 16 19:58:35 2017 +0200
+++ b/RefactoringRope/CodeAssistServer.py	Sat Oct 21 16:05:42 2017 +0200
@@ -345,9 +345,16 @@
         """
         language = editor.getLanguage()
         if language not in self.__editorLanguageMapping:
+            if Preferences.getDocuViewer("ShowInfoAsRichText"):
+                warning = self.tr("Language <b>{0}</b> is not supported.")\
+                    .format(language)
+            else:
+                warning = self.tr("Language '{0}' is not supported.")\
+                    .format(language)
             self.__documentationViewer.documentationReady(
-                self.tr("Language '{0}' is not supported.").format(language))
+                warning,  isWarning=True)
             return
+        
         idString = self.__editorLanguageMapping[language]
         
         filename = editor.getFileName()
@@ -382,9 +389,9 @@
             documentationDict = result["DocumentationDict"]
             if documentationDict:
                 if "module" in documentationDict:
-                    if Preferences.getDocuViewer("ShowInfoAsMarkdown"):
+                    if Preferences.getDocuViewer("ShowInfoAsRichText"):
                         documentationDict["note"] = \
-                            self.tr("Present in _{0}_ module",
+                            self.tr("Present in <i>{0}</i> module",
                                     "Note with markdown syntax")\
                             .format(documentationDict["module"])
                     else:
@@ -395,7 +402,12 @@
                     del documentationDict["module"]
                 docu = documentationDict
         
-        self.__documentationViewer.documentationReady(docu)
+        if docu is None:
+            msg = self.tr("No documentation available.")
+            self.__documentationViewer.documentationReady(
+                msg, isDocWarning=True)
+        else:
+            self.__documentationViewer.documentationReady(docu)
     
     #######################################################################
     ## Methods below handle the network connection

eric ide

mercurial