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 |