src/eric7/Preferences/PreferencesLexer.py

branch
eric7
changeset 9482
a2bc06a54d9d
parent 9473
3f23dbf37dbe
child 9624
b47dfa7a137d
equal deleted inserted replaced
9481:0b936ff1bbb9 9482:a2bc06a54d9d
9 9
10 from PyQt6.Qsci import QsciScintillaBase 10 from PyQt6.Qsci import QsciScintillaBase
11 from PyQt6.QtCore import QCoreApplication, QObject 11 from PyQt6.QtCore import QCoreApplication, QObject
12 12
13 from eric7 import Globals, Preferences 13 from eric7 import Globals, Preferences
14 from eric7.QScintilla import Lexers
14 15
15 16
16 class PreferencesLexerError(Exception): 17 class PreferencesLexerError(Exception):
17 """ 18 """
18 Class defining a special error for the PreferencesLexer class. 19 Class defining a special error for the PreferencesLexer class.
88 self.__defaultFontFamily = "Courier" 89 self.__defaultFontFamily = "Courier"
89 else: 90 else:
90 self.__defaultFontFamily = "Bitstream Vera Sans Mono" 91 self.__defaultFontFamily = "Bitstream Vera Sans Mono"
91 92
92 # instantiate a lexer object for the given language 93 # instantiate a lexer object for the given language
93 from eric7.QScintilla import Lexers
94
95 self.__lex = Lexers.getLexer(language) 94 self.__lex = Lexers.getLexer(language)
96 if self.__lex is None: 95 if self.__lex is None:
97 raise PreferencesLexerLanguageError(language) 96 raise PreferencesLexerLanguageError(language)
98 97
99 # read the last stored values from preferences file 98 # read the last stored values from preferences file

eric ide

mercurial