14
14
import com .intellij .openapi .actionSystem .AnAction ;
15
15
import com .intellij .openapi .actionSystem .AnActionEvent ;
16
16
import com .intellij .openapi .actionSystem .DefaultActionGroup ;
17
- import com .intellij .openapi .actionSystem .impl .ActionToolbarImpl ;
17
+ import com .intellij .openapi .actionSystem .ActionManager ;
18
+ import com .intellij .openapi .actionSystem .ActionToolbar ;
19
+ import com .intellij .openapi .actionSystem .ActionPlaces ;
18
20
import com .intellij .openapi .application .ApplicationManager ;
19
21
import com .intellij .openapi .project .Project ;
20
22
import com .intellij .openapi .ui .ComboBox ;
@@ -100,9 +102,9 @@ public void actionPerformed(@NotNull AnActionEvent e) {
100
102
}
101
103
});
102
104
103
- ActionToolbarImpl chatPanel = new ActionToolbarImpl ("Chat Actions Toolbar" , chatActions , true );
105
+ ActionToolbar chatPanel = ActionManager . getInstance (). createActionToolbar ("Chat Actions Toolbar" , chatActions , true );
104
106
chatPanel .setTargetComponent (this );
105
- panel .add (chatPanel , BorderLayout .EAST );
107
+ panel .add (chatPanel . getComponent () , BorderLayout .EAST );
106
108
mainPanel .add (panel , BorderLayout .NORTH );
107
109
108
110
myList .setOpaque (true );
@@ -237,7 +239,7 @@ public boolean displayTextInToolbar() {
237
239
}
238
240
});
239
241
240
- ActionToolbarImpl actonPanel = new ActionToolbarImpl ("System Role Toolbar" , toolbarActions , true );
242
+ ActionToolbar actonPanel = ActionManager . getInstance (). createActionToolbar ("System Role Toolbar" , toolbarActions , true );
241
243
actonPanel .setTargetComponent (this );
242
244
panel .add (orgPanel );
243
245
panel .setBorder (JBUI .Borders .empty (0 , 8 , 10 , 8 ));
@@ -250,7 +252,7 @@ public boolean displayTextInToolbar() {
250
252
panel .add (enableTelemetry );
251
253
252
254
JPanel bottomPanel = new JPanel (new BorderLayout ());
253
- bottomPanel .add (actonPanel , BorderLayout .EAST );
255
+ bottomPanel .add (actonPanel . getComponent () , BorderLayout .EAST );
254
256
panel .add (bottomPanel );
255
257
256
258
return panel ;
0 commit comments