Skip to content

Commit

Permalink
All in one method rather than for loop
Browse files Browse the repository at this point in the history
Signed-off-by: Fred Bricon <fbricon@gmail.com>
  • Loading branch information
fbricon authored and datho7561 committed May 26, 2021
1 parent 88797bc commit 7ce8901
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Expand Up @@ -43,9 +43,7 @@ public void doRename(IRenameRequest request, List<TextEdit> locations) {
if (!DOMUtils.isXSD(xmlDocument)) {
return;
}
for (TextEdit textEdit: getRenameTextEdits(request)) {
locations.add(textEdit);
}
locations.addAll(getRenameTextEdits(request));

}

Expand Down
Expand Up @@ -84,9 +84,7 @@ public WorkspaceEdit doRename(DOMDocument xmlDocument, Position position, String
}
}

for (TextEdit textEdit : getRenameTextEdits(xmlDocument, node, position, newText)) {
textEdits.add(textEdit);
}
textEdits.addAll(getRenameTextEdits(xmlDocument, node, position, newText));

return createWorkspaceEdit(xmlDocument.getDocumentURI(), textEdits);
}
Expand Down

0 comments on commit 7ce8901

Please sign in to comment.