KTIJ-26713 [AA] Clean-up KtFirReferenceShortener
- revert some accidental changes in
`findSmallestElementOfTypeContainingSelection` function (see 48433bf9)
- simplify `dropFakeRootPrefixIfPresent` by using `tail`, add a new
test-case to check that it works
- simplify `findClassifierElementsToShorten` by not passing lambdas and
calling a common functions instead
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
// FILE: main.kt
|
||||
import dependency.Foo
|
||||
|
||||
/**
|
||||
* [<expr>_root_ide_package_.dependency.Foo</expr>.foo]
|
||||
*/
|
||||
fun test() {}
|
||||
|
||||
// FILE: dependency.kt
|
||||
package dependency
|
||||
|
||||
object Foo {
|
||||
fun foo() {}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
Before shortening: _root_ide_package_.dependency.Foo
|
||||
with DO_NOT_SHORTEN:
|
||||
[kdoc] _root_ide_package_.dependency
|
||||
with SHORTEN_IF_ALREADY_IMPORTED:
|
||||
[kdoc] _root_ide_package_.dependency.Foo
|
||||
with SHORTEN_AND_IMPORT:
|
||||
[kdoc] _root_ide_package_.dependency.Foo
|
||||
with SHORTEN_AND_STAR_IMPORT:
|
||||
[kdoc] _root_ide_package_.dependency.Foo
|
||||
Reference in New Issue
Block a user