@@ -102,21 +102,6 @@ private class LocalState {
102102}
103103
104104class KotlinPluginsConfigurable (private val project : Project ) : Configurable {
105- companion object {
106- @Volatile
107- private var selectArtifactsInitially: Boolean = false
108-
109- fun showArtifacts (project : Project ) {
110- selectArtifactsInitially = true
111- ShowSettingsUtil .getInstance().showSettingsDialog(project, KotlinPluginsConfigurable ::class .java)
112- }
113-
114- fun showGeneral (project : Project ) {
115- selectArtifactsInitially = false
116- ShowSettingsUtil .getInstance().showSettingsDialog(project, KotlinPluginsConfigurable ::class .java)
117- }
118- }
119-
120105 private val local: LocalState = LocalState ()
121106
122107 private lateinit var repoTable: JBTable
@@ -319,9 +304,9 @@ class KotlinPluginsConfigurable(private val project: Project) : Configurable {
319304 val tabs = JBTabbedPane ()
320305 tabs.addTab(" General" , generalContent)
321306 tabs.addTab(" Artifacts" , artifactsContent)
322- if (selectArtifactsInitially) {
307+ if (KotlinPluginsConfigurableUtil . selectArtifactsInitially) {
323308 tabs.selectedIndex = 1
324- selectArtifactsInitially = false
309+ KotlinPluginsConfigurableUtil . selectArtifactsInitially = false
325310 }
326311 rootPanel = JPanel (BorderLayout ()).apply { add(tabs, BorderLayout .NORTH ) }
327312
@@ -829,5 +814,20 @@ private class PluginsDialog(
829814 }
830815}
831816
832- val mavenRegex = " ([\\ w.]+):([\\ w\\ -]+)" .toRegex()
833- val pluginNameRegex = " [a-zA-Z0-9_-]+" .toRegex()
817+ internal val mavenRegex = " ([\\ w.]+):([\\ w\\ -]+)" .toRegex()
818+ internal val pluginNameRegex = " [a-zA-Z0-9_-]+" .toRegex()
819+
820+ internal object KotlinPluginsConfigurableUtil {
821+ @Volatile
822+ var selectArtifactsInitially: Boolean = false
823+
824+ fun showArtifacts (project : Project ) {
825+ selectArtifactsInitially = true
826+ ShowSettingsUtil .getInstance().showSettingsDialog(project, KotlinPluginsConfigurable ::class .java)
827+ }
828+
829+ fun showGeneral (project : Project ) {
830+ selectArtifactsInitially = false
831+ ShowSettingsUtil .getInstance().showSettingsDialog(project, KotlinPluginsConfigurable ::class .java)
832+ }
833+ }
0 commit comments