Skip to content

Vassiliy kudryashov/693 deprecated api usages in the plugin should be replaced with stable api calls #982

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,8 @@ abstract class UrlNotifier : Notifier() {
protected abstract val urlOpeningListener: NotificationListener

override fun notify(info: String, project: Project?, module: Module?) {
notificationGroup
.createNotification(
titleText,
content(project, module, info),
notificationType,
urlOpeningListener,
).notify(project)
notificationGroup.createNotification(content(project, module, info), notificationType)
.setTitle(titleText).setListener(urlOpeningListener).notify(project)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import com.intellij.openapi.module.Module
import com.intellij.openapi.module.ModuleManager
import com.intellij.openapi.module.ModuleUtilCore
import com.intellij.openapi.project.Project
import com.intellij.openapi.project.guessModuleDir
import com.intellij.openapi.projectRoots.JavaSdk
import com.intellij.openapi.projectRoots.JavaSdkVersion
import com.intellij.openapi.projectRoots.Sdk
Expand Down Expand Up @@ -165,8 +166,8 @@ fun Module.addDedicatedTestRoot(testSourceRoots: MutableList<VirtualFile>): Virt
val moduleInstance = ModuleRootManager.getInstance(this)
val testFolder = moduleInstance.contentEntries.flatMap { it.sourceFolders.toList() }
.firstOrNull { it.rootType in testSourceRootTypes }
(testFolder?.let { testFolder.file?.parent } ?: (testFolder?.contentEntry
?: moduleInstance.contentEntries.first()).file ?: moduleFile)?.let {
(testFolder?.let { testFolder.file?.parent }
?: testFolder?.contentEntry?.file ?: this.guessModuleDir())?.let {
val file = FakeVirtualFile(it, dedicatedTestSourceRootName)
testSourceRoots.add(file)
// We return "true" IFF it's case of not yet created fake directory
Expand Down