diff options
author | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-10-03 20:20:02 +0400 |
---|---|---|
committer | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-10-03 20:20:02 +0400 |
commit | d6fd04521ba4c4c430286078dd56309111c180e6 (patch) | |
tree | cd02584ade5cd0c0cfa8da30da5ccb0ea7b2131c /src/Locations | |
parent | 7c6da4babd01da31c57c5c6c827eb2957c989b1c (diff) | |
download | dokka-d6fd04521ba4c4c430286078dd56309111c180e6.tar.gz dokka-d6fd04521ba4c4c430286078dd56309111c180e6.tar.bz2 dokka-d6fd04521ba4c4c430286078dd56309111c180e6.zip |
Cross-reference links on types, relative locations.
Diffstat (limited to 'src/Locations')
-rw-r--r-- | src/Locations/LocationService.kt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Locations/LocationService.kt b/src/Locations/LocationService.kt index 6472e906..277169fd 100644 --- a/src/Locations/LocationService.kt +++ b/src/Locations/LocationService.kt @@ -19,3 +19,9 @@ fun LocationService.relativeLocation(node: DocumentationNode, link: Documentatio val memberPath = location(link).file.appendExtension(extension) return Location(ownerFolder.getRelativePath(memberPath)) } + +fun LocationService.relativeLocation(location: Location, link: DocumentationNode, extension: String): Location { + val ownerFolder = location.file.getParentFile()!! + val memberPath = location(link).file.appendExtension(extension) + return Location(ownerFolder.getRelativePath(memberPath)) +} |