IPath interfaceCuPath= cuPath .removeLastSegments(1) .append(getCuNameForNewInterface());  ICompilationUnit newCuWC= getInputClassPackage().getCompilationUnit(getCuNameForNewInterface()); String source= createExtractedInterfaceCUSource(newCuWC); String formattedSource= ToolFactory.createCodeFormatter().format(source, 0, null, lineSeparator); return new CreateTextFileChange(interfaceCuPath, formattedSource, true);
IPath interfaceCuPath= cuPath.removeLastSegments(1).append(getCuNameForNewInterface());  ICompilationUnit newCuWC= null; try{ newCuWC= WorkingCopyUtil.getNewWorkingCopy(getInputClassPackage(), getCuNameForNewInterface()); String formattedSource= formatSource(createExtractedInterfaceCUSource(newCuWC, new SubProgressMonitor(pm, 1))); return new CreateTextFileChange(interfaceCuPath, formattedSource, true); } finally{ if (newCuWC != null) newCuWC.destroy(); pm.done(); }
	private IChange createExtractedInterface() throws CoreException {		String lineSeparator= getLineSeperator(); 		IPath cuPath= ResourceUtil.getFile(fInputType.getCompilationUnit()).getFullPath();		IPath interfaceCuPath= cuPath										.removeLastSegments(1)										.append(getCuNameForNewInterface());		//XXX need to destroy		ICompilationUnit newCuWC= getInputClassPackage().getCompilationUnit(getCuNameForNewInterface());		String source= createExtractedInterfaceCUSource(newCuWC);		String formattedSource= ToolFactory.createCodeFormatter().format(source, 0, null, lineSeparator);		return new CreateTextFileChange(interfaceCuPath, formattedSource, true);		}