Rename: analyzeWithDeclarations --> analyzeWithContent()

This commit is contained in:
Mikhail Glukhikh
2018-02-20 17:46:32 +03:00
parent f6513cd17e
commit bd0cbb716c
22 changed files with 44 additions and 46 deletions
@@ -237,7 +237,7 @@ class IDELightClassGenerationSupport(private val project: Project) : LightClassG
override fun analyze(element: KtElement) = element.analyze(BodyResolveMode.PARTIAL)
override fun analyzeWithDeclarations(element: KtClassOrObject) = element.analyzeWithDeclarations()
override fun analyzeWithContent(element: KtClassOrObject) = element.analyzeWithContent()
override fun getFacadeNames(packageFqName: FqName, scope: GlobalSearchScope): Collection<String> {
val facadeFilesInPackage = runReadAction {
@@ -40,7 +40,7 @@ class DebugInfoAnnotator : Annotator {
if (element is KtFile && element !is KtCodeFragment) {
try {
val bindingContext = element.analyzeWithDeclarations()
val bindingContext = element.analyzeWithContent()
DebugInfoUtil.markDebugAnnotations(element, bindingContext, object : DebugInfoUtil.DebugInfoReporter() {
override fun reportElementWithErrorType(expression: KtReferenceExpression) {
holder.createErrorAnnotation(expression, "[DEBUG] Resolved to error element").textAttributes =
@@ -19,10 +19,8 @@ package org.jetbrains.kotlin.idea.highlighter
import com.intellij.lang.annotation.AnnotationHolder
import com.intellij.lang.annotation.Annotator
import com.intellij.psi.PsiElement
import org.jetbrains.kotlin.asJava.getJvmSignatureDiagnostics
import org.jetbrains.kotlin.idea.caches.resolve.analyzeWithContent
import org.jetbrains.kotlin.idea.caches.resolve.analyzeWithDeclarations
import org.jetbrains.kotlin.idea.caches.resolve.getModuleInfo
import org.jetbrains.kotlin.asJava.*
import org.jetbrains.kotlin.idea.caches.resolve.*
import org.jetbrains.kotlin.idea.project.TargetPlatformDetector
import org.jetbrains.kotlin.idea.util.ProjectRootsUtil
import org.jetbrains.kotlin.psi.KtDeclaration
@@ -39,7 +37,7 @@ class DuplicateJvmSignatureAnnotator : Annotator {
val otherDiagnostics = when (element) {
is KtDeclaration -> element.analyzeWithContent()
is KtFile -> element.analyzeWithDeclarations()
is KtFile -> element.analyzeWithContent()
else -> throw AssertionError("DuplicateJvmSignatureAnnotator: should not get here! Element: ${element.text}")
}.diagnostics