KT-62676 [AA] Introduce ShortenOptions class
This class should contain 'global' settings for reference shortening; ATM it only contains the `removeThis` flag In the future this setting might be merged together with `ShortenStrategy` to be computed on per-element basis
This commit is contained in:
+6
-1
@@ -21,7 +21,12 @@ abstract class AbstractReferenceShortenerForWholeFileTest : AbstractAnalysisApiB
|
||||
val shortenings = executeOnPooledThreadInReadAction {
|
||||
analyseForTest(file) {
|
||||
ShortenStrategy.values().map { option ->
|
||||
val shorteningsForOption = collectPossibleReferenceShortenings(file, file.textRange, { option }, { option })
|
||||
val shorteningsForOption = collectPossibleReferenceShortenings(
|
||||
file,
|
||||
file.textRange,
|
||||
classShortenStrategy = { option },
|
||||
callableShortenStrategy = { option }
|
||||
)
|
||||
|
||||
Pair(option.name, shorteningsForOption)
|
||||
}
|
||||
|
||||
+7
-1
@@ -28,7 +28,13 @@ abstract class AbstractReferenceShortenerTest : AbstractAnalysisApiBasedSingleMo
|
||||
val shortenings = executeOnPooledThreadInReadAction {
|
||||
analyseForTest(element) {
|
||||
ShortenStrategy.values().map { option ->
|
||||
Pair(option.name, collectPossibleReferenceShorteningsInElement(element, { option }, { option }))
|
||||
val shorteningsForOption = collectPossibleReferenceShorteningsInElement(
|
||||
element,
|
||||
classShortenStrategy = { option },
|
||||
callableShortenStrategy = { option }
|
||||
)
|
||||
|
||||
Pair(option.name, shorteningsForOption)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user