From faeb509797f3a764f4f9f23812dd7080c957dfc2 Mon Sep 17 00:00:00 2001 From: chrisly42 Date: Thu, 18 Apr 2019 22:29:30 +0200 Subject: [PATCH] Fixed default method not available in IDEA <2018.3. Sigh :-( --- .../cajon/references/ExtractorReferenceContributor.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/de/platon42/intellij/plugins/cajon/references/ExtractorReferenceContributor.kt b/src/main/java/de/platon42/intellij/plugins/cajon/references/ExtractorReferenceContributor.kt index 369c5d8..97d7684 100644 --- a/src/main/java/de/platon42/intellij/plugins/cajon/references/ExtractorReferenceContributor.kt +++ b/src/main/java/de/platon42/intellij/plugins/cajon/references/ExtractorReferenceContributor.kt @@ -7,6 +7,7 @@ import com.intellij.psi.* import com.intellij.psi.util.PropertyUtilBase import com.intellij.psi.util.PsiTreeUtil import com.intellij.psi.util.PsiTypesUtil +import com.intellij.util.ArrayUtil import com.intellij.util.ProcessingContext import com.siyeh.ig.callMatcher.CallMatcher import de.platon42.intellij.plugins.cajon.AssertJClassNames @@ -81,6 +82,10 @@ class ExtractorReferenceContributor : PsiReferenceContributor() { class ExtractorReference(literal: PsiLiteralExpression, range: TextRange, private val targets: List) : PsiPolyVariantReferenceBase(literal, range, true) { + override fun getVariants(): Array { + return ArrayUtil.EMPTY_OBJECT_ARRAY + } + override fun resolve(): PsiElement? { return multiResolve(false).map(ResolveResult::getElement).firstOrNull() }