diff --git a/platform/core-api/src/com/intellij/lang/injection/InjectedLanguageManager.java b/platform/core-api/src/com/intellij/lang/injection/InjectedLanguageManager.java index 31587ba56e87..aef1da98c38a 100644 --- a/platform/core-api/src/com/intellij/lang/injection/InjectedLanguageManager.java +++ b/platform/core-api/src/com/intellij/lang/injection/InjectedLanguageManager.java @@ -1,4 +1,4 @@ -// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.lang.injection; import com.intellij.injected.editor.DocumentWindow; @@ -34,6 +34,10 @@ public abstract class InjectedLanguageManager { @Nullable public abstract PsiLanguageInjectionHost getInjectionHost(@NotNull PsiElement injectedElement); + /** + * @return range in the top level file if {@code injectedContext} is inside injection + * unchanged {@code injectedTextRange} otherwise + */ @NotNull public abstract TextRange injectedToHost(@NotNull PsiElement injectedContext, @NotNull TextRange injectedTextRange); public abstract int injectedToHost(@NotNull PsiElement injectedContext, int injectedOffset);