No more record path to file which contains current scope in LookupTracker

Original commit: 673df1f085
This commit is contained in:
Zalim Bashorov
2015-08-18 20:08:22 +03:00
parent d3e29843aa
commit 6ce54f59b8
@@ -66,13 +66,10 @@ abstract class AbstractLookupTrackerTest : AbstractIncrementalJpsTest(
val end = column - 1 val end = column - 1
parts.add(lineContent.subSequence(start, end)) parts.add(lineContent.subSequence(start, end))
val stringifyLookupInfo: LookupInfo.() -> String = { val lookups = lookupsFromColumn.distinct().joinToString(separator = " ", prefix = "/*", postfix = "*/") {
val scopeKindChar = scopeKind.toString()[0].toLowerCase() it.scopeKind.toString()[0].toLowerCase().toString() + ":" + it.scopeFqName
val scopeFileOrEmpty = scopeContainingFile?.let { "($it)" } ?: ""
"$scopeKindChar:$scopeFqName$scopeFileOrEmpty"
} }
parts.add(lookups)
parts.add(lookupsFromColumn.distinct().joinToString(separator = " ", prefix = "/*", postfix = "*/", transform = stringifyLookupInfo))
start = end start = end
} }
@@ -101,7 +98,6 @@ private data class LookupInfo(
val lookupLine: Int?, val lookupLine: Int?,
val lookupColumn: Int?, val lookupColumn: Int?,
val scopeFqName: String, val scopeFqName: String,
val scopeContainingFile: String?,
val scopeKind: ScopeKind, val scopeKind: ScopeKind,
val name: String val name: String
) )
@@ -114,10 +110,9 @@ private class TestLookupTracker : LookupTracker {
override fun record( override fun record(
lookupContainingFile: String, lookupLine: Int?, lookupColumn: Int?, lookupContainingFile: String, lookupLine: Int?, lookupColumn: Int?,
scopeFqName: String, scopeContainingFile: String?, scopeKind: ScopeKind, scopeFqName: String, scopeKind: ScopeKind, name: String
name: String
) { ) {
lookups.add(LookupInfo(lookupContainingFile, lookupLine, lookupColumn, scopeFqName, scopeContainingFile, scopeKind, name)) lookups.add(LookupInfo(lookupContainingFile, lookupLine, lookupColumn, scopeFqName, scopeKind, name))
} }
} }