public static ICompilationUnit getWorkingCopyIfExists(ICompilationUnit cu){ if (cu == null) return null; return JavaModelUtil.toWorkingCopy(cu);
public static IJavaElement getWorkingCopyIfExists(IJavaElement element) { if (element == null) return null; switch(element.getElementType()) { case IJavaElement.COMPILATION_UNIT: return JavaModelUtil.toWorkingCopy((ICompilationUnit)element); case IJavaElement.TYPE: case IJavaElement.FIELD: case IJavaElement.METHOD: case IJavaElement.INITIALIZER: return JavaModelUtil.toWorkingCopy((IMember)element); case IJavaElement.IMPORT_CONTAINER: return JavaModelUtil.toWorkingCopy((IImportContainer)element); case IJavaElement.IMPORT_DECLARATION: return JavaModelUtil.toWorkingCopy((IImportDeclaration)element); case IJavaElement.PACKAGE_DECLARATION: return JavaModelUtil.toWorkingCopy((IPackageDeclaration)element); default: return element; }
	public static ICompilationUnit getWorkingCopyIfExists(ICompilationUnit cu){		if (cu == null)			return null;		return JavaModelUtil.toWorkingCopy(cu);	}