Skip to content

Commit adc3742

Browse files
committed
fix: removed internal API to get compat with 2024.3
Signed-off-by: Andre Dietisheim <[email protected]>
1 parent d5972d2 commit adc3742

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/kotlin/com/redhat/devtools/intellij/kubernetes/editor/util/ResourceEditorUtils.kt

+2-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import com.intellij.psi.PsiDocumentManager
2525
import com.intellij.psi.PsiElement
2626
import com.intellij.psi.PsiFile
2727
import com.intellij.psi.PsiManager
28-
import com.intellij.refactoring.suggested.startOffset
2928
import com.redhat.devtools.intellij.common.validation.KubernetesResourceInfo
3029
import com.redhat.devtools.intellij.kubernetes.editor.ResourceEditor
3130
import org.jetbrains.yaml.YAMLElementGenerator
@@ -321,8 +320,8 @@ fun getValue(element: PsiElement): String? {
321320
*/
322321
fun getStartOffset(element: PsiElement): Int? {
323322
return when (element) {
324-
is YAMLKeyValue -> element.value?.startOffset
325-
is JsonProperty -> element.value?.startOffset
323+
is YAMLKeyValue -> element.value?.textRange?.startOffset
324+
is JsonProperty -> element.value?.textRange?.startOffset
326325
else -> null
327326
}
328327
}

0 commit comments

Comments
 (0)