[injections] javadoc

GitOrigin-RevId: 658f2c65f9553ae2baa8e83cf6775aa13e2919d3
This commit is contained in:
Anna Kozlova
2021-09-07 07:14:21 +00:00
committed by intellij-monorepo-bot
parent 689a3b2b34
commit d0d7c8c282
@@ -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);