Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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