6 """ |
6 """ |
7 Module implementing the Rope Autocompletion configuration page. |
7 Module implementing the Rope Autocompletion configuration page. |
8 """ |
8 """ |
9 |
9 |
10 from __future__ import unicode_literals |
10 from __future__ import unicode_literals |
|
11 |
|
12 from PyQt5.QtCore import pyqtSlot |
11 |
13 |
12 from Preferences.ConfigurationPages.ConfigurationPageBase import \ |
14 from Preferences.ConfigurationPages.ConfigurationPageBase import \ |
13 ConfigurationPageBase |
15 ConfigurationPageBase |
14 from .Ui_AutoCompletionRopePage import Ui_AutoCompletionRopePage |
16 from .Ui_AutoCompletionRopePage import Ui_AutoCompletionRopePage |
15 |
17 |
43 """ |
45 """ |
44 self.__plugin.setPreferences( |
46 self.__plugin.setPreferences( |
45 "CodeAssistEnabled", self.ropeAutocompletionCheckBox.isChecked()) |
47 "CodeAssistEnabled", self.ropeAutocompletionCheckBox.isChecked()) |
46 self.__plugin.setPreferences( |
48 self.__plugin.setPreferences( |
47 "MaxFixes", self.acMaxfixesSpinBox.value()) |
49 "MaxFixes", self.acMaxfixesSpinBox.value()) |
|
50 |
|
51 def polishPage(self): |
|
52 """ |
|
53 Public slot to perform some polishing actions. |
|
54 """ |
|
55 names = self.__plugin.getCodeAssistServer().connectionNames() |
|
56 self.python2Button.setEnabled("Python2" in names) |
|
57 self.python3Button.setEnabled("Python3" in names) |
|
58 |
|
59 @pyqtSlot() |
|
60 def on_python2Button_clicked(self): |
|
61 """ |
|
62 Private slot to edit the rope configuration for Python 2. |
|
63 """ |
|
64 self.__plugin.getCodeAssistServer().editConfig("Python2") |
|
65 |
|
66 @pyqtSlot() |
|
67 def on_python3Button_clicked(self): |
|
68 """ |
|
69 Private slot to edit the rope configuration for Python 3. |
|
70 """ |
|
71 self.__plugin.getCodeAssistServer().editConfig("Python3") |