16 from eric7 import Preferences, Utilities |
16 from eric7 import Preferences, Utilities |
17 from eric7.EricWidgets import EricMessageBox |
17 from eric7.EricWidgets import EricMessageBox |
18 from eric7.EricWidgets.EricApplication import ericApp |
18 from eric7.EricWidgets.EricApplication import ericApp |
19 from eric7.EricWidgets.EricListSelectionDialog import EricListSelectionDialog |
19 from eric7.EricWidgets.EricListSelectionDialog import EricListSelectionDialog |
20 from eric7.EricWidgets.EricPathPicker import EricPathPickerModes |
20 from eric7.EricWidgets.EricPathPicker import EricPathPickerModes |
|
21 from eric7.QScintilla import Lexers |
|
22 from eric7.QScintilla.APIsManager import APIsManager |
21 |
23 |
22 from .ConfigurationPageBase import ConfigurationPageBase |
24 from .ConfigurationPageBase import ConfigurationPageBase |
23 from .Ui_EditorAPIsPage import Ui_EditorAPIsPage |
25 from .Ui_EditorAPIsPage import Ui_EditorAPIsPage |
24 |
26 |
25 |
27 |
47 self.__inPreparation = False |
49 self.__inPreparation = False |
48 |
50 |
49 # set initial values |
51 # set initial values |
50 self.pluginManager = ericApp().getObject("PluginManager") |
52 self.pluginManager = ericApp().getObject("PluginManager") |
51 self.apiAutoPrepareCheckBox.setChecked(Preferences.getEditor("AutoPrepareAPIs")) |
53 self.apiAutoPrepareCheckBox.setChecked(Preferences.getEditor("AutoPrepareAPIs")) |
52 |
|
53 from eric7.QScintilla import Lexers |
|
54 |
54 |
55 self.apis = {} |
55 self.apis = {} |
56 apiLanguages = sorted([""] + list(Lexers.getSupportedApiLanguages())) |
56 apiLanguages = sorted([""] + list(Lexers.getSupportedApiLanguages())) |
57 for lang in apiLanguages: |
57 for lang in apiLanguages: |
58 self.apiLanguageComboBox.addItem(Lexers.getLanguageIcon(lang, False), lang) |
58 self.apiLanguageComboBox.addItem(Lexers.getLanguageIcon(lang, False), lang) |
178 )[:] |
178 )[:] |
179 for api in self.apis[key]: |
179 for api in self.apis[key]: |
180 if api: |
180 if api: |
181 self.apiList.addItem(api) |
181 self.apiList.addItem(api) |
182 self.prepareApiButton.setEnabled(self.apiList.count() > 0) |
182 self.prepareApiButton.setEnabled(self.apiList.count() > 0) |
183 |
|
184 from eric7.QScintilla.APIsManager import APIsManager |
|
185 |
183 |
186 self.__currentAPI = APIsManager().getAPIs( |
184 self.__currentAPI = APIsManager().getAPIs( |
187 self.__currentApiLanguage, projectType=self.__currentApiProjectType |
185 self.__currentApiLanguage, projectType=self.__currentApiProjectType |
188 ) |
186 ) |
189 if self.__currentAPI is not None: |
187 if self.__currentAPI is not None: |