mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-108838 Wrong code when introducing variable in injection
This commit is contained in:
@@ -115,7 +115,8 @@ public class TemplateBuilderImpl implements TemplateBuilder {
|
||||
}
|
||||
|
||||
public void replaceElement(PsiElement element, TextRange textRange, String primaryVariableName, String otherVariableName, boolean alwaysStopAt) {
|
||||
final RangeMarker key = myDocument.createRangeMarker(textRange.shiftRight(element.getTextRange().getStartOffset()));
|
||||
final TextRange elementTextRange = InjectedLanguageManager.getInstance(element.getProject()).injectedToHost(element, element.getTextRange());
|
||||
final RangeMarker key = myDocument.createRangeMarker(textRange.shiftRight(elementTextRange.getStartOffset()));
|
||||
myAlwaysStopAtMap.put(key, alwaysStopAt ? Boolean.TRUE : Boolean.FALSE);
|
||||
myVariableNamesMap.put(key, primaryVariableName);
|
||||
myVariableExpressions.put(key, otherVariableName);
|
||||
|
||||
Reference in New Issue
Block a user