File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
plugin/src/main/kotlin/spp/jetbrains/sourcemarker/config Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 17
17
package spp.jetbrains.sourcemarker.config
18
18
19
19
import com.intellij.ide.util.PropertiesComponent
20
+ import com.intellij.openapi.application.ApplicationManager
20
21
import com.intellij.openapi.options.Configurable
21
22
import com.intellij.openapi.project.DumbService
22
23
import com.intellij.openapi.project.Project
@@ -55,16 +56,16 @@ class SourceMarkerConfigurable(val project: Project) : Configurable {
55
56
}
56
57
}
57
58
58
- override fun createComponent (): JComponent {
59
- if (form == null ) {
59
+ override fun createComponent (): JComponent ? {
60
+ if (form == null && ! ApplicationManager .getApplication().isHeadlessEnvironment ) {
60
61
val config = SourceMarkerPlugin .getInstance(project).getConfig()
61
62
val availServices = safeRunBlocking {
62
63
UserData .liveManagementService(project).getServices().await()
63
64
}
64
65
form = PluginConfigurationPanel (config, availServices)
65
66
form!! .applySourceMarkerConfig(config)
66
67
}
67
- return form!! .contentPane as JComponent
68
+ return form? .contentPane
68
69
}
69
70
70
71
override fun disposeUIResources () {
You can’t perform that action at this time.
0 commit comments