<s> package org . eclipse . jdt . core ; import org . codehaus . jdt . groovy . integration . LanguageSupportFactory ; import org . eclipse . core . runtime . IProgressMonitor ; import org . eclipse . jdt . core . compiler . CharOperation ; import org . eclipse . jdt . internal . core . BufferManager ; import org . eclipse . jdt . internal . core . CompilationUnit ; import org . eclipse . jdt . internal . core . DefaultWorkingCopyOwner ; import org . eclipse . jdt . internal . core . ExternalJavaProject ; import org . eclipse . jdt . internal . core . PackageFragment ; import org . eclipse . jdt . internal . core . PackageFragmentRoot ; public abstract class WorkingCopyOwner { public static void setPrimaryBufferProvider ( WorkingCopyOwner primaryBufferProvider ) { DefaultWorkingCopyOwner . PRIMARY . primaryBufferProvider = primaryBufferProvider ; } public IBuffer createBuffer ( ICompilationUnit workingCopy ) { return BufferManager . createBuffer ( workingCopy ) ; } public IProblemRequestor getProblemRequestor ( ICompilationUnit workingCopy ) { return null ; } public String findSource ( String typeName , String packageName ) { return null ; } public boolean isPackage ( String [ ] pkg ) { return false ; } public final ICompilationUnit newWorkingCopy ( String name , IClasspathEntry [ ] classpath , IProblemRequestor problemRequestor , IProgressMonitor monitor ) throws JavaModelException { ExternalJavaProject project = new ExternalJavaProject ( classpath ) ; IPackageFragment parent = ( ( PackageFragmentRoot ) project . getPackageFragmentRoot ( project . getProject ( ) ) ) . getPackageFragment ( CharOperation . NO_STRINGS ) ; CompilationUnit result = LanguageSupportFactory . newCompilationUnit ( ( PackageFragment ) parent , name , this ) ; result . becomeWorkingCopy ( problemRequestor , monitor ) ; return result ; } public final ICompilationUnit newWorkingCopy ( String name , IClasspathEntry [ ] classpath , IProgressMonitor monitor ) throws JavaModelException { ExternalJavaProject project = new ExternalJavaProject ( classpath ) ; IPackageFragment parent = ( ( PackageFragmentRoot ) project . getPackageFragmentRoot ( project . getProject ( ) ) ) . getPackageFragment ( CharOperation . NO_STRINGS ) ; CompilationUnit result = LanguageSupportFactory . newCompilationUnit ( ( PackageFragment ) parent , name , this ) ; result . becomeWorkingCopy ( getProblemRequestor ( result ) , monitor ) ; return result ; } } </s>