@@ -23,7 +23,6 @@ import com.intellij.openapi.ui.ValidationInfo
23
23
import com.intellij.openapi.wm.IdeFocusManager
24
24
import com.intellij.openapi.wm.impl.InternalDecorator
25
25
import com.intellij.temporary.gui.block.AutoDevCoolBorder
26
- import com.intellij.ui.CollectionComboBoxModel
27
26
import com.intellij.ui.JBColor
28
27
import com.intellij.ui.MutableCollectionComboBoxModel
29
28
import com.intellij.ui.SimpleListCellRenderer
@@ -55,7 +54,7 @@ class AutoDevInputSection(private val project: Project, val disposable: Disposab
55
54
private val documentListener: DocumentListener
56
55
private val buttonPresentation: Presentation
57
56
private val button: ActionButton
58
- private val customRag: ComboBox <CustomRagApp >
57
+ private var customRag: ComboBox <CustomRagApp > = ComboBox ( MutableCollectionComboBoxModel ( listOf ()))
59
58
private val logger = logger<AutoDevInputSection >()
60
59
61
60
val editorListeners: EventDispatcher <AutoDevInputListener > =
@@ -116,14 +115,18 @@ class AutoDevInputSection(private val project: Project, val disposable: Disposab
116
115
JBColor (3684930 , 3750720 )
117
116
)
118
117
layoutPanel.setOpaque(false )
119
- customRag = ComboBox (MutableCollectionComboBoxModel (loadRagApps()))
120
- customRag.setRenderer(SimpleListCellRenderer .create { label: JBLabel , value: CustomRagApp ? , _: Int ->
121
- if (value != null ) {
122
- label.text = value.name
123
- }
124
- })
125
118
126
- layoutPanel.addToLeft(customRag)
119
+ if (project.customRagSettings.enableCustomRag) {
120
+ customRag = ComboBox (MutableCollectionComboBoxModel (loadRagApps()))
121
+ customRag.setRenderer(SimpleListCellRenderer .create { label: JBLabel , value: CustomRagApp ? , _: Int ->
122
+ if (value != null ) {
123
+ label.text = value.name
124
+ }
125
+ })
126
+
127
+ layoutPanel.addToLeft(customRag)
128
+ }
129
+
127
130
layoutPanel.addToCenter(horizontalGlue)
128
131
layoutPanel.addToRight(button)
129
132
addToBottom(layoutPanel)
0 commit comments