Revert "IDEA-353465 Don't show the Build Script Found notification for the just unlinked project"

This reverts commit f747ef4607dc0f3adfe7ee5a56f8c2015974be5a.

GitOrigin-RevId: 324a2bd439ff85fd6ec05f4fa4835d48f6c42ecb
This commit is contained in:
Sergei Vorobyov
2024-09-11 18:36:42 +02:00
committed by intellij-monorepo-bot
parent 166efbd6f0
commit 8015d49ada
4 changed files with 0 additions and 13 deletions

View File

@@ -170,7 +170,6 @@ com.intellij.openapi.externalSystem.autolink.ExternalSystemUnlinkedProjectAware
- linkAndLoadProject(com.intellij.openapi.project.Project,java.lang.String):V
- linkAndLoadProjectAsync(com.intellij.openapi.project.Project,java.lang.String,kotlin.coroutines.Continuation):java.lang.Object
- bs:linkAndLoadProjectAsync$suspendImpl(com.intellij.openapi.externalSystem.autolink.ExternalSystemUnlinkedProjectAware,com.intellij.openapi.project.Project,java.lang.String,kotlin.coroutines.Continuation):java.lang.Object
- notificationShouldBeShown(com.intellij.openapi.project.Project):Z
- a:subscribe(com.intellij.openapi.project.Project,com.intellij.openapi.externalSystem.autolink.ExternalSystemProjectLinkListener,com.intellij.openapi.Disposable):V
- unlinkProject(com.intellij.openapi.project.Project,java.lang.String,kotlin.coroutines.Continuation):java.lang.Object
- bs:unlinkProject$suspendImpl(com.intellij.openapi.externalSystem.autolink.ExternalSystemUnlinkedProjectAware,com.intellij.openapi.project.Project,java.lang.String,kotlin.coroutines.Continuation):java.lang.Object

View File

@@ -6,7 +6,6 @@ import com.intellij.openapi.application.EDT
import com.intellij.openapi.diagnostic.logger
import com.intellij.openapi.extensions.ExtensionPointName
import com.intellij.openapi.externalSystem.model.ProjectSystemId
import com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.getManager
import com.intellij.openapi.progress.blockingContext
import com.intellij.openapi.project.Project
import com.intellij.openapi.vfs.VirtualFile
@@ -44,11 +43,6 @@ interface ExternalSystemUnlinkedProjectAware {
fun subscribe(project: Project, listener: ExternalSystemProjectLinkListener, parentDisposable: Disposable)
fun notificationShouldBeShown(project: Project): Boolean {
val manager = getManager(systemId) ?: return true
return manager.getSettingsProvider().`fun`(project).linkedProjectsSettings.isEmpty()
}
companion object {
val EP_NAME: ExtensionPointName<ExternalSystemUnlinkedProjectAware> = ExtensionPointName.create<ExternalSystemUnlinkedProjectAware>("com.intellij.externalSystemUnlinkedProjectAware")

View File

@@ -214,8 +214,6 @@ class UnlinkedProjectStartupActivity : ProjectActivity {
extension: ExternalSystemUnlinkedProjectAware
) {
blockingContext {
if (!extension.notificationShouldBeShown(project))
return@blockingContext
val extensionDisposable = EP_NAME.createExtensionDisposable(extension, project)
UnlinkedProjectNotificationAware.getInstance(project)
.notificationNotify(extension.createProjectId(externalProjectPath)) {

View File

@@ -32,10 +32,6 @@ internal class MavenUnlinkedProjectAware : ExternalSystemUnlinkedProjectAware {
mavenProjectsManager.addProjectsTreeListener(ProjectsTreeListener(project, listener), parentDisposable)
}
override fun notificationShouldBeShown(project: Project): Boolean {
return MavenProjectsManager.getInstance(project).projects.isEmpty()
}
override suspend fun linkAndLoadProjectAsync(project: Project, externalProjectPath: String) {
MavenOpenProjectProvider().linkToExistingProjectAsync(externalProjectPath, project)
}