private -> internal where it's necessary
This commit is contained in:
@@ -29,7 +29,7 @@ import com.intellij.psi.util.CachedValuesManager
|
||||
import org.jetbrains.kotlin.analyzer.ModuleInfo
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.utils.emptyOrSingletonList
|
||||
import java.util.LinkedHashSet
|
||||
import java.util.*
|
||||
|
||||
public val LIBRARY_NAME_PREFIX: String = "library "
|
||||
|
||||
@@ -111,7 +111,7 @@ public data class ModuleTestSourceInfo(override val module: Module) : ModuleSour
|
||||
})
|
||||
}
|
||||
|
||||
private fun ModuleSourceInfo.isTests() = this is ModuleTestSourceInfo
|
||||
internal fun ModuleSourceInfo.isTests() = this is ModuleTestSourceInfo
|
||||
|
||||
public fun Module.productionSourceInfo(): ModuleProductionSourceInfo = ModuleProductionSourceInfo(this)
|
||||
public fun Module.testSourceInfo(): ModuleTestSourceInfo = ModuleTestSourceInfo(this)
|
||||
@@ -160,7 +160,7 @@ public data class LibraryInfo(val project: Project, val library: Library) : Idea
|
||||
override fun toString() = "LibraryInfo(libraryName=${library.getName()})"
|
||||
}
|
||||
|
||||
private data class LibrarySourceInfo(val project: Project, val library: Library) : IdeaModuleInfo() {
|
||||
internal data class LibrarySourceInfo(val project: Project, val library: Library) : IdeaModuleInfo() {
|
||||
override val name: Name = Name.special("<sources for library ${library.getName()}>")
|
||||
|
||||
override fun contentScope() = GlobalSearchScope.EMPTY_SCOPE
|
||||
@@ -184,7 +184,7 @@ public data class SdkInfo(val project: Project, val sdk: Sdk) : IdeaModuleInfo()
|
||||
override fun dependencies(): List<IdeaModuleInfo> = listOf(this)
|
||||
}
|
||||
|
||||
private object NotUnderContentRootModuleInfo : IdeaModuleInfo() {
|
||||
internal object NotUnderContentRootModuleInfo : IdeaModuleInfo() {
|
||||
override val name: Name = Name.special("<special module for files not under source root>")
|
||||
|
||||
override fun contentScope() = GlobalSearchScope.EMPTY_SCOPE
|
||||
@@ -201,4 +201,4 @@ private data class LibraryWithoutSourceScope(project: Project, private val libra
|
||||
private data class SdkScope(project: Project, private val sdk: Sdk) :
|
||||
LibraryScopeBase(project, sdk.getRootProvider().getFiles(OrderRootType.CLASSES), arrayOf<VirtualFile>())
|
||||
|
||||
private fun IdeaModuleInfo.isLibraryClasses() = this is SdkInfo || this is LibraryInfo
|
||||
internal fun IdeaModuleInfo.isLibraryClasses() = this is SdkInfo || this is LibraryInfo
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ import org.jetbrains.kotlin.resolve.TargetPlatform
|
||||
import org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatform
|
||||
import org.jetbrains.kotlin.utils.keysToMap
|
||||
|
||||
private val LOG = Logger.getInstance(javaClass<KotlinCacheService>())
|
||||
internal val LOG = Logger.getInstance(javaClass<KotlinCacheService>())
|
||||
|
||||
public class KotlinCacheService(val project: Project) {
|
||||
companion object {
|
||||
|
||||
+2
-2
@@ -38,9 +38,9 @@ import org.jetbrains.kotlin.psi.psiUtil.parentsWithSelf
|
||||
import org.jetbrains.kotlin.resolve.*
|
||||
import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode
|
||||
import org.jetbrains.kotlin.resolve.lazy.ResolveSession
|
||||
import java.util.HashMap
|
||||
import java.util.*
|
||||
|
||||
private class PerFileAnalysisCache(val file: JetFile, val componentProvider: ComponentProvider) {
|
||||
internal class PerFileAnalysisCache(val file: JetFile, val componentProvider: ComponentProvider) {
|
||||
private val cache = HashMap<PsiElement, AnalysisResult>()
|
||||
|
||||
private fun lookUp(analyzableElement: JetElement): AnalysisResult? {
|
||||
|
||||
+3
-3
@@ -37,7 +37,7 @@ import org.jetbrains.kotlin.resolve.CompositeBindingContext
|
||||
import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode
|
||||
import org.jetbrains.kotlin.resolve.lazy.ResolveSession
|
||||
|
||||
private class ProjectResolutionFacade(
|
||||
internal class ProjectResolutionFacade(
|
||||
val project: Project,
|
||||
computeModuleResolverProvider: () -> CachedValueProvider.Result<ModuleResolverProvider>
|
||||
) {
|
||||
@@ -85,7 +85,7 @@ private class ProjectResolutionFacade(
|
||||
}
|
||||
}
|
||||
|
||||
private class ResolutionFacadeImpl(
|
||||
internal class ResolutionFacadeImpl(
|
||||
private val projectFacade: ProjectResolutionFacade,
|
||||
private val moduleInfo: IdeaModuleInfo
|
||||
) : ResolutionFacade {
|
||||
@@ -128,4 +128,4 @@ private class ResolutionFacadeImpl(
|
||||
return projectFacade.resolverForDescriptor(moduleDescriptor).componentProvider.getService(serviceClass)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ class ClsStubBuilderContext(
|
||||
val typeParameters: TypeParameters
|
||||
)
|
||||
|
||||
private fun ClsStubBuilderContext.child(typeParameterList: List<ProtoBuf.TypeParameter>, name: Name? = null): ClsStubBuilderContext {
|
||||
internal fun ClsStubBuilderContext.child(typeParameterList: List<ProtoBuf.TypeParameter>, name: Name? = null): ClsStubBuilderContext {
|
||||
return ClsStubBuilderContext(
|
||||
this.components,
|
||||
this.nameResolver,
|
||||
|
||||
+2
-2
@@ -21,11 +21,11 @@ import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
||||
import org.jetbrains.kotlin.descriptors.impl.ClassDescriptorImpl
|
||||
import org.jetbrains.kotlin.descriptors.impl.ConstructorDescriptorImpl
|
||||
import org.jetbrains.kotlin.descriptors.impl.PackageFragmentDescriptorImpl
|
||||
import org.jetbrains.kotlin.incremental.components.LookupLocation
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.resolve.scopes.JetScope
|
||||
import org.jetbrains.kotlin.resolve.scopes.JetScopeImpl
|
||||
import org.jetbrains.kotlin.incremental.components.LookupLocation
|
||||
import org.jetbrains.kotlin.types.ErrorUtils.createErrorType
|
||||
import org.jetbrains.kotlin.types.TypeProjection
|
||||
import org.jetbrains.kotlin.types.TypeSubstitution
|
||||
@@ -54,7 +54,7 @@ private class ScopeWithMissingDependencies(val fqName: FqName, val containing: D
|
||||
}
|
||||
}
|
||||
|
||||
private class PackageFragmentProviderForMissingDependencies(val moduleDescriptor: ModuleDescriptor) : PackageFragmentProvider {
|
||||
internal class PackageFragmentProviderForMissingDependencies(val moduleDescriptor: ModuleDescriptor) : PackageFragmentProvider {
|
||||
override fun getPackageFragments(fqName: FqName): List<PackageFragmentDescriptor> {
|
||||
return listOf(PackageFragmentWithMissingDependencies(fqName, moduleDescriptor))
|
||||
}
|
||||
|
||||
@@ -82,8 +82,8 @@ import org.jetbrains.org.objectweb.asm.Opcodes.ASM5
|
||||
import org.jetbrains.org.objectweb.asm.tree.MethodNode
|
||||
import java.util.*
|
||||
|
||||
private val RECEIVER_NAME = "\$receiver"
|
||||
private val THIS_NAME = "this"
|
||||
internal val RECEIVER_NAME = "\$receiver"
|
||||
internal val THIS_NAME = "this"
|
||||
|
||||
object KotlinEvaluationBuilder: EvaluatorBuilder {
|
||||
override fun build(codeFragment: PsiElement, position: SourcePosition?): ExpressionEvaluator {
|
||||
@@ -535,4 +535,4 @@ fun Type.getClassDescriptor(project: Project): ClassDescriptor? {
|
||||
classes.first().getJavaClassDescriptor()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.psi.JetClass
|
||||
import org.jetbrains.kotlin.psi.JetFunction
|
||||
import org.jetbrains.kotlin.psi.JetNamedFunction
|
||||
import org.jetbrains.kotlin.psi.JetSecondaryConstructor
|
||||
import java.util.HashSet
|
||||
import java.util.*
|
||||
|
||||
fun collectContainingClasses(methods: Collection<PsiMethod>): Set<PsiClass> {
|
||||
val classes = HashSet<PsiClass>()
|
||||
@@ -41,7 +41,7 @@ fun collectContainingClasses(methods: Collection<PsiMethod>): Set<PsiClass> {
|
||||
return classes
|
||||
}
|
||||
|
||||
private fun getPsiClass(element: PsiElement?): PsiClass? {
|
||||
internal fun getPsiClass(element: PsiElement?): PsiClass? {
|
||||
return when {
|
||||
element == null -> null
|
||||
element is PsiClass -> element
|
||||
@@ -51,7 +51,7 @@ private fun getPsiClass(element: PsiElement?): PsiClass? {
|
||||
}
|
||||
}
|
||||
|
||||
private fun getPsiMethod(element: PsiElement?): PsiMethod? {
|
||||
internal fun getPsiMethod(element: PsiElement?): PsiMethod? {
|
||||
val parent = element?.getParent()
|
||||
return when {
|
||||
element == null -> null
|
||||
|
||||
@@ -16,34 +16,34 @@
|
||||
|
||||
package org.jetbrains.kotlin.idea.highlighter.markers
|
||||
|
||||
import com.intellij.psi.PsiMethod
|
||||
import com.intellij.psi.search.PsiElementProcessor
|
||||
import com.intellij.psi.search.searches.OverridingMethodsSearch
|
||||
import com.intellij.psi.PsiModifier
|
||||
import com.intellij.codeInsight.daemon.DaemonBundle
|
||||
import com.intellij.ide.util.MethodCellRenderer
|
||||
import com.intellij.codeInsight.daemon.impl.GutterIconTooltipHelper
|
||||
import java.awt.event.MouseEvent
|
||||
import com.intellij.openapi.project.DumbService
|
||||
import com.intellij.openapi.progress.ProgressManager
|
||||
import javax.swing.JComponent
|
||||
import com.intellij.psi.util.PsiUtil
|
||||
import com.intellij.codeInsight.daemon.impl.PsiElementListNavigator
|
||||
import com.intellij.codeInsight.navigation.ListBackgroundUpdaterTask
|
||||
import com.intellij.ide.util.MethodCellRenderer
|
||||
import com.intellij.ide.util.PsiElementListCellRenderer
|
||||
import com.intellij.openapi.progress.ProgressIndicator
|
||||
import com.intellij.util.CommonProcessors
|
||||
import com.intellij.psi.search.PsiElementProcessorAdapter
|
||||
import com.intellij.psi.PsiElement
|
||||
import gnu.trove.THashSet
|
||||
import com.intellij.psi.PsiClass
|
||||
import com.intellij.psi.search.searches.AllOverridingMethodsSearch
|
||||
import com.intellij.openapi.progress.ProgressManager
|
||||
import com.intellij.openapi.project.DumbService
|
||||
import com.intellij.openapi.util.Pair
|
||||
import java.util.HashSet
|
||||
import com.intellij.psi.PsiClass
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.PsiMethod
|
||||
import com.intellij.psi.PsiModifier
|
||||
import com.intellij.psi.search.PsiElementProcessor
|
||||
import com.intellij.psi.search.PsiElementProcessorAdapter
|
||||
import com.intellij.psi.search.searches.AllOverridingMethodsSearch
|
||||
import com.intellij.psi.search.searches.OverridingMethodsSearch
|
||||
import com.intellij.psi.util.PsiUtil
|
||||
import com.intellij.util.CommonProcessors
|
||||
import com.intellij.util.Processor
|
||||
import gnu.trove.THashSet
|
||||
import org.jetbrains.kotlin.asJava.KotlinLightMethodForTraitFakeOverride
|
||||
import java.awt.event.MouseEvent
|
||||
import java.util.*
|
||||
import javax.swing.JComponent
|
||||
|
||||
private fun <T> getOverriddenDeclarations(mappingToJava: MutableMap<PsiMethod, T>, classes: Set<PsiClass>): Set<T> {
|
||||
internal fun <T> getOverriddenDeclarations(mappingToJava: MutableMap<PsiMethod, T>, classes: Set<PsiClass>): Set<T> {
|
||||
val overridden = HashSet<T>()
|
||||
for (aClass in classes) {
|
||||
AllOverridingMethodsSearch.search(aClass)!!.forEach(object : Processor<Pair<PsiMethod, PsiMethod>> {
|
||||
|
||||
+1
-1
@@ -1069,7 +1069,7 @@ class CallableBuilder(val config: CallableBuilderConfiguration) {
|
||||
}
|
||||
}
|
||||
|
||||
private fun JetNamedDeclaration.getReturnTypeReference(): JetTypeReference? {
|
||||
internal fun JetNamedDeclaration.getReturnTypeReference(): JetTypeReference? {
|
||||
return when (this) {
|
||||
is JetCallableDeclaration -> getTypeReference()
|
||||
is JetClassOrObject -> getDelegationSpecifiers().firstOrNull()?.getTypeReference()
|
||||
|
||||
+4
-4
@@ -39,7 +39,7 @@ import java.util.LinkedHashSet
|
||||
/**
|
||||
* Special <code>Expression</code> for parameter names based on its type.
|
||||
*/
|
||||
private class ParameterNameExpression(
|
||||
internal class ParameterNameExpression(
|
||||
private val names: Array<String>,
|
||||
private val parameterTypeToNamesMap: Map<String, Array<String>>) : Expression() {
|
||||
init {
|
||||
@@ -102,7 +102,7 @@ private class ParameterNameExpression(
|
||||
/**
|
||||
* An <code>Expression</code> for type references and delegation specifiers.
|
||||
*/
|
||||
private abstract class TypeExpression(public val typeCandidates: List<TypeCandidate>) : Expression() {
|
||||
internal abstract class TypeExpression(public val typeCandidates: List<TypeCandidate>) : Expression() {
|
||||
class ForTypeReference(typeCandidates: List<TypeCandidate>) : TypeExpression(typeCandidates) {
|
||||
override val cachedLookupElements: Array<LookupElement> =
|
||||
typeCandidates.map { LookupElementBuilder.create(it, it.renderedType!!) }.toTypedArray()
|
||||
@@ -132,7 +132,7 @@ private abstract class TypeExpression(public val typeCandidates: List<TypeCandid
|
||||
/**
|
||||
* A sort-of dummy <code>Expression</code> for parameter lists, to allow us to update the parameter list as the user makes selections.
|
||||
*/
|
||||
private class TypeParameterListExpression(private val mandatoryTypeParameters: List<RenderedTypeParameter>,
|
||||
internal class TypeParameterListExpression(private val mandatoryTypeParameters: List<RenderedTypeParameter>,
|
||||
private val parameterTypeToTypeParameterNamesMap: Map<String, List<RenderedTypeParameter>>,
|
||||
insertLeadingSpace: Boolean) : Expression() {
|
||||
private val prefix = if (insertLeadingSpace) " <" else "<"
|
||||
@@ -185,7 +185,7 @@ private class TypeParameterListExpression(private val mandatoryTypeParameters: L
|
||||
override fun calculateLookupItems(context: ExpressionContext?) = arrayOf<LookupElement>()
|
||||
}
|
||||
|
||||
private object ValVarExpression: Expression() {
|
||||
internal object ValVarExpression: Expression() {
|
||||
private val cachedLookupElements = listOf("val", "var").map { LookupElementBuilder.create(it) }.toTypedArray<LookupElement>()
|
||||
|
||||
override fun calculateResult(context: ExpressionContext?): Result? = TextResult("val")
|
||||
|
||||
+6
-6
@@ -40,7 +40,7 @@ import org.jetbrains.kotlin.types.checker.JetTypeChecker
|
||||
import org.jetbrains.kotlin.types.typeUtil.makeNotNullable
|
||||
import java.util.*
|
||||
|
||||
private fun JetType.contains(inner: JetType): Boolean {
|
||||
internal fun JetType.contains(inner: JetType): Boolean {
|
||||
return JetTypeChecker.DEFAULT.equalTypes(this, inner) || getArguments().any { inner in it.getType() }
|
||||
}
|
||||
|
||||
@@ -61,10 +61,10 @@ private fun JetType.render(typeParameterNameMap: Map<TypeParameterDescriptor, St
|
||||
return "$typeString$typeArgumentString$nullifier"
|
||||
}
|
||||
|
||||
private fun JetType.renderShort(typeParameterNameMap: Map<TypeParameterDescriptor, String>) = render(typeParameterNameMap, false)
|
||||
private fun JetType.renderLong(typeParameterNameMap: Map<TypeParameterDescriptor, String>) = render(typeParameterNameMap, true)
|
||||
internal fun JetType.renderShort(typeParameterNameMap: Map<TypeParameterDescriptor, String>) = render(typeParameterNameMap, false)
|
||||
internal fun JetType.renderLong(typeParameterNameMap: Map<TypeParameterDescriptor, String>) = render(typeParameterNameMap, true)
|
||||
|
||||
private fun getTypeParameterNamesNotInScope(typeParameters: Collection<TypeParameterDescriptor>, scope: JetScope): List<TypeParameterDescriptor> {
|
||||
internal fun getTypeParameterNamesNotInScope(typeParameters: Collection<TypeParameterDescriptor>, scope: JetScope): List<TypeParameterDescriptor> {
|
||||
return typeParameters.filter { typeParameter ->
|
||||
val classifier = scope.getClassifier(typeParameter.name, NoLookupLocation.FROM_IDE)
|
||||
classifier == null || classifier != typeParameter
|
||||
@@ -215,9 +215,9 @@ private fun JetNamedDeclaration.guessType(context: BindingContext): Array<JetTyp
|
||||
/**
|
||||
* Encapsulates a single type substitution of a <code>JetType</code> by another <code>JetType</code>.
|
||||
*/
|
||||
private class JetTypeSubstitution(public val forType: JetType, public val byType: JetType)
|
||||
internal class JetTypeSubstitution(public val forType: JetType, public val byType: JetType)
|
||||
|
||||
private fun JetType.substitute(substitution: JetTypeSubstitution, variance: Variance): JetType {
|
||||
internal fun JetType.substitute(substitution: JetTypeSubstitution, variance: Variance): JetType {
|
||||
val nullable = isMarkedNullable()
|
||||
val currentType = makeNotNullable()
|
||||
|
||||
|
||||
+6
-6
@@ -43,11 +43,11 @@ import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue
|
||||
import org.jetbrains.kotlin.types.Variance
|
||||
import org.jetbrains.kotlin.descriptors.ClassKind as ClassDescriptorKind
|
||||
|
||||
private fun String.checkClassName(): Boolean = isNotEmpty() && Character.isUpperCase(first())
|
||||
internal fun String.checkClassName(): Boolean = isNotEmpty() && Character.isUpperCase(first())
|
||||
|
||||
private fun String.checkPackageName(): Boolean = isNotEmpty() && Character.isLowerCase(first())
|
||||
|
||||
private fun getTargetParentByQualifier(
|
||||
internal fun getTargetParentByQualifier(
|
||||
file: JetFile,
|
||||
isQualified: Boolean,
|
||||
qualifierDescriptor: DeclarationDescriptor?): PsiElement? {
|
||||
@@ -68,7 +68,7 @@ private fun getTargetParentByQualifier(
|
||||
return if (targetParent.canRefactor()) return targetParent else null
|
||||
}
|
||||
|
||||
private fun getTargetParentByCall(call: Call, file: JetFile): PsiElement? {
|
||||
internal fun getTargetParentByCall(call: Call, file: JetFile): PsiElement? {
|
||||
val receiver = call.getExplicitReceiver()
|
||||
return when (receiver) {
|
||||
ReceiverValue.NO_RECEIVER -> getTargetParentByQualifier(file, false, null)
|
||||
@@ -77,12 +77,12 @@ private fun getTargetParentByCall(call: Call, file: JetFile): PsiElement? {
|
||||
}
|
||||
}
|
||||
|
||||
private fun isInnerClassExpected(call: Call): Boolean {
|
||||
internal fun isInnerClassExpected(call: Call): Boolean {
|
||||
val receiver = call.getExplicitReceiver()
|
||||
return receiver != ReceiverValue.NO_RECEIVER && receiver !is Qualifier
|
||||
}
|
||||
|
||||
private fun JetExpression.getInheritableTypeInfo(
|
||||
internal fun JetExpression.getInheritableTypeInfo(
|
||||
context: BindingContext,
|
||||
moduleDescriptor: ModuleDescriptor,
|
||||
containingDeclaration: PsiElement): Pair<TypeInfo, (ClassKind) -> Boolean> {
|
||||
@@ -108,7 +108,7 @@ private fun JetExpression.getInheritableTypeInfo(
|
||||
}
|
||||
}
|
||||
|
||||
private fun JetSimpleNameExpression.getCreatePackageFixIfApplicable(targetParent: PsiElement): IntentionAction? {
|
||||
internal fun JetSimpleNameExpression.getCreatePackageFixIfApplicable(targetParent: PsiElement): IntentionAction? {
|
||||
val name = getReferencedName()
|
||||
if (!name.checkPackageName()) return null
|
||||
|
||||
|
||||
+1
-1
@@ -257,7 +257,7 @@ data class ExtractionData(
|
||||
// Hack:
|
||||
// we can't get first element offset through getStatement()/getChildren() since they skip comments and whitespaces
|
||||
// So we take offset of the left brace instead and increase it by 2 (which is length of "{\n" separating block start and its first element)
|
||||
private fun JetExpression.getBlockContentOffset(): Int {
|
||||
internal fun JetExpression.getBlockContentOffset(): Int {
|
||||
(this as? JetBlockExpression)?.getLBrace()?.let {
|
||||
return it.getTextRange()!!.getStartOffset() + 2
|
||||
}
|
||||
|
||||
+3
-3
@@ -89,7 +89,7 @@ import org.jetbrains.kotlin.utils.DFS.Neighbors
|
||||
import org.jetbrains.kotlin.utils.DFS.VisitedWithSet
|
||||
import java.util.*
|
||||
|
||||
private val DEFAULT_RETURN_TYPE = KotlinBuiltIns.getInstance().getUnitType()
|
||||
internal val DEFAULT_RETURN_TYPE = KotlinBuiltIns.getInstance().getUnitType()
|
||||
private val DEFAULT_PARAMETER_TYPE = KotlinBuiltIns.getInstance().getNullableAnyType()
|
||||
|
||||
private fun DeclarationDescriptor.renderForMessage(): String =
|
||||
@@ -104,7 +104,7 @@ private fun JetType.renderForMessage(): String = TYPE_RENDERER.renderType(this)
|
||||
private fun JetDeclaration.renderForMessage(bindingContext: BindingContext): String? =
|
||||
bindingContext[BindingContext.DECLARATION_TO_DESCRIPTOR, this]?.renderForMessage()
|
||||
|
||||
private fun JetType.isDefault(): Boolean = KotlinBuiltIns.isUnit(this)
|
||||
internal fun JetType.isDefault(): Boolean = KotlinBuiltIns.isUnit(this)
|
||||
|
||||
private fun List<Instruction>.getModifiedVarDescriptors(bindingContext: BindingContext): Map<VariableDescriptor, List<JetExpression>> {
|
||||
val result = HashMap<VariableDescriptor, MutableList<JetExpression>>()
|
||||
@@ -968,7 +968,7 @@ private fun ExtractionData.suggestFunctionNames(returnType: JetType): List<Strin
|
||||
return functionNames.toList()
|
||||
}
|
||||
|
||||
private fun JetNamedDeclaration.getGeneratedBody() =
|
||||
internal fun JetNamedDeclaration.getGeneratedBody() =
|
||||
when (this) {
|
||||
is JetNamedFunction -> getBodyExpression()
|
||||
else -> {
|
||||
|
||||
@@ -83,7 +83,7 @@ fun DeclarationDescriptor.renderForConflicts(): String {
|
||||
}
|
||||
}
|
||||
|
||||
private fun KotlinPullUpData.getClashingMemberInTargetClass(memberDescriptor: CallableMemberDescriptor): CallableMemberDescriptor? {
|
||||
internal fun KotlinPullUpData.getClashingMemberInTargetClass(memberDescriptor: CallableMemberDescriptor): CallableMemberDescriptor? {
|
||||
val memberInSuper = memberDescriptor.substitute(sourceToTargetClassSubstitutor) ?: return null
|
||||
return targetClassDescriptor.findCallableMemberBySignature(memberInSuper as CallableMemberDescriptor)
|
||||
}
|
||||
|
||||
+12
-12
@@ -16,22 +16,22 @@
|
||||
|
||||
package org.jetbrains.kotlin.idea.decompiler.stubBuilder
|
||||
|
||||
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.psi.stubs.elements.JetFileStubBuilder
|
||||
import org.jetbrains.kotlin.test.JetTestUtils
|
||||
import java.io.File
|
||||
import org.jetbrains.kotlin.test.MockLibraryUtil
|
||||
import com.google.common.io.Files
|
||||
import com.intellij.openapi.vfs.LocalFileSystem
|
||||
import com.intellij.util.indexing.FileContentImpl
|
||||
import com.intellij.openapi.vfs.VfsUtilCore
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.stubs.StubElement
|
||||
import com.google.common.io.Files
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import org.junit.Assert
|
||||
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
|
||||
import com.intellij.util.indexing.FileContentImpl
|
||||
import org.jetbrains.kotlin.idea.stubs.AbstractStubBuilderTest
|
||||
import java.util.LinkedHashSet
|
||||
import com.intellij.openapi.vfs.VfsUtilCore
|
||||
import org.jetbrains.kotlin.psi.stubs.elements.JetFileStubBuilder
|
||||
import org.jetbrains.kotlin.test.JetTestUtils
|
||||
import org.jetbrains.kotlin.test.MockLibraryUtil
|
||||
import org.jetbrains.kotlin.utils.addIfNotNull
|
||||
import org.junit.Assert
|
||||
import java.io.File
|
||||
import java.util.*
|
||||
|
||||
public abstract class AbstractClsStubBuilderTest : LightCodeInsightFixtureTestCase() {
|
||||
fun doTest(sourcePath: String) {
|
||||
@@ -64,7 +64,7 @@ public abstract class AbstractClsStubBuilderTest : LightCodeInsightFixtureTestCa
|
||||
}
|
||||
}
|
||||
|
||||
private fun StubElement<out PsiElement>.serializeToString(): String {
|
||||
internal fun StubElement<out PsiElement>.serializeToString(): String {
|
||||
return AbstractStubBuilderTest.serializeStubToString(this)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user