From adc3742938b7bef385632f0c05abfcb81c1fbcfd Mon Sep 17 00:00:00 2001 From: Andre Dietisheim Date: Tue, 22 Oct 2024 11:02:19 +0200 Subject: [PATCH] fix: removed internal API to get compat with 2024.3 Signed-off-by: Andre Dietisheim --- .../intellij/kubernetes/editor/util/ResourceEditorUtils.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/redhat/devtools/intellij/kubernetes/editor/util/ResourceEditorUtils.kt b/src/main/kotlin/com/redhat/devtools/intellij/kubernetes/editor/util/ResourceEditorUtils.kt index 96de04d5c..e1b82210e 100644 --- a/src/main/kotlin/com/redhat/devtools/intellij/kubernetes/editor/util/ResourceEditorUtils.kt +++ b/src/main/kotlin/com/redhat/devtools/intellij/kubernetes/editor/util/ResourceEditorUtils.kt @@ -25,7 +25,6 @@ import com.intellij.psi.PsiDocumentManager import com.intellij.psi.PsiElement import com.intellij.psi.PsiFile import com.intellij.psi.PsiManager -import com.intellij.refactoring.suggested.startOffset import com.redhat.devtools.intellij.common.validation.KubernetesResourceInfo import com.redhat.devtools.intellij.kubernetes.editor.ResourceEditor import org.jetbrains.yaml.YAMLElementGenerator @@ -321,8 +320,8 @@ fun getValue(element: PsiElement): String? { */ fun getStartOffset(element: PsiElement): Int? { return when (element) { - is YAMLKeyValue -> element.value?.startOffset - is JsonProperty -> element.value?.startOffset + is YAMLKeyValue -> element.value?.textRange?.startOffset + is JsonProperty -> element.value?.textRange?.startOffset else -> null } }