use of org.eclipse.jdt.ls.core.internal.corext.refactoring.base.JavaStringStatusContext in project eclipse.jdt.ls by eclipse.
the class RefactoringAnalyzeUtil method reportProblemNodes.
// public static IRegion[] getNewRanges(TextEdit[] edits, TextChange change) {
// IRegion[] result = new IRegion[edits.length];
// for (int i = 0; i < edits.length; i++) {
// result[i] = RefactoringAnalyzeUtil.getNewTextRange(edits[i], change);
// }
// return result;
// }
//
public static RefactoringStatus reportProblemNodes(String modifiedWorkingCopySource, SimpleName[] problemNodes) {
RefactoringStatus result = new RefactoringStatus();
for (int i = 0; i < problemNodes.length; i++) {
RefactoringStatusContext context = new JavaStringStatusContext(modifiedWorkingCopySource, SourceRangeFactory.create(problemNodes[i]));
result.addError(Messages.format(RefactoringCoreMessages.RefactoringAnalyzeUtil_name_collision, BasicElementLabels.getJavaElementName(problemNodes[i].getIdentifier())), context);
}
return result;
}
Aggregations