if (element instanceof IWorkingCopy) { IWorkingCopy wc= (IWorkingCopy)element; IJavaElement original= wc.getOriginalElement(); if (original != null) element= original; }
	private IResource getResourceFor(Object element) {		if (element instanceof IJavaElement) {			try {				element= ((IJavaElement)element).getUnderlyingResource();			} catch (JavaModelException e) {				return null;			}		}		if (!(element instanceof IResource) || ((IResource)element).isPhantom()) {			return null;		}		return (IResource)element;	}