java.lang.Object
com.intellij.psi.templateLanguages.TemplateDataElementType.RangeCollector
com.intellij.psi.templateLanguages.RangeCollectorImpl
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddOuterRange(@NotNull com.intellij.openapi.util.TextRange newRange) Adds range corresponding to the outer element inside original source code.voidaddOuterRange(@NotNull com.intellij.openapi.util.TextRange newRange, boolean isInsertion) Adds range corresponding to the outer element inside original source code.voidaddRangeToRemove(@NotNull com.intellij.openapi.util.TextRange rangeToRemove) Adds the fragment that must be removed from the tree on the stage inserting outer elements.
-
Method Details
-
addOuterRange
public void addOuterRange(@NotNull @NotNull com.intellij.openapi.util.TextRange newRange) Description copied from class:TemplateDataElementType.RangeCollectorAdds range corresponding to the outer element inside original source code. After building the data template tree these ranges will be used for inserting outer language elements. If it's known whether this template element adds some string to resulting text, consider usingTemplateDataElementType.RangeCollector.addOuterRange(TextRange, boolean).- Overrides:
addOuterRangein classTemplateDataElementType.RangeCollector
-
addOuterRange
public void addOuterRange(@NotNull @NotNull com.intellij.openapi.util.TextRange newRange, boolean isInsertion) Description copied from class:TemplateDataElementType.RangeCollectorAdds range corresponding to the outer element inside original source code. After building the data template tree these ranges will be used for inserting outer language elements.- Specified by:
addOuterRangein classTemplateDataElementType.RangeCollectorisInsertion- true if element is expected to insert some text into template data fragment. For example, PHP's<?= $myVar ?>are insertions, while<?php foo() ?>are not.
-
addRangeToRemove
public void addRangeToRemove(@NotNull @NotNull com.intellij.openapi.util.TextRange rangeToRemove) Description copied from class:TemplateDataElementType.RangeCollectorAdds the fragment that must be removed from the tree on the stage inserting outer elements. This method should be called after adding "fake" symbols inside the data language text for building syntax correct tree- Overrides:
addRangeToRemovein classTemplateDataElementType.RangeCollector
-