Skip to content

Commit

Permalink
fix: do not use features that are internal in future versions
Browse files Browse the repository at this point in the history
  • Loading branch information
SirYwell committed Nov 14, 2024
1 parent e86af05 commit dc65fef
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.intellij.platform.backend.documentation.DocumentationTarget
import com.intellij.platform.backend.presentation.TargetPresentation
import com.intellij.psi.PsiElement
import com.intellij.psi.PsiIdentifier
import com.intellij.refactoring.suggested.createSmartPointer
import com.intellij.psi.SmartPointerManager
import de.sirywell.handlehints.TypeData

@Suppress("UnstableApiUsage")
Expand All @@ -18,8 +18,9 @@ class TypeDocumentationTarget(private val identifier: PsiIdentifier, private val
}

override fun createPointer(): Pointer<out DocumentationTarget> {
val idPointer = identifier.createSmartPointer()
val elPointer = element.createSmartPointer()
val pointerManager = SmartPointerManager.getInstance(identifier.project)
val idPointer = pointerManager.createSmartPsiElementPointer(identifier)
val elPointer = pointerManager.createSmartPsiElementPointer(element)
return Pointer {
val identifier = idPointer.element ?: return@Pointer null
val element = elPointer.element ?: return@Pointer null
Expand Down

0 comments on commit dc65fef

Please sign in to comment.