if (sourceElement instanceof SourceType) { return (ICompilationUnit)((SourceType)sourceElement).getCompilationUnit();
if (sourceElement instanceof IType) { return (ICompilationUnit)((IType)sourceElement).getCompilationUnit(); } if (sourceElement instanceof ICompilationUnit) { return (ICompilationUnit)sourceElement;
	protected ICompilationUnit getCompilationUnit(IJavaStackFrame stackFrame) {		// Get the corresponding element.		ILaunch launch = stackFrame.getLaunch();		if (launch == null) {			return null;		}		ISourceLocator locator= launch.getSourceLocator();		if (locator == null) {			return null;		}		Object sourceElement= locator.getSourceElement(stackFrame);		if (sourceElement instanceof SourceType) {			return (ICompilationUnit)((SourceType)sourceElement).getCompilationUnit();		}		return null;	}