* @return {@link Change} for changing servlet from existing {@link IType} to type with new name.
*/
public static Change web_replaceServletClass(IType type, final String newTypeName)
throws Exception {
final String oldTypeName = type.getFullyQualifiedName();
return modifyWeb(type, new DocumentModelVisitor() {
@Override
public void endVisit(DocumentElement element) {
if (element instanceof com.google.gdt.eclipse.designer.model.web.ServletElement) {
com.google.gdt.eclipse.designer.model.web.ServletElement servlet =
(com.google.gdt.eclipse.designer.model.web.ServletElement) element;