diff options
author | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-14 15:44:32 +0400 |
---|---|---|
committer | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-14 15:44:32 +0400 |
commit | 08e690021ce2df402134ea5cebd769183499c771 (patch) | |
tree | 5c8c95a9fcc26bb31e65cb08ac762980e46e1040 /src/Analysis/CompilerAPI.kt | |
parent | 71aacc5719cf59d2284592018177fbf8d71d12e4 (diff) | |
download | dokka-08e690021ce2df402134ea5cebd769183499c771.tar.gz dokka-08e690021ce2df402134ea5cebd769183499c771.tar.bz2 dokka-08e690021ce2df402134ea5cebd769183499c771.zip |
Migrate to PackageView processing to unify all package fragments into single item.
Diffstat (limited to 'src/Analysis/CompilerAPI.kt')
-rw-r--r-- | src/Analysis/CompilerAPI.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Analysis/CompilerAPI.kt b/src/Analysis/CompilerAPI.kt index bc0e6e93..b2b9a824 100644 --- a/src/Analysis/CompilerAPI.kt +++ b/src/Analysis/CompilerAPI.kt @@ -53,10 +53,11 @@ fun JetCoreEnvironment.analyze(messageCollector: MessageCollector): AnalyzeExhau fun AnalyzerWithCompilerReport.analyzeAndReport(files: List<JetFile>, analyser: () -> AnalyzeExhaust) = analyzeAndReport(analyser, files) -fun BindingContext.getPackageFragment(file: JetFile) = get(BindingContext.FILE_TO_PACKAGE_FRAGMENT, file) +fun BindingContext.getPackageFragment(file: JetFile) : PackageFragmentDescriptor? = get(BindingContext.FILE_TO_PACKAGE_FRAGMENT, file) fun DeclarationDescriptor.isUserCode() = when (this) { + is PackageViewDescriptor -> false is PackageFragmentDescriptor -> false is PropertyAccessorDescriptor -> !isDefault() is CallableMemberDescriptor -> getKind() == CallableMemberDescriptor.Kind.DECLARATION |