mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
[collab] Remove and replace classAsCoroutineName
It's basically unused and deprecated since CoroutineName is no longer used. We practically always make a child scope with the class name. Better to just use the class name in this case. (cherry picked from commit 4827600b509f0ca804f5be1d05b35b11f8df470f) (cherry picked from commit eb889a9e6dd0733a86664125feba158234b5267a) IJ-CR-148445 GitOrigin-RevId: 5cf31226299b6ddad30f919b4ddeb36c8ae947aa
This commit is contained in:
committed by
intellij-monorepo-bot
parent
efbebbef0b
commit
5c813fffb1
@@ -20,10 +20,6 @@ import org.jetbrains.annotations.ApiStatus
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
import kotlin.coroutines.EmptyCoroutineContext
|
||||
|
||||
|
||||
inline fun <reified T> T.classAsCoroutineName() = CoroutineName(T::class.java.name)
|
||||
inline fun <reified T> classAsCoroutineName() = CoroutineName(T::class.java.name)
|
||||
|
||||
/**
|
||||
* Prefer creating a service to supply a parent scope
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.plugins.github.pullrequest
|
||||
|
||||
import com.intellij.collaboration.async.classAsCoroutineName
|
||||
import com.intellij.collaboration.util.serviceGet
|
||||
import com.intellij.openapi.components.Service
|
||||
import com.intellij.openapi.components.service
|
||||
@@ -26,7 +25,7 @@ import org.jetbrains.plugins.github.util.GHHostedRepositoriesManager
|
||||
@Service(Service.Level.PROJECT)
|
||||
internal class GHRepositoryConnectionManager(project: Project, parentCs: CoroutineScope) :
|
||||
SingleHostedGitRepositoryConnectionManager<GHGitRepositoryMapping, GithubAccount, GHRepositoryConnection> {
|
||||
private val cs = parentCs.childScope(this.classAsCoroutineName().name)
|
||||
private val cs = parentCs.childScope(javaClass.name)
|
||||
|
||||
private val dataContextRepository = project.serviceGet<GHPRDataContextRepository>()
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.plugins.github.pullrequest.data.provider
|
||||
|
||||
import com.intellij.collaboration.async.classAsCoroutineName
|
||||
import com.intellij.collaboration.util.CollectionDelta
|
||||
import com.intellij.platform.util.coroutines.childScope
|
||||
import com.intellij.util.messages.MessageBus
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.plugins.github.pullrequest.ui.comment
|
||||
|
||||
import com.intellij.collaboration.async.classAsCoroutineName
|
||||
import com.intellij.collaboration.async.combineStateIn
|
||||
import com.intellij.collaboration.async.mapDataToModel
|
||||
import com.intellij.collaboration.async.mapState
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.plugins.github.pullrequest.ui.comment
|
||||
|
||||
import com.intellij.collaboration.async.classAsCoroutineName
|
||||
import com.intellij.collaboration.async.mapDataToModel
|
||||
import com.intellij.collaboration.async.transformConsecutiveSuccesses
|
||||
import com.intellij.collaboration.util.getOrNull
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.plugins.github.pullrequest.ui.diff
|
||||
|
||||
import com.intellij.collaboration.async.classAsCoroutineName
|
||||
import com.intellij.collaboration.async.stateInNow
|
||||
import com.intellij.collaboration.ui.codereview.diff.DiffLineLocation
|
||||
import com.intellij.platform.util.coroutines.childScope
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.plugins.github.pullrequest.ui.editor
|
||||
|
||||
import com.intellij.collaboration.async.classAsCoroutineName
|
||||
import com.intellij.collaboration.async.stateInNow
|
||||
import com.intellij.platform.util.coroutines.childScope
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.plugins.github.pullrequest.ui.review
|
||||
|
||||
import com.intellij.collaboration.async.classAsCoroutineName
|
||||
import com.intellij.collaboration.async.stateInNow
|
||||
import com.intellij.collaboration.util.ComputedResult
|
||||
import com.intellij.platform.util.coroutines.childScope
|
||||
|
||||
@@ -118,7 +118,7 @@ internal class GHPRCreateViewModelImpl(
|
||||
private val dataContext: GHPRDataContext,
|
||||
private val projectVm: GHPRToolWindowProjectViewModel,
|
||||
) : GHPRCreateViewModel, Disposable {
|
||||
private val cs = parentCs.childScope(classAsCoroutineName())
|
||||
private val cs = parentCs.childScope(javaClass.name)
|
||||
override val avatarIconsProvider: GHAvatarIconsProvider = dataContext.avatarIconsProvider
|
||||
private val repoData = dataContext.repositoryDataService
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class GHPRInfoViewModel internal constructor(
|
||||
private val dataContext: GHPRDataContext,
|
||||
private val dataProvider: GHPRDataProvider
|
||||
) : GHPRDetailsLoadingViewModel {
|
||||
private val cs = parentCs.childScope()
|
||||
private val cs = parentCs.childScope(javaClass.name)
|
||||
|
||||
val pullRequest: GHPRIdentifier = dataProvider.id
|
||||
var pullRequestUrl: String? = null
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.plugins.gitlab.mergerequest.ui.diff
|
||||
|
||||
import com.intellij.collaboration.async.classAsCoroutineName
|
||||
import com.intellij.collaboration.async.stateInNow
|
||||
import com.intellij.collaboration.ui.codereview.diff.DiffLineLocation
|
||||
import com.intellij.collaboration.ui.codereview.diff.DiscussionsViewOption
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.plugins.gitlab.ui.comment
|
||||
|
||||
import com.intellij.collaboration.async.classAsCoroutineName
|
||||
import com.intellij.collaboration.async.mapStateInNow
|
||||
import com.intellij.collaboration.async.stateInNow
|
||||
import com.intellij.openapi.project.Project
|
||||
|
||||
Reference in New Issue
Block a user