validateBeanReference(element, context, beanName);
}
private URI getLocation(IResourceModelElement element) {
if (element instanceof AbstractSourceModelElement) {
AbstractSourceModelElement sourceElement = (AbstractSourceModelElement) element;
IModelSourceLocation sourceLocation = sourceElement.getElementSourceLocation();
if (sourceLocation instanceof XmlSourceLocation) {
XmlSourceLocation xmlSourceLocation = (XmlSourceLocation) sourceLocation;
Resource resource = xmlSourceLocation.getResource();
try {
File file = resource.getFile();