Skip to content

Commit b689e3d

Browse files
authored
Fix typo (#31)
* Fix typo * Add Prerequisites section to README.md * Remove internal api * Adding check for input is empty
1 parent 3233395 commit b689e3d

3 files changed

Lines changed: 10 additions & 11 deletions

File tree

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
[![Build](https://github.com/statens-pensjonskasse/fiskeoye-plugin/actions/workflows/build.yml/badge.svg)](https://github.com/statens-pensjonskasse/fiskeoye-plugin/actions/workflows/build.yml)
44

55
<!-- Plugin description -->
6-
Simple intellij plugin that wraps the features found in fiskeoye. The plugin was developed as part of skipit at Statens Pensjonskasse.
6+
Simple intellij plugin that wraps the features found in fiskeoye. The plugin was developed as part of Ship-It at Statens Pensjonskasse.
77
<!-- Plugin description end -->
88

9+
## Prerequisites
10+
11+
IntelliJ Platform version 2023.3 or above.
12+
913
## Build
1014

1115
Clone the project

src/main/kotlin/no/spk/fiskeoye/plugin/listeners/button/FilenameSearchListener.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ internal class FilenameSearchListener(private val filenamePanel: FilenamePanel)
2626
val searchText = filenamePanel.includeField.text.trim()
2727

2828
if (!isValidSearchText(searchText)) {
29+
if (searchText.isEmpty()) return
2930
filenamePanel.mainTable.addMessage(getInvalidString())
3031
return
3132
}

src/main/kotlin/no/spk/fiskeoye/plugin/ui/FiskeoyePanel.kt

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ package no.spk.fiskeoye.plugin.ui
22

33
import com.intellij.collaboration.ui.CollaborationToolsUIUtil.defaultButton
44
import com.intellij.openapi.actionSystem.ActionGroup
5+
import com.intellij.openapi.actionSystem.ActionManager
56
import com.intellij.openapi.actionSystem.ActionToolbar
67
import com.intellij.openapi.actionSystem.DefaultActionGroup
7-
import com.intellij.openapi.actionSystem.impl.ActionToolbarImpl
88
import com.intellij.openapi.project.DumbAware
99
import com.intellij.openapi.ui.JBMenuItem
1010
import com.intellij.openapi.ui.JBPopupMenu
@@ -38,17 +38,10 @@ import javax.swing.JToggleButton
3838
import javax.swing.ListSelectionModel
3939
import javax.swing.event.PopupMenuEvent
4040

41-
@Suppress("UnstableApiUsage")
4241
internal 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

Comments
 (0)