use of org.eclipse.jdt.ls.core.internal.corext.refactoring.rename.RefactoringScanner.TextMatch in project eclipse.jdt.ls by eclipse.
the class TextMatchUpdater method addTextUpdates.
private void addTextUpdates(ICompilationUnit cu, Set<TextMatch> matches) {
for (Iterator<TextMatch> resultIter = matches.iterator(); resultIter.hasNext(); ) {
TextMatch match = resultIter.next();
if (!match.isQualified() && fOnlyQualified) {
continue;
}
int matchStart = match.getStartPosition();
ReplaceEdit edit = new ReplaceEdit(matchStart, fCurrentNameLength, fNewName);
try {
TextChangeCompatibility.addTextEdit(fManager.get(cu), TEXT_EDIT_LABEL, edit, TEXTUAL_MATCHES);
} catch (MalformedTreeException e) {
// conflicting update -> omit text match
}
}
}
Aggregations