diff -r e9e7eca7efee -r bf71ee032bb4 src/eric7/Preferences/ConfigurationPages/EditorPropertiesPage.py --- a/src/eric7/Preferences/ConfigurationPages/EditorPropertiesPage.py Wed Jul 13 11:16:20 2022 +0200 +++ b/src/eric7/Preferences/ConfigurationPages/EditorPropertiesPage.py Wed Jul 13 14:55:47 2022 +0200 @@ -19,534 +19,546 @@ """ Class implementing the Editor Properties configuration page. """ + def __init__(self, lexers): """ Constructor - + @param lexers reference to the lexers dictionary """ super().__init__() self.setupUi(self) self.setObjectName("EditorPropertiesPage") - + self.languages = sorted(list(lexers.keys())[:]) - + # set initial values # All - self.allFoldCompactCheckBox.setChecked( - Preferences.getEditor("AllFoldCompact")) - + self.allFoldCompactCheckBox.setChecked(Preferences.getEditor("AllFoldCompact")) + # Bash self.foldBashCommentCheckBox.setChecked( - Preferences.getEditor("BashFoldComment")) - + Preferences.getEditor("BashFoldComment") + ) + # C++ - self.foldCppCommentCheckBox.setChecked( - Preferences.getEditor("CppFoldComment")) + self.foldCppCommentCheckBox.setChecked(Preferences.getEditor("CppFoldComment")) self.foldCppPreprocessorCheckBox.setChecked( - Preferences.getEditor("CppFoldPreprocessor")) - self.foldCppAtElseCheckBox.setChecked( - Preferences.getEditor("CppFoldAtElse")) + Preferences.getEditor("CppFoldPreprocessor") + ) + self.foldCppAtElseCheckBox.setChecked(Preferences.getEditor("CppFoldAtElse")) self.cppIndentOpeningBraceCheckBox.setChecked( - Preferences.getEditor("CppIndentOpeningBrace")) + Preferences.getEditor("CppIndentOpeningBrace") + ) self.cppIndentClosingBraceCheckBox.setChecked( - Preferences.getEditor("CppIndentClosingBrace")) + Preferences.getEditor("CppIndentClosingBrace") + ) self.cppCaseInsensitiveCheckBox.setChecked( - Preferences.getEditor("CppCaseInsensitiveKeywords")) + Preferences.getEditor("CppCaseInsensitiveKeywords") + ) self.cppDollarAllowedCheckBox.setChecked( - Preferences.getEditor("CppDollarsAllowed")) + Preferences.getEditor("CppDollarsAllowed") + ) self.cppStylePreprocessorCheckBox.setChecked( - Preferences.getEditor("CppStylePreprocessor")) + Preferences.getEditor("CppStylePreprocessor") + ) self.cppHighlightTripleQuotedCheckBox.setChecked( - Preferences.getEditor("CppHighlightTripleQuotedStrings")) + Preferences.getEditor("CppHighlightTripleQuotedStrings") + ) self.cppHighlightHashQuotedCheckBox.setChecked( - Preferences.getEditor("CppHighlightHashQuotedStrings")) + Preferences.getEditor("CppHighlightHashQuotedStrings") + ) self.cppHighlightBackQuotedCheckBox.setChecked( - Preferences.getEditor("CppHighlightBackQuotedStrings")) + Preferences.getEditor("CppHighlightBackQuotedStrings") + ) self.cppHighlightEsacepSequencesCheckBox.setChecked( - Preferences.getEditor("CppHighlightEscapeSequences")) + Preferences.getEditor("CppHighlightEscapeSequences") + ) self.cppVerbatimStringEscapeAllowedCheckBox.setChecked( - Preferences.getEditor( - "CppVerbatimStringEscapeSequencesAllowed")) - + Preferences.getEditor("CppVerbatimStringEscapeSequencesAllowed") + ) + # CMake self.cmakeFoldAtElseCheckBox.setChecked( - Preferences.getEditor("CMakeFoldAtElse")) - + Preferences.getEditor("CMakeFoldAtElse") + ) + # CoffeeScript if "CoffeeScript" in self.languages: self.foldCoffeeScriptCommentCheckBox.setChecked( - Preferences.getEditor("CoffeScriptFoldComment")) + Preferences.getEditor("CoffeScriptFoldComment") + ) self.coffeeScriptDollarAllowedCheckBox.setChecked( - Preferences.getEditor("CoffeeScriptDollarsAllowed")) + Preferences.getEditor("CoffeeScriptDollarsAllowed") + ) self.coffeeScriptStylePreprocessorCheckBox.setChecked( - Preferences.getEditor("CoffeeScriptStylePreprocessor")) + Preferences.getEditor("CoffeeScriptStylePreprocessor") + ) else: self.coffeeScriptGroup.setEnabled(False) - + # CSS - self.foldCssCommentCheckBox.setChecked( - Preferences.getEditor("CssFoldComment")) - self.cssHssCheckBox.setChecked( - Preferences.getEditor("CssHssSupport")) - self.cssLessCheckBox.setChecked( - Preferences.getEditor("CssLessSupport")) - self.cssSassyCheckBox.setChecked( - Preferences.getEditor("CssSassySupport")) - + self.foldCssCommentCheckBox.setChecked(Preferences.getEditor("CssFoldComment")) + self.cssHssCheckBox.setChecked(Preferences.getEditor("CssHssSupport")) + self.cssLessCheckBox.setChecked(Preferences.getEditor("CssLessSupport")) + self.cssSassyCheckBox.setChecked(Preferences.getEditor("CssSassySupport")) + # D - self.foldDCommentCheckBox.setChecked( - Preferences.getEditor("DFoldComment")) - self.foldDAtElseCheckBox.setChecked( - Preferences.getEditor("DFoldAtElse")) + self.foldDCommentCheckBox.setChecked(Preferences.getEditor("DFoldComment")) + self.foldDAtElseCheckBox.setChecked(Preferences.getEditor("DFoldAtElse")) self.dIndentOpeningBraceCheckBox.setChecked( - Preferences.getEditor("DIndentOpeningBrace")) + Preferences.getEditor("DIndentOpeningBrace") + ) self.dIndentClosingBraceCheckBox.setChecked( - Preferences.getEditor("DIndentClosingBrace")) - + Preferences.getEditor("DIndentClosingBrace") + ) + # Gettext if "Gettext" in self.languages: self.foldPoCommentCheckBox.setChecked( - Preferences.getEditor("PoFoldComment")) + Preferences.getEditor("PoFoldComment") + ) else: self.gettextGroup.setEnabled(False) - + # HTML self.foldHtmlPreprocessorCheckBox.setChecked( - Preferences.getEditor("HtmlFoldPreprocessor")) + Preferences.getEditor("HtmlFoldPreprocessor") + ) self.htmlCaseSensitiveTagsCheckBox.setChecked( - Preferences.getEditor("HtmlCaseSensitiveTags")) + Preferences.getEditor("HtmlCaseSensitiveTags") + ) self.foldHtmlScriptCommentsCheckBox.setChecked( - Preferences.getEditor("HtmlFoldScriptComments")) + Preferences.getEditor("HtmlFoldScriptComments") + ) self.foldHtmlScriptHereDocsCheckBox.setChecked( - Preferences.getEditor("HtmlFoldScriptHeredocs")) - self.htmlDjangoCheckBox.setChecked( - Preferences.getEditor("HtmlDjangoTemplates")) - self.htmlMakoCheckBox.setChecked( - Preferences.getEditor("HtmlMakoTemplates")) - + Preferences.getEditor("HtmlFoldScriptHeredocs") + ) + self.htmlDjangoCheckBox.setChecked(Preferences.getEditor("HtmlDjangoTemplates")) + self.htmlMakoCheckBox.setChecked(Preferences.getEditor("HtmlMakoTemplates")) + # JSON if "JSON" in self.languages: self.jsonHighlightCommentsCheckBox.setChecked( - Preferences.getEditor("JSONHightlightComments")) + Preferences.getEditor("JSONHightlightComments") + ) self.jsonHighlightEscapeCheckBox.setChecked( - Preferences.getEditor("JSONHighlightEscapeSequences")) + Preferences.getEditor("JSONHighlightEscapeSequences") + ) else: self.jsonGroup.setEnabled(False) - + # Pascal self.pascalGroup.setEnabled(True) self.foldPascalCommentCheckBox.setChecked( - Preferences.getEditor("PascalFoldComment")) + Preferences.getEditor("PascalFoldComment") + ) self.foldPascalPreprocessorCheckBox.setChecked( - Preferences.getEditor("PascalFoldPreprocessor")) + Preferences.getEditor("PascalFoldPreprocessor") + ) self.pascalSmartHighlightingCheckBox.setChecked( - Preferences.getEditor("PascalSmartHighlighting")) - + Preferences.getEditor("PascalSmartHighlighting") + ) + # Perl self.foldPerlCommentCheckBox.setChecked( - Preferences.getEditor("PerlFoldComment")) + Preferences.getEditor("PerlFoldComment") + ) self.foldPerlPackagesCheckBox.setChecked( - Preferences.getEditor("PerlFoldPackages")) + Preferences.getEditor("PerlFoldPackages") + ) self.foldPerlPODBlocksCheckBox.setChecked( - Preferences.getEditor("PerlFoldPODBlocks")) - self.foldPerlAtElseCheckBox.setChecked( - Preferences.getEditor("PerlFoldAtElse")) - + Preferences.getEditor("PerlFoldPODBlocks") + ) + self.foldPerlAtElseCheckBox.setChecked(Preferences.getEditor("PerlFoldAtElse")) + # PostScript self.postscriptGroup.setEnabled(True) self.psFoldAtElseCheckBox.setChecked( - Preferences.getEditor("PostScriptFoldAtElse")) + Preferences.getEditor("PostScriptFoldAtElse") + ) self.psMarkTokensCheckBox.setChecked( - Preferences.getEditor("PostScriptTokenize")) - self.psLevelSpinBox.setValue( - Preferences.getEditor("PostScriptLevel")) - + Preferences.getEditor("PostScriptTokenize") + ) + self.psLevelSpinBox.setValue(Preferences.getEditor("PostScriptLevel")) + # Povray self.foldPovrayCommentCheckBox.setChecked( - Preferences.getEditor("PovFoldComment")) + Preferences.getEditor("PovFoldComment") + ) self.foldPovrayDirectivesCheckBox.setChecked( - Preferences.getEditor("PovFoldDirectives")) - + Preferences.getEditor("PovFoldDirectives") + ) + # Properties self.propertiesInitialSpacesCheckBox.setChecked( - Preferences.getEditor("PropertiesInitialSpaces")) - + Preferences.getEditor("PropertiesInitialSpaces") + ) + # Python - self.pythonBadIndentationComboBox.addItems([ - self.tr("No Warning"), - self.tr("Inconsistent"), - self.tr("Tabs after Spaces"), - self.tr("Spaces"), - self.tr("Tabs"), - ]) + self.pythonBadIndentationComboBox.addItems( + [ + self.tr("No Warning"), + self.tr("Inconsistent"), + self.tr("Tabs after Spaces"), + self.tr("Spaces"), + self.tr("Tabs"), + ] + ) self.pythonBadIndentationComboBox.setCurrentIndex( - Preferences.getEditor("PythonBadIndentation").value) + Preferences.getEditor("PythonBadIndentation").value + ) self.foldPythonCommentCheckBox.setChecked( - Preferences.getEditor("PythonFoldComment")) + Preferences.getEditor("PythonFoldComment") + ) self.foldPythonStringCheckBox.setChecked( - Preferences.getEditor("PythonFoldString")) + Preferences.getEditor("PythonFoldString") + ) self.pythonAutoindentCheckBox.setChecked( - Preferences.getEditor("PythonAutoIndent")) + Preferences.getEditor("PythonAutoIndent") + ) self.pythonV2UnicodeAllowedCheckBox.setChecked( - Preferences.getEditor("PythonAllowV2Unicode")) + Preferences.getEditor("PythonAllowV2Unicode") + ) self.pythonV3BinaryAllowedCheckBox.setChecked( - Preferences.getEditor("PythonAllowV3Binary")) + Preferences.getEditor("PythonAllowV3Binary") + ) self.pythonV3BytesAllowedCheckBox.setChecked( - Preferences.getEditor("PythonAllowV3Bytes")) + Preferences.getEditor("PythonAllowV3Bytes") + ) self.foldPythonQuotesCheckBox.setChecked( - Preferences.getEditor("PythonFoldQuotes")) + Preferences.getEditor("PythonFoldQuotes") + ) self.pythonStringsOverNewlineCheckBox.setChecked( - Preferences.getEditor("PythonStringsOverNewLineAllowed")) + Preferences.getEditor("PythonStringsOverNewLineAllowed") + ) self.pythonHighlightSubidentifierCheckBox.setChecked( - Preferences.getEditor("PythonHighlightSubidentifier")) - + Preferences.getEditor("PythonHighlightSubidentifier") + ) + # Ruby self.foldRubyCommentCheckBox.setChecked( - Preferences.getEditor("RubyFoldComment")) - + Preferences.getEditor("RubyFoldComment") + ) + # SQL - self.foldSqlCommentCheckBox.setChecked( - Preferences.getEditor("SqlFoldComment")) + self.foldSqlCommentCheckBox.setChecked(Preferences.getEditor("SqlFoldComment")) self.sqlBackslashEscapesCheckBox.setChecked( - Preferences.getEditor("SqlBackslashEscapes")) - self.sqlFoldAtElseCheckBox.setChecked( - Preferences.getEditor("SqlFoldAtElse")) + Preferences.getEditor("SqlBackslashEscapes") + ) + self.sqlFoldAtElseCheckBox.setChecked(Preferences.getEditor("SqlFoldAtElse")) self.sqlFoldOnlyBeginCheckBox.setChecked( - Preferences.getEditor("SqlFoldOnlyBegin")) - self.sqlDottedWordsCheckBox.setChecked( - Preferences.getEditor("SqlDottedWords")) + Preferences.getEditor("SqlFoldOnlyBegin") + ) + self.sqlDottedWordsCheckBox.setChecked(Preferences.getEditor("SqlDottedWords")) self.sqlHashCommentsCheckBox.setChecked( - Preferences.getEditor("SqlHashComments")) + Preferences.getEditor("SqlHashComments") + ) self.sqlQuotedIdentifiersCheckBox.setChecked( - Preferences.getEditor("SqlQuotedIdentifiers")) - + Preferences.getEditor("SqlQuotedIdentifiers") + ) + # TCL - self.foldTclCommentCheckBox.setChecked( - Preferences.getEditor("TclFoldComment")) - + self.foldTclCommentCheckBox.setChecked(Preferences.getEditor("TclFoldComment")) + # TeX - self.foldTexCommentCheckBox.setChecked( - Preferences.getEditor("TexFoldComment")) + self.foldTexCommentCheckBox.setChecked(Preferences.getEditor("TexFoldComment")) self.texProcessCommentsCheckBox.setChecked( - Preferences.getEditor("TexProcessComments")) - self.texProcessIfCheckBox.setChecked( - Preferences.getEditor("TexProcessIf")) - + Preferences.getEditor("TexProcessComments") + ) + self.texProcessIfCheckBox.setChecked(Preferences.getEditor("TexProcessIf")) + # VHDL self.vhdlFoldCommentCheckBox.setChecked( - Preferences.getEditor("VHDLFoldComment")) - self.vhdlFoldAtElseCheckBox.setChecked( - Preferences.getEditor("VHDLFoldAtElse")) + Preferences.getEditor("VHDLFoldComment") + ) + self.vhdlFoldAtElseCheckBox.setChecked(Preferences.getEditor("VHDLFoldAtElse")) self.vhdlFoldAtBeginCheckBox.setChecked( - Preferences.getEditor("VHDLFoldAtBegin")) + Preferences.getEditor("VHDLFoldAtBegin") + ) self.vhdlFoldAtParenthesisCheckBox.setChecked( - Preferences.getEditor("VHDLFoldAtParenthesis")) - + Preferences.getEditor("VHDLFoldAtParenthesis") + ) + # XML - self.xmlSyleScriptsCheckBox.setChecked( - Preferences.getEditor("XMLStyleScripts")) - + self.xmlSyleScriptsCheckBox.setChecked(Preferences.getEditor("XMLStyleScripts")) + # YAML self.yamlGroup.setEnabled(True) self.foldYamlCommentCheckBox.setChecked( - Preferences.getEditor("YAMLFoldComment")) - + Preferences.getEditor("YAMLFoldComment") + ) + def save(self): """ Public slot to save the Editor Properties (1) configuration. """ # All - Preferences.setEditor( - "AllFoldCompact", - self.allFoldCompactCheckBox.isChecked()) - + Preferences.setEditor("AllFoldCompact", self.allFoldCompactCheckBox.isChecked()) + # Bash Preferences.setEditor( - "BashFoldComment", - self.foldBashCommentCheckBox.isChecked()) - + "BashFoldComment", self.foldBashCommentCheckBox.isChecked() + ) + # CMake Preferences.setEditor( - "CMakeFoldAtElse", - self.cmakeFoldAtElseCheckBox.isChecked()) - + "CMakeFoldAtElse", self.cmakeFoldAtElseCheckBox.isChecked() + ) + # C++ + Preferences.setEditor("CppFoldComment", self.foldCppCommentCheckBox.isChecked()) Preferences.setEditor( - "CppFoldComment", - self.foldCppCommentCheckBox.isChecked()) - Preferences.setEditor( - "CppFoldPreprocessor", - self.foldCppPreprocessorCheckBox.isChecked()) - Preferences.setEditor( - "CppFoldAtElse", - self.foldCppAtElseCheckBox.isChecked()) + "CppFoldPreprocessor", self.foldCppPreprocessorCheckBox.isChecked() + ) + Preferences.setEditor("CppFoldAtElse", self.foldCppAtElseCheckBox.isChecked()) Preferences.setEditor( - "CppIndentOpeningBrace", - self.cppIndentOpeningBraceCheckBox.isChecked()) + "CppIndentOpeningBrace", self.cppIndentOpeningBraceCheckBox.isChecked() + ) Preferences.setEditor( - "CppIndentClosingBrace", - self.cppIndentClosingBraceCheckBox.isChecked()) + "CppIndentClosingBrace", self.cppIndentClosingBraceCheckBox.isChecked() + ) Preferences.setEditor( - "CppCaseInsensitiveKeywords", - self.cppCaseInsensitiveCheckBox.isChecked()) + "CppCaseInsensitiveKeywords", self.cppCaseInsensitiveCheckBox.isChecked() + ) Preferences.setEditor( - "CppDollarsAllowed", - self.cppDollarAllowedCheckBox.isChecked()) + "CppDollarsAllowed", self.cppDollarAllowedCheckBox.isChecked() + ) Preferences.setEditor( - "CppStylePreprocessor", - self.cppStylePreprocessorCheckBox.isChecked()) + "CppStylePreprocessor", self.cppStylePreprocessorCheckBox.isChecked() + ) Preferences.setEditor( "CppHighlightTripleQuotedStrings", - self.cppHighlightTripleQuotedCheckBox.isChecked()) + self.cppHighlightTripleQuotedCheckBox.isChecked(), + ) Preferences.setEditor( "CppHighlightHashQuotedStrings", - self.cppHighlightHashQuotedCheckBox.isChecked()) + self.cppHighlightHashQuotedCheckBox.isChecked(), + ) Preferences.setEditor( "CppHighlightBackQuotedStrings", - self.cppHighlightBackQuotedCheckBox.isChecked()) + self.cppHighlightBackQuotedCheckBox.isChecked(), + ) Preferences.setEditor( "CppHighlightEscapeSequences", - self.cppHighlightEsacepSequencesCheckBox.isChecked()) + self.cppHighlightEsacepSequencesCheckBox.isChecked(), + ) Preferences.setEditor( "CppVerbatimStringEscapeSequencesAllowed", - self.cppVerbatimStringEscapeAllowedCheckBox.isChecked()) - + self.cppVerbatimStringEscapeAllowedCheckBox.isChecked(), + ) + # CMake Preferences.setEditor( - "CMakeFoldAtElse", - self.cmakeFoldAtElseCheckBox.isChecked()) - + "CMakeFoldAtElse", self.cmakeFoldAtElseCheckBox.isChecked() + ) + # CoffeeScript if "CoffeeScript" in self.languages: Preferences.setEditor( "CoffeScriptFoldComment", - self.foldCoffeeScriptCommentCheckBox.isChecked()) + self.foldCoffeeScriptCommentCheckBox.isChecked(), + ) Preferences.setEditor( "CoffeeScriptDollarsAllowed", - self.coffeeScriptDollarAllowedCheckBox.isChecked()) + self.coffeeScriptDollarAllowedCheckBox.isChecked(), + ) Preferences.setEditor( "CoffeeScriptStylePreprocessor", - self.coffeeScriptStylePreprocessorCheckBox.isChecked()) - + self.coffeeScriptStylePreprocessorCheckBox.isChecked(), + ) + # CSS - Preferences.setEditor( - "CssFoldComment", - self.foldCssCommentCheckBox.isChecked()) - Preferences.setEditor( - "CssHssSupport", - self.cssHssCheckBox.isChecked()) - Preferences.setEditor( - "CssLessSupport", - self.cssLessCheckBox.isChecked()) + Preferences.setEditor("CssFoldComment", self.foldCssCommentCheckBox.isChecked()) + Preferences.setEditor("CssHssSupport", self.cssHssCheckBox.isChecked()) + Preferences.setEditor("CssLessSupport", self.cssLessCheckBox.isChecked()) + Preferences.setEditor("CssSassySupport", self.cssSassyCheckBox.isChecked()) + + # D + Preferences.setEditor("DFoldComment", self.foldDCommentCheckBox.isChecked()) + Preferences.setEditor("DFoldAtElse", self.foldDAtElseCheckBox.isChecked()) Preferences.setEditor( - "CssSassySupport", - self.cssSassyCheckBox.isChecked()) - - # D - Preferences.setEditor( - "DFoldComment", - self.foldDCommentCheckBox.isChecked()) + "DIndentOpeningBrace", self.dIndentOpeningBraceCheckBox.isChecked() + ) Preferences.setEditor( - "DFoldAtElse", - self.foldDAtElseCheckBox.isChecked()) - Preferences.setEditor( - "DIndentOpeningBrace", - self.dIndentOpeningBraceCheckBox.isChecked()) - Preferences.setEditor( - "DIndentClosingBrace", - self.dIndentClosingBraceCheckBox.isChecked()) - + "DIndentClosingBrace", self.dIndentClosingBraceCheckBox.isChecked() + ) + # Gettext if "Gettext" in self.languages: Preferences.setEditor( - "PoFoldComment", - self.foldPoCommentCheckBox.isChecked()) - + "PoFoldComment", self.foldPoCommentCheckBox.isChecked() + ) + # HTML Preferences.setEditor( - "HtmlFoldPreprocessor", - self.foldHtmlPreprocessorCheckBox.isChecked()) + "HtmlFoldPreprocessor", self.foldHtmlPreprocessorCheckBox.isChecked() + ) Preferences.setEditor( - "HtmlCaseSensitiveTags", - self.htmlCaseSensitiveTagsCheckBox.isChecked()) - Preferences.setEditor( - "HtmlFoldScriptComments", - self.foldHtmlScriptCommentsCheckBox.isChecked()) + "HtmlCaseSensitiveTags", self.htmlCaseSensitiveTagsCheckBox.isChecked() + ) Preferences.setEditor( - "HtmlFoldScriptHeredocs", - self.foldHtmlScriptHereDocsCheckBox.isChecked()) + "HtmlFoldScriptComments", self.foldHtmlScriptCommentsCheckBox.isChecked() + ) Preferences.setEditor( - "HtmlDjangoTemplates", - self.htmlDjangoCheckBox.isChecked()) + "HtmlFoldScriptHeredocs", self.foldHtmlScriptHereDocsCheckBox.isChecked() + ) Preferences.setEditor( - "HtmlMakoTemplates", - self.htmlMakoCheckBox.isChecked()) - + "HtmlDjangoTemplates", self.htmlDjangoCheckBox.isChecked() + ) + Preferences.setEditor("HtmlMakoTemplates", self.htmlMakoCheckBox.isChecked()) + # JSON if "JSON" in self.languages: Preferences.setEditor( - "JSONHightlightComments", - self.jsonHighlightCommentsCheckBox.isChecked()) + "JSONHightlightComments", self.jsonHighlightCommentsCheckBox.isChecked() + ) Preferences.setEditor( "JSONHighlightEscapeSequences", - self.jsonHighlightEscapeCheckBox.isChecked()) - + self.jsonHighlightEscapeCheckBox.isChecked(), + ) + # Pascal Preferences.setEditor( - "PascalFoldComment", - self.foldPascalCommentCheckBox.isChecked()) + "PascalFoldComment", self.foldPascalCommentCheckBox.isChecked() + ) Preferences.setEditor( - "PascalFoldPreprocessor", - self.foldPascalPreprocessorCheckBox.isChecked()) + "PascalFoldPreprocessor", self.foldPascalPreprocessorCheckBox.isChecked() + ) Preferences.setEditor( - "PascalSmartHighlighting", - self.pascalSmartHighlightingCheckBox.isChecked()) - + "PascalSmartHighlighting", self.pascalSmartHighlightingCheckBox.isChecked() + ) + # Perl Preferences.setEditor( - "PerlFoldComment", - self.foldPerlCommentCheckBox.isChecked()) - Preferences.setEditor( - "PerlFoldPackages", - self.foldPerlPackagesCheckBox.isChecked()) + "PerlFoldComment", self.foldPerlCommentCheckBox.isChecked() + ) Preferences.setEditor( - "PerlFoldPODBlocks", - self.foldPerlPODBlocksCheckBox.isChecked()) + "PerlFoldPackages", self.foldPerlPackagesCheckBox.isChecked() + ) Preferences.setEditor( - "PerlFoldAtElse", - self.foldPerlAtElseCheckBox.isChecked()) - + "PerlFoldPODBlocks", self.foldPerlPODBlocksCheckBox.isChecked() + ) + Preferences.setEditor("PerlFoldAtElse", self.foldPerlAtElseCheckBox.isChecked()) + # PostScript Preferences.setEditor( - "PostScriptFoldAtElse", - self.psFoldAtElseCheckBox.isChecked()) + "PostScriptFoldAtElse", self.psFoldAtElseCheckBox.isChecked() + ) Preferences.setEditor( - "PostScriptTokenize", - self.psMarkTokensCheckBox.isChecked()) - Preferences.setEditor( - "PostScriptLevel", - self.psLevelSpinBox.value()) - + "PostScriptTokenize", self.psMarkTokensCheckBox.isChecked() + ) + Preferences.setEditor("PostScriptLevel", self.psLevelSpinBox.value()) + # Povray Preferences.setEditor( - "PovFoldComment", - self.foldPovrayCommentCheckBox.isChecked()) + "PovFoldComment", self.foldPovrayCommentCheckBox.isChecked() + ) Preferences.setEditor( - "PovFoldDirectives", - self.foldPovrayDirectivesCheckBox.isChecked()) - + "PovFoldDirectives", self.foldPovrayDirectivesCheckBox.isChecked() + ) + # Properties Preferences.setEditor( - "PropertiesInitialSpaces", - self.propertiesInitialSpacesCheckBox.isChecked()) - + "PropertiesInitialSpaces", self.propertiesInitialSpacesCheckBox.isChecked() + ) + # Python Preferences.setEditor( - "PythonFoldComment", - self.foldPythonCommentCheckBox.isChecked()) + "PythonFoldComment", self.foldPythonCommentCheckBox.isChecked() + ) Preferences.setEditor( - "PythonFoldString", - self.foldPythonStringCheckBox.isChecked()) + "PythonFoldString", self.foldPythonStringCheckBox.isChecked() + ) Preferences.setEditor( "PythonBadIndentation", QsciLexerPython.IndentationWarning( - self.pythonBadIndentationComboBox.currentIndex())) + self.pythonBadIndentationComboBox.currentIndex() + ), + ) Preferences.setEditor( - "PythonAutoIndent", - self.pythonAutoindentCheckBox.isChecked()) - Preferences.setEditor( - "PythonAllowV2Unicode", - self.pythonV2UnicodeAllowedCheckBox.isChecked()) + "PythonAutoIndent", self.pythonAutoindentCheckBox.isChecked() + ) Preferences.setEditor( - "PythonAllowV3Binary", - self.pythonV3BinaryAllowedCheckBox.isChecked()) + "PythonAllowV2Unicode", self.pythonV2UnicodeAllowedCheckBox.isChecked() + ) + Preferences.setEditor( + "PythonAllowV3Binary", self.pythonV3BinaryAllowedCheckBox.isChecked() + ) Preferences.setEditor( - "PythonAllowV3Bytes", - self.pythonV3BytesAllowedCheckBox.isChecked()) + "PythonAllowV3Bytes", self.pythonV3BytesAllowedCheckBox.isChecked() + ) Preferences.setEditor( - "PythonFoldQuotes", - self.foldPythonQuotesCheckBox.isChecked()) + "PythonFoldQuotes", self.foldPythonQuotesCheckBox.isChecked() + ) Preferences.setEditor( "PythonStringsOverNewLineAllowed", - self.pythonStringsOverNewlineCheckBox.isChecked()) + self.pythonStringsOverNewlineCheckBox.isChecked(), + ) Preferences.setEditor( "PythonHighlightSubidentifier", - self.pythonHighlightSubidentifierCheckBox.isChecked()) - + self.pythonHighlightSubidentifierCheckBox.isChecked(), + ) + # Ruby Preferences.setEditor( - "RubyFoldComment", - self.foldRubyCommentCheckBox.isChecked()) - + "RubyFoldComment", self.foldRubyCommentCheckBox.isChecked() + ) + # SQL - Preferences.setEditor( - "SqlFoldComment", - self.foldSqlCommentCheckBox.isChecked()) + Preferences.setEditor("SqlFoldComment", self.foldSqlCommentCheckBox.isChecked()) Preferences.setEditor( - "SqlBackslashEscapes", - self.sqlBackslashEscapesCheckBox.isChecked()) - Preferences.setEditor( - "SqlFoldAtElse", - self.sqlFoldAtElseCheckBox.isChecked()) + "SqlBackslashEscapes", self.sqlBackslashEscapesCheckBox.isChecked() + ) + Preferences.setEditor("SqlFoldAtElse", self.sqlFoldAtElseCheckBox.isChecked()) Preferences.setEditor( - "SqlFoldOnlyBegin", - self.sqlFoldOnlyBeginCheckBox.isChecked()) - Preferences.setEditor( - "SqlDottedWords", - self.sqlDottedWordsCheckBox.isChecked()) + "SqlFoldOnlyBegin", self.sqlFoldOnlyBeginCheckBox.isChecked() + ) + Preferences.setEditor("SqlDottedWords", self.sqlDottedWordsCheckBox.isChecked()) Preferences.setEditor( - "SqlHashComments", - self.sqlHashCommentsCheckBox.isChecked()) - Preferences.setEditor( - "SqlQuotedIdentifiers", - self.sqlQuotedIdentifiersCheckBox.isChecked()) - - # TCL + "SqlHashComments", self.sqlHashCommentsCheckBox.isChecked() + ) Preferences.setEditor( - "TclFoldComment", - self.foldTclCommentCheckBox.isChecked()) - + "SqlQuotedIdentifiers", self.sqlQuotedIdentifiersCheckBox.isChecked() + ) + + # TCL + Preferences.setEditor("TclFoldComment", self.foldTclCommentCheckBox.isChecked()) + # TeX + Preferences.setEditor("TexFoldComment", self.foldTexCommentCheckBox.isChecked()) Preferences.setEditor( - "TexFoldComment", - self.foldTexCommentCheckBox.isChecked()) - Preferences.setEditor( - "TexProcessComments", - self.texProcessCommentsCheckBox.isChecked()) - Preferences.setEditor( - "TexProcessIf", - self.texProcessIfCheckBox.isChecked()) - + "TexProcessComments", self.texProcessCommentsCheckBox.isChecked() + ) + Preferences.setEditor("TexProcessIf", self.texProcessIfCheckBox.isChecked()) + # VHDL Preferences.setEditor( - "VHDLFoldComment", - self.vhdlFoldCommentCheckBox.isChecked()) - Preferences.setEditor( - "VHDLFoldAtElse", - self.vhdlFoldAtElseCheckBox.isChecked()) + "VHDLFoldComment", self.vhdlFoldCommentCheckBox.isChecked() + ) + Preferences.setEditor("VHDLFoldAtElse", self.vhdlFoldAtElseCheckBox.isChecked()) Preferences.setEditor( - "VHDLFoldAtBegin", - self.vhdlFoldAtBeginCheckBox.isChecked()) + "VHDLFoldAtBegin", self.vhdlFoldAtBeginCheckBox.isChecked() + ) Preferences.setEditor( - "VHDLFoldAtParenthesis", - self.vhdlFoldAtParenthesisCheckBox.isChecked()) - + "VHDLFoldAtParenthesis", self.vhdlFoldAtParenthesisCheckBox.isChecked() + ) + # XML Preferences.setEditor( - "XMLStyleScripts", - self.xmlSyleScriptsCheckBox.isChecked()) - + "XMLStyleScripts", self.xmlSyleScriptsCheckBox.isChecked() + ) + # YAML Preferences.setEditor( - "YAMLFoldComment", - self.foldYamlCommentCheckBox.isChecked()) + "YAMLFoldComment", self.foldYamlCommentCheckBox.isChecked() + ) def create(dlg): """ Module function to create the configuration page. - + @param dlg reference to the configuration dialog @return reference to the instantiated page (ConfigurationPageBase) """