GitOrigin-RevId: 66a523be780c6d7532c9414dbfb52ec598201e32
This commit is contained in:
Vladimir Dolzhenko
2022-12-12 12:33:15 +01:00
committed by intellij-monorepo-bot
parent 16b549f9c5
commit 1d42f63edb
3 changed files with 5 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ import com.intellij.openapi.editor.colors.TextAttributesKey
import com.intellij.openapi.util.TextRange
import org.jetbrains.kotlin.utils.addToStdlib.applyIf
internal object HiglightingFactory {
internal object HighlightingFactory {
fun createInfoAnnotation(holder: AnnotationHolder, textRange: TextRange, message: String?, textAttributes: TextAttributesKey?) {
val builder =
if (message == null) holder.newSilentAnnotation(HighlightSeverity.INFORMATION)

View File

@@ -5,10 +5,10 @@ import com.intellij.lang.annotation.AnnotationHolder
import com.intellij.openapi.editor.colors.TextAttributesKey
import com.intellij.openapi.util.TextRange
import org.jetbrains.kotlin.idea.base.highlighting.visitor.AbstractHighlightingVisitor
import org.jetbrains.kotlin.idea.highlighting.HiglightingFactory
import org.jetbrains.kotlin.idea.highlighting.HighlightingFactory
abstract class AbstractBeforeResolveHiglightingVisitory(protected val holder: AnnotationHolder): AbstractHighlightingVisitor() {
override fun createInfoAnnotation(textRange: TextRange, message: String?, textAttributes: TextAttributesKey?) {
HiglightingFactory.createInfoAnnotation(holder, textRange, message, textAttributes)
HighlightingFactory.createInfoAnnotation(holder, textRange, message, textAttributes)
}
}

View File

@@ -8,7 +8,7 @@ import com.intellij.openapi.util.TextRange
import com.intellij.psi.PsiElement
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
import org.jetbrains.kotlin.idea.base.highlighting.isNameHighlightingEnabled
import org.jetbrains.kotlin.idea.highlighting.HiglightingFactory
import org.jetbrains.kotlin.idea.highlighting.HighlightingFactory
import org.jetbrains.kotlin.psi.KtElement
internal abstract class AfterResolveHighlighter(
@@ -20,7 +20,7 @@ internal abstract class AfterResolveHighlighter(
abstract fun highlight(element: KtElement)
private fun createInfoAnnotation(textRange: TextRange, message: String?, textAttributes: TextAttributesKey?) {
HiglightingFactory.createInfoAnnotation(holder, textRange, message, textAttributes)
HighlightingFactory.createInfoAnnotation(holder, textRange, message, textAttributes)
}
protected fun createInfoAnnotation(element: PsiElement, message: String? = null, textAttributes: TextAttributesKey) {