case IJavaElement.COMPILATION_UNIT:
	protected int computeAdornmentFlags(Object obj) {		try {			if (obj instanceof IJavaElement) {				IJavaElement element= (IJavaElement) obj;				int type= element.getElementType();				switch (type) {					case IJavaElement.JAVA_PROJECT:					case IJavaElement.PACKAGE_FRAGMENT_ROOT:						return getErrorTicksFromMarkers(element.getResource(), IResource.DEPTH_INFINITE, null);					case IJavaElement.PACKAGE_FRAGMENT:					case IJavaElement.CLASS_FILE:						return getErrorTicksFromMarkers(element.getResource(), IResource.DEPTH_ONE, null);					case IJavaElement.COMPILATION_UNIT:					case IJavaElement.PACKAGE_DECLARATION:					case IJavaElement.IMPORT_DECLARATION:					case IJavaElement.IMPORT_CONTAINER:					case IJavaElement.TYPE:					case IJavaElement.INITIALIZER:					case IJavaElement.METHOD:					case IJavaElement.FIELD:					case IJavaElement.LOCAL_VARIABLE:						ICompilationUnit cu= (ICompilationUnit) element.getAncestor(IJavaElement.COMPILATION_UNIT);						if (cu != null) {							ISourceReference ref= (type == IJavaElement.COMPILATION_UNIT) ? null : (ISourceReference) element;							// The assumption is that only source elements in compilation unit can have markers							if (cu.isWorkingCopy()) {								// working copy: look at annotation model								return getErrorTicksFromWorkingCopy(cu, ref);							}							return getErrorTicksFromMarkers(cu.getResource(), IResource.DEPTH_ONE, ref);						}						break;					default:				}			} else if (obj instanceof IResource) {				return getErrorTicksFromMarkers((IResource) obj, IResource.DEPTH_INFINITE, null);			}		} catch (CoreException e) {			if (e instanceof JavaModelException) {				if (((JavaModelException) e).isDoesNotExist()) {					return 0;				}			}			if (e.getStatus().getCode() == IResourceStatus.MARKER_NOT_FOUND) {				return 0;			}						JavaPlugin.log(e);		}		return 0;	}