if (newName.contains("_")) {
// don't rename java file in case of a variation
return new NullChange("Java file part of wicket won't be renamed.");
}
final RenameTypeProcessor jrp = new RenameTypeProcessor(compilationUnit.getAllTypes()[0]);
final RenameRefactoring rr = new RenameRefactoring(jrp);
jrp.setNewElementName(newName);
jrp.setUpdateQualifiedNames(true);
jrp.setUpdateReferences(true);
rr.checkAllConditions(paramIProgressMonitor);
return rr.createChange(paramIProgressMonitor);
}