ViewManager/ViewManager.py

changeset 5911
0c7bcba51391
parent 5907
c928af9fce32
child 5913
7ab2293917f8
--- a/ViewManager/ViewManager.py	Mon Oct 16 19:40:47 2017 +0200
+++ b/ViewManager/ViewManager.py	Mon Oct 16 20:18:04 2017 +0200
@@ -6602,6 +6602,7 @@
             self.autoCompleteAct.setEnabled(
                 editor.canProvideDynamicAutoCompletion())
             self.calltipsAct.setEnabled(editor.canProvideCallTipps())
+            self.codeInfoAct.setEnabled(self.__isEditorInfoSupportedEd(editor))
             
             if editor.isPyFile() or editor.isRubyFile():
                 self.gotoPreviousDefAct.setEnabled(True)
@@ -6816,6 +6817,31 @@
         """
         self.ui.documentationViewer().showInfo(editor)
     
+    def isEditorInfoSupported(self, language):
+        """
+        Public method to check, if a language is supported by the
+        documentation viewer.
+        
+        @param language editor programming language to check
+        @type str
+        @return flag indicating the support status
+        @rtype bool
+        """
+        return self.ui.documentationViewer().isSupportedLanguage(language)
+    
+    def __isEditorInfoSupportedEd(self, editor):
+        """
+        Public method to check, if a language is supported by the
+        documentation viewer.
+        
+        @param editor reference to the editor to check for
+        @type Editor
+        @return flag indicating the support status
+        @rtype bool
+        """
+        language = editor.getLanguage()
+        return self.isEditorInfoSupported(language)
+    
     ##################################################################
     ## Below are protected utility methods
     ##################################################################

eric ide

mercurial