protected abstract class BasicRefactoringTool.AbstractRenamer extends AbstractTraverseChildrenVisitor
MultiTextEdit
that will holds the TextEdit
objects that are related to
the same refactoring event.Modifier and Type | Field and Description |
---|---|
protected java.util.List<TextEdit> |
textEdits
The list of
TextEdit objects that were created for each refactoring operation. |
Modifier | Constructor and Description |
---|---|
protected |
BasicRefactoringTool.AbstractRenamer()
Creates a new
AbstractRenamer . |
Modifier and Type | Method and Description |
---|---|
protected void |
addTextEdit(Expression expression,
int extraOffset,
java.lang.String oldValue,
java.lang.String newValue)
Adds a new
TextEdit with the given information. |
protected void |
addTextEdit(Expression expression,
java.lang.String oldValue,
java.lang.String newValue)
Adds a new
TextEdit with the given information. |
protected TextEdit |
buildTextEdit(int offset,
java.lang.String oldValue,
java.lang.String newValue)
Creates a new
TextEdit for the given refactoring information. |
protected int |
reposition(int offset)
Repositions the given position that is based on the generated JPQL query to be the position
from the JPQL fragment that was parsed.
|
visit
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
protected BasicRefactoringTool.AbstractRenamer()
AbstractRenamer
.protected void addTextEdit(Expression expression, int extraOffset, java.lang.String oldValue, java.lang.String newValue)
TextEdit
with the given information.expression
- The Expression
which should be refactored, it will be used to
retrieve the offset of the changeextraOffset
- Additional offset that will be added to the given Expression
's
offset, which is the length of the string representation of what is before itoldValue
- The old value to change to the new onenewValue
- The new valueprotected void addTextEdit(Expression expression, java.lang.String oldValue, java.lang.String newValue)
TextEdit
with the given information.expression
- The Expression
which should be refactored, it will be used to
retrieve the offset of the changeoldValue
- The old value to change to the new onenewValue
- The new valueprotected TextEdit buildTextEdit(int offset, java.lang.String oldValue, java.lang.String newValue)
TextEdit
for the given refactoring information.offset
- The position where the change should be made within the actual JPQL fragmentoldValue
- The old value to change to the new onenewValue
- The new valueTextEdit
protected int reposition(int offset)
offset
- The position within the string generated by Expression.toActualText()