rename JetClass.isTrait() to isInterface(); rename ClassKind.TRAIT to INTERACE
This commit is contained in:
+1
-1
@@ -82,7 +82,7 @@ class AllClassesCompletion(val parameters: CompletionParameters,
|
||||
if (psiClass!! !is KotlinLightClass) { // Kotlin class should have already been added as kotlin element before
|
||||
val kind = when {
|
||||
psiClass.isAnnotationType() -> ClassKind.ANNOTATION_CLASS
|
||||
psiClass.isInterface() -> ClassKind.TRAIT
|
||||
psiClass.isInterface() -> ClassKind.INTERFACE
|
||||
psiClass.isEnum() -> ClassKind.ENUM_CLASS
|
||||
else -> ClassKind.CLASS
|
||||
}
|
||||
|
||||
+2
-2
@@ -153,7 +153,7 @@ class TypeInstantiationItems(
|
||||
val insertHandler: InsertHandler<LookupElement>
|
||||
val typeText = IdeDescriptorRenderers.SOURCE_CODE.renderClassifierName(classifier) + IdeDescriptorRenderers.SOURCE_CODE.renderTypeArguments(typeArgsToUse)
|
||||
if (isAbstract) {
|
||||
val constructorParenthesis = if (classifier.getKind() != ClassKind.TRAIT) "()" else ""
|
||||
val constructorParenthesis = if (classifier.getKind() != ClassKind.INTERFACE) "()" else ""
|
||||
itemText += constructorParenthesis
|
||||
itemText = "object: " + itemText + "{...}"
|
||||
lookupString = "object"
|
||||
@@ -242,7 +242,7 @@ class TypeInstantiationItems(
|
||||
}
|
||||
|
||||
private fun addSamConstructorItem(collection: MutableCollection<LookupElement>, `class`: ClassDescriptor, tail: Tail?) {
|
||||
if (`class`.getKind() == ClassKind.TRAIT) {
|
||||
if (`class`.getKind() == ClassKind.INTERFACE) {
|
||||
val container = `class`.getContainingDeclaration()
|
||||
val scope = when (container) {
|
||||
is PackageFragmentDescriptor -> container.getMemberScope()
|
||||
|
||||
Reference in New Issue
Block a user