use of com.intellij.openapi.editor.RangeMarker in project intellij-community by JetBrains.
the class TemplateBuilderImpl method buildInlineTemplate.
public Template buildInlineTemplate() {
Template template = buildTemplate();
template.setInline(true);
ApplicationManager.getApplication().assertWriteAccessAllowed();
//DocumentUtil.executeInBulk(myDocument, true, () -> {
for (RangeMarker element : myElements) {
if (element != myEndElement) {
myDocument.deleteString(element.getStartOffset(), element.getEndOffset());
}
}
return template;
}
use of com.intellij.openapi.editor.RangeMarker in project intellij-community by JetBrains.
the class TemplateBuilderImpl method replaceElement.
public void replaceElement(PsiElement element, String varName, Expression expression, boolean alwaysStopAt, boolean skipOnStart) {
final RangeMarker key = wrapElement(element);
myAlwaysStopAtMap.put(key, alwaysStopAt ? Boolean.TRUE : Boolean.FALSE);
myVariableNamesMap.put(key, varName);
mySkipOnStartMap.put(key, skipOnStart);
replaceElement(key, expression);
}
use of com.intellij.openapi.editor.RangeMarker in project intellij-community by JetBrains.
the class TemplateBuilderImpl method replaceElement.
public void replaceElement(PsiReference ref, String varName, String dependantVariableName, boolean alwaysStopAt) {
final RangeMarker key = wrapReference(ref);
myAlwaysStopAtMap.put(key, alwaysStopAt ? Boolean.TRUE : Boolean.FALSE);
myVariableNamesMap.put(key, varName);
myVariableExpressions.put(key, dependantVariableName);
myElements.add(key);
}
use of com.intellij.openapi.editor.RangeMarker in project intellij-community by JetBrains.
the class TemplateBuilderImpl method replaceElement.
public void replaceElement(PsiElement element, String varName, String dependantVariableName, boolean alwaysStopAt) {
final RangeMarker key = wrapElement(element);
myAlwaysStopAtMap.put(key, alwaysStopAt ? Boolean.TRUE : Boolean.FALSE);
myVariableNamesMap.put(key, varName);
myVariableExpressions.put(key, dependantVariableName);
myElements.add(key);
}
use of com.intellij.openapi.editor.RangeMarker in project intellij-community by JetBrains.
the class TemplateBuilderImpl method replaceElement.
public void replaceElement(PsiReference ref, String varName, Expression expression, boolean alwaysStopAt) {
final RangeMarker key = wrapReference(ref);
myAlwaysStopAtMap.put(key, alwaysStopAt ? Boolean.TRUE : Boolean.FALSE);
myVariableNamesMap.put(key, varName);
replaceElement(key, expression);
}
Aggregations