Skip to content

Commit

Permalink
Supporting IC-223 by having a single-arg constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Kantis committed Jun 22, 2024
1 parent eb84e19 commit c27818b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package io.kotest.plugin.intellij.toolwindow

import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.application.EDT
import com.intellij.openapi.application.runReadAction
import com.intellij.openapi.components.Service
import com.intellij.openapi.module.ModuleUtilCore
import com.intellij.openapi.project.DumbService
Expand All @@ -25,14 +24,17 @@ import org.jetbrains.kotlin.psi.KtProperty
import javax.swing.tree.DefaultMutableTreeNode
import javax.swing.tree.DefaultTreeModel
import javax.swing.tree.TreeModel
import kotlin.properties.Delegates
import kotlin.properties.Delegates.observable

@Service(Service.Level.PROJECT)
class KotestService(
private val project: Project,
private val scope: CoroutineScope,
) {

@Suppress("unused") // Will be used on IC-223
constructor(project: Project) : this(project, CoroutineScope(Dispatchers.Default))

var showCallbacks by observable(true) { _, _, _ -> reloadModelInBackgroundThread() }
var showTags by observable(true) { _, _, _ -> reloadModelInBackgroundThread() }
var showModules by observable(true) { _, _, _ -> reloadModelInBackgroundThread() }
Expand Down

0 comments on commit c27818b

Please sign in to comment.