File tree 3 files changed +6
-9
lines changed
3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 53
53
<postStartupActivity implementation =" limitedwip.autorevert.components.AutoRevertComponentStartup" />
54
54
<postStartupActivity implementation =" limitedwip.tcr.components.TcrComponentStartup" />
55
55
56
- <projectConfigurable instance =" limitedwip.common.settings.LimitedWipConfigurable" />
56
+ <projectConfigurable instance =" limitedwip.common.settings.LimitedWipConfigurable" displayName = " Limited WIP " />
57
57
<projectService serviceImplementation =" limitedwip.common.settings.LimitedWipSettings" />
58
58
<checkinHandlerFactory implementation =" limitedwip.common.vcs.SuccessfulCheckin" />
59
59
<checkinHandlerFactory implementation =" limitedwip.common.vcs.AllowCommit" />
Original file line number Diff line number Diff line change @@ -18,13 +18,11 @@ class LimitedWipConfigurable(val project: Project): SearchableConfigurable {
18
18
settingsForm.applyChanges()
19
19
}
20
20
21
- override fun reset () {
22
- settingsForm.resetChanges()
23
- }
21
+ override fun reset () = settingsForm.resetChanges()
24
22
25
23
override fun isModified () = settingsForm.isModified()
26
24
27
25
override fun getDisplayName () = pluginDisplayName
28
26
29
- override fun getId (): String = pluginId
27
+ override fun getId () = pluginId
30
28
}
Original file line number Diff line number Diff line change @@ -8,17 +8,16 @@ import com.intellij.openapi.vcs.checkin.CheckinHandler
8
8
import com.intellij.openapi.vcs.checkin.CheckinHandlerFactory
9
9
import limitedwip.common.pluginId
10
10
11
- class SuccessfulCheckin : CheckinHandlerFactory () {
11
+ class SuccessfulCheckin : CheckinHandlerFactory () {
12
12
13
- override fun createHandler (panel : CheckinProjectPanel , commitContext : CommitContext ): CheckinHandler {
14
- return object : CheckinHandler () {
13
+ override fun createHandler (panel : CheckinProjectPanel , commitContext : CommitContext ) =
14
+ object : CheckinHandler () {
15
15
override fun checkinSuccessful () {
16
16
val changeList = panel.project.defaultChangeList() ? : return
17
17
val uncommittedFileCount = changeList.changes.size - panel.selectedChanges.size
18
18
notifySettingsListeners(allChangesAreCommitted = uncommittedFileCount == 0 )
19
19
}
20
20
}
21
- }
22
21
23
22
private fun notifySettingsListeners (allChangesAreCommitted : Boolean ) {
24
23
Extensions .getRootArea().getExtensionPoint<Listener >(extensionPointName).extensions.forEach { listener ->
You can’t perform that action at this time.
0 commit comments