mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[migration to Kotlin LV 2.3] Update Kotlin code w.r.t. KTLC-284 (3)
(migrations to Kotlin-only code) GitOrigin-RevId: 0b334908531567a73883727e3ed6d2c1480d5be9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b70d71a1f7
commit
7ffd7f80cd
+6
-5
@@ -38,8 +38,9 @@ fun printCodeCompletionItems(items: List<PolySymbolCodeCompletionItem>,
|
||||
|
||||
fun printMatches(matches: List<PolySymbol>, printer: DebugOutputPrinter = PolySymbolsDebugOutputPrinter()): String =
|
||||
printer.printValue(
|
||||
matches
|
||||
.sortedWith(Comparator
|
||||
.comparing<PolySymbol, PolySymbol.Priority?> { it.priority ?: PolySymbol.Priority.NORMAL }
|
||||
.thenComparing(Function { it.name })
|
||||
.thenComparing(Function { it.origin.library ?: "" })))
|
||||
matches.sortedWith(
|
||||
compareBy<PolySymbol> { it.priority ?: PolySymbol.Priority.NORMAL }
|
||||
.thenBy { it.name }
|
||||
.thenBy { it.origin.library ?: "" }
|
||||
)
|
||||
)
|
||||
@@ -10,7 +10,6 @@ import com.intellij.openapi.roots.ProjectRootManager
|
||||
import com.intellij.openapi.util.Comparing
|
||||
import com.intellij.openapi.util.Key
|
||||
import com.intellij.openapi.util.NlsSafe
|
||||
import com.intellij.openapi.util.Pair
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import com.intellij.openapi.util.text.StringUtil
|
||||
import com.intellij.openapi.vfs.LocalFileSystem
|
||||
@@ -314,7 +313,7 @@ object MavenDomUtil {
|
||||
}
|
||||
}
|
||||
|
||||
return Pair.create<String?, Int?>(tagName, index)
|
||||
return tagName to index
|
||||
}
|
||||
|
||||
private fun getIndexedTag(parent: XmlTag, index: Int?): XmlTag? {
|
||||
@@ -367,7 +366,7 @@ object MavenDomUtil {
|
||||
set = mutableSetOf<VirtualFile?>()
|
||||
}
|
||||
|
||||
cachedValue = Pair.create<Long?, MutableSet<VirtualFile?>?>(VirtualFileManager.getInstance().getModificationCount(), set)
|
||||
cachedValue = VirtualFileManager.getInstance().getModificationCount() to set
|
||||
mavenProject.putCachedValue<Pair<Long?, MutableSet<VirtualFile?>?>?>(FILTERED_RESOURCES_ROOTS_KEY, cachedValue)
|
||||
}
|
||||
|
||||
|
||||
@@ -908,7 +908,7 @@ object MavenUtil {
|
||||
|
||||
|
||||
if (list.size > 1) {
|
||||
list.sortWith(Comparator.comparing<Path?, String?>(java.util.function.Function { obj: Path? -> obj.toString() }))
|
||||
list.sortBy { obj: Path? -> obj.toString() }
|
||||
}
|
||||
|
||||
val file = brewDir?.resolve(list.get(0).toString() + "/libexec")
|
||||
|
||||
@@ -117,7 +117,7 @@ class PythonUpdater {
|
||||
|
||||
fun getLangLevelReleases(languageLevel: LanguageLevel): Map<String, List<TrackedResource>> {
|
||||
val remoteVersionsSortedDesc = remoteVersions[languageLevel]!!
|
||||
.sortedWith(Comparator.comparing<String?, Version?> { Version.parseVersion(it) }.reversed())
|
||||
.sortedWith(compareByDescending { Version.parseVersion(it) })
|
||||
|
||||
val resolvedResources = mutableMapOf<TrackedResource, String>()
|
||||
for (version in remoteVersionsSortedDesc) {
|
||||
|
||||
Reference in New Issue
Block a user