* @deprecated Use {@link #newWorkingCopy(String, IClasspathEntry[], IProgressMonitor)} instead.
* Note that if this deprecated method is used, problems may be reported twice
* if the given requestor is not the same as the current working copy owner one.
*/
public final ICompilationUnit newWorkingCopy(String name, IClasspathEntry[] classpath, IProblemRequestor problemRequestor, IProgressMonitor monitor) throws JavaModelException {
ExternalJavaProject project = new ExternalJavaProject(classpath);
IPackageFragment parent = project.getPackageFragmentRoot(Path.EMPTY).getPackageFragment(IPackageFragment.DEFAULT_PACKAGE_NAME);
CompilationUnit result = new CompilationUnit((PackageFragment) parent, name, this);
result.becomeWorkingCopy(problemRequestor, monitor);
return result;
}