@@ -2,9 +2,9 @@ package no.spk.fiskeoye.plugin.ui
22
33import com.intellij.collaboration.ui.CollaborationToolsUIUtil.defaultButton
44import com.intellij.openapi.actionSystem.ActionGroup
5+ import com.intellij.openapi.actionSystem.ActionManager
56import com.intellij.openapi.actionSystem.ActionToolbar
67import com.intellij.openapi.actionSystem.DefaultActionGroup
7- import com.intellij.openapi.actionSystem.impl.ActionToolbarImpl
88import com.intellij.openapi.project.DumbAware
99import com.intellij.openapi.ui.JBMenuItem
1010import com.intellij.openapi.ui.JBPopupMenu
@@ -38,17 +38,10 @@ import javax.swing.JToggleButton
3838import javax.swing.ListSelectionModel
3939import javax.swing.event.PopupMenuEvent
4040
41- @Suppress(" UnstableApiUsage" )
4241internal abstract class FiskeoyePanel : SimpleToolWindowPanel (true , true ), DumbAware {
4342
4443 protected fun buildToolbar (place : String , actionGroup : ActionGroup , horizontal : Boolean = false): ActionToolbar {
45- return ActionToolbarImpl (
46- place,
47- actionGroup,
48- horizontal
49- ).apply {
50- layoutPolicy = ActionToolbar .AUTO_LAYOUT_POLICY
51- adjustTheSameSize(true )
44+ return ActionManager .getInstance().createActionToolbar(place, actionGroup, horizontal).apply {
5245 setShowSeparatorTitles(true )
5346 }
5447 }
@@ -168,10 +161,11 @@ internal abstract class FiskeoyePanel : SimpleToolWindowPanel(true, true), DumbA
168161 }
169162 }
170163
164+ @Suppress(" UnstableApiUsage" )
171165 protected fun buildSeachButton (fiskeoyeActionListener : FiskeoyeActionListener ): JButton {
172166 return JButton ().apply {
173- text = " Search"
174167 defaultButton()
168+ text = " Search"
175169 addActionListener(fiskeoyeActionListener)
176170 addKeyListener(fiskeoyeActionListener)
177171 }
0 commit comments