Bug 38705 wizards should default with current editor selection [code manipulation]
Build 20030605 When using open-type wizard, or create class wizard, the initial type name should be using the current user editor selection if any, so as to ease the typing.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewTypeWizardPage.java
}
			ISourceRange range= createdType.getSourceRange();
			
			IBuffer buf= cu.getBuffer();
			String originalContent= buf.getText(range.getOffset(), range.getLength());
			String formattedContent= StubUtility.codeFormat(originalContent, indent, lineDelimiter);
			buf.replace(range.getOffset(), range.getLength(), formattedContent);
			if (!isInnerClass) {
				String fileComment= getFileComment(cu);
				if (fileComment != null && fileComment.length() > 0) {
					buf.replace(0, 0, fileComment + lineDelimiter);
				}
				cu.commit(false, new SubProgressMonitor(monitor, 1));
			} else {
				if (needsSave) {
					buf.save(null, false);
				}
				monitor.worked(1);
			}
			if (createdWorkingCopy != null) {
				fCreatedType= (IType) createdType.getPrimaryElement();
			} else {
				fCreatedType= createdType;
			}
		} finally {
			if (createdWorkingCopy != null) {
				createdWorkingCopy.destroy();
			}
			monitor.done();
		}