Skip to content

Commit

Permalink
chore: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
gmyasoedov committed Dec 13, 2024
1 parent 0b8dfec commit 3189232
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 380 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import ru.rzn.gmyasoedov.gmaven.extensionpoints.plugin.CompilerData
import ru.rzn.gmyasoedov.gmaven.extensionpoints.plugin.MavenFullImportPlugin
import ru.rzn.gmyasoedov.gmaven.project.externalSystem.model.SourceSetData
import ru.rzn.gmyasoedov.gmaven.project.policy.ReadProjectResolverPolicy
import ru.rzn.gmyasoedov.gmaven.server.GServerRemoteProcessSupport
import ru.rzn.gmyasoedov.gmaven.server.GServerRequest
import ru.rzn.gmyasoedov.gmaven.server.getProjectModel
import ru.rzn.gmyasoedov.gmaven.settings.MavenExecutionSettings
Expand All @@ -40,7 +39,7 @@ import kotlin.io.path.absolutePathString

class MavenProjectResolver : ExternalSystemProjectResolver<MavenExecutionSettings> {

private val cancellationMap = ConcurrentHashMap<ExternalSystemTaskId, Any>()
private val cancellationMap = ConcurrentHashMap<ExternalSystemTaskId, OSProcessHandler>()

override fun cancelTask(id: ExternalSystemTaskId, listener: ExternalSystemTaskNotificationListener): Boolean {
cancelTask(id, cancellationMap)
Expand Down Expand Up @@ -187,11 +186,8 @@ class MavenProjectResolver : ExternalSystemProjectResolver<MavenExecutionSetting
class CompilerDataHolder(val plugin: MavenPlugin, val compilerData: CompilerData)

companion object {
fun cancelTask(id: ExternalSystemTaskId, cancellationMap: ConcurrentHashMap<ExternalSystemTaskId, Any>) {
when (val remove = cancellationMap.remove(id)) {
is GServerRemoteProcessSupport -> remove.stopAll()
is OSProcessHandler -> remove.destroyProcess()
}
fun cancelTask(id: ExternalSystemTaskId, cancellationMap: MutableMap<ExternalSystemTaskId, OSProcessHandler>) {
cancellationMap.remove(id)?.destroyProcess()
}
}
}
Loading

0 comments on commit 3189232

Please sign in to comment.