6600 self.autoCompleteFromAPIsAct.setEnabled(False) |
6600 self.autoCompleteFromAPIsAct.setEnabled(False) |
6601 self.autoCompleteFromAllAct.setEnabled(False) |
6601 self.autoCompleteFromAllAct.setEnabled(False) |
6602 self.autoCompleteAct.setEnabled( |
6602 self.autoCompleteAct.setEnabled( |
6603 editor.canProvideDynamicAutoCompletion()) |
6603 editor.canProvideDynamicAutoCompletion()) |
6604 self.calltipsAct.setEnabled(editor.canProvideCallTipps()) |
6604 self.calltipsAct.setEnabled(editor.canProvideCallTipps()) |
|
6605 self.codeInfoAct.setEnabled(self.__isEditorInfoSupportedEd(editor)) |
6605 |
6606 |
6606 if editor.isPyFile() or editor.isRubyFile(): |
6607 if editor.isPyFile() or editor.isRubyFile(): |
6607 self.gotoPreviousDefAct.setEnabled(True) |
6608 self.gotoPreviousDefAct.setEnabled(True) |
6608 self.gotoNextDefAct.setEnabled(True) |
6609 self.gotoNextDefAct.setEnabled(True) |
6609 else: |
6610 else: |
6814 @param editor editor to show information text for |
6815 @param editor editor to show information text for |
6815 @type Editor |
6816 @type Editor |
6816 """ |
6817 """ |
6817 self.ui.documentationViewer().showInfo(editor) |
6818 self.ui.documentationViewer().showInfo(editor) |
6818 |
6819 |
|
6820 def isEditorInfoSupported(self, language): |
|
6821 """ |
|
6822 Public method to check, if a language is supported by the |
|
6823 documentation viewer. |
|
6824 |
|
6825 @param language editor programming language to check |
|
6826 @type str |
|
6827 @return flag indicating the support status |
|
6828 @rtype bool |
|
6829 """ |
|
6830 return self.ui.documentationViewer().isSupportedLanguage(language) |
|
6831 |
|
6832 def __isEditorInfoSupportedEd(self, editor): |
|
6833 """ |
|
6834 Public method to check, if a language is supported by the |
|
6835 documentation viewer. |
|
6836 |
|
6837 @param editor reference to the editor to check for |
|
6838 @type Editor |
|
6839 @return flag indicating the support status |
|
6840 @rtype bool |
|
6841 """ |
|
6842 language = editor.getLanguage() |
|
6843 return self.isEditorInfoSupported(language) |
|
6844 |
6819 ################################################################## |
6845 ################################################################## |
6820 ## Below are protected utility methods |
6846 ## Below are protected utility methods |
6821 ################################################################## |
6847 ################################################################## |
6822 |
6848 |
6823 def _getOpenStartDir(self): |
6849 def _getOpenStartDir(self): |