Skip to content

Commit 3b86a7c

Browse files
committed
feat: add open settings action
1 parent fded8b0 commit 3b86a7c

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.github.xepozz.git_churn.actions
2+
3+
import com.github.xepozz.git_churn.config.GitChurnConfigurable
4+
import com.intellij.openapi.actionSystem.AnAction
5+
import com.intellij.openapi.actionSystem.AnActionEvent
6+
import com.intellij.openapi.options.ShowSettingsUtil
7+
8+
class OpenSettingsAction: AnAction() {
9+
override fun actionPerformed(e: AnActionEvent) {
10+
ShowSettingsUtil.getInstance().showSettingsDialog(e.project, GitChurnConfigurable::class.java)
11+
}
12+
}

src/main/resources/META-INF/plugin.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
<action id="ProjectView.GitChurn.DurationFullAction"
6161
class="com.github.xepozz.git_churn.actions.DurationFullAction">
6262
</action>
63+
<separator/>
64+
<action id="ProjectView.GitChurn.OpenSettingsAction"
65+
class="com.github.xepozz.git_churn.actions.OpenSettingsAction">
66+
</action>
6367

6468
<add-to-group
6569
group-id="ProjectView.ToolWindow.SecondaryActions"

src/main/resources/messages/GitChurnBundle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ action.ProjectView.GitChurn.Duration1YearAction.description=Parses history for 1
1818
action.ProjectView.GitChurn.DurationFullAction.text=Full History
1919
action.ProjectView.GitChurn.DurationFullAction.description=Parses history from the beginning
2020

21+
action.ProjectView.GitChurn.OpenSettingsAction.text=Settings
22+
action.ProjectView.GitChurn.OpenSettingsAction.description=Open settings page
23+
2124
action.ProjectView.GitChurn.ColoringAction.text=Colors
2225
action.ProjectView.GitChurn.ColoringAction.description=Highlight files in the Project View based on churn
2326

0 commit comments

Comments
 (0)