Skip to content

Commit

Permalink
refactor: extract ActionLinkLabel
Browse files Browse the repository at this point in the history
  • Loading branch information
lppedd committed Feb 5, 2020
1 parent 2ab6eb5 commit 1b13944
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.github.lppedd.cc.configuration.component

import com.intellij.ui.components.labels.LinkLabel
import com.intellij.ui.components.labels.LinkListener

/**
* @author Edoardo Luppi
*/
internal class ActionLinkLabel<T>(label: String, listener: LinkListener<T>) : LinkLabel<T>(label, null) {
init {
setListener(listener, null)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.github.lppedd.cc.configuration.holders

import com.github.lppedd.cc.CCBundle
import com.github.lppedd.cc.CCConstants
import com.github.lppedd.cc.configuration.component.ActionLinkLabel
import com.github.lppedd.cc.configuration.component.ComponentHolder
import com.github.lppedd.cc.getResourceAsStream
import com.intellij.openapi.application.runWriteAction
Expand Down Expand Up @@ -57,13 +58,4 @@ internal class DefaultsFileExportHolder : ComponentHolder, LinkListener<Any?> {
exportInfo.text = CCBundle["cc.config.defaults.exportToPath.completed"]
}
}

private class ActionLinkLabel(
label: String,
listener: LinkListener<Any?>
) : LinkLabel<Any?>(label, null) {
init {
setListener(listener, null)
}
}
}

0 comments on commit 1b13944

Please sign in to comment.