Source:
public Set<UniqueSetting> getMappingFor(VDomainModelReference domainModelReference, EObject domainObject) { if (domainModelReference == null) { throw new IllegalArgumentException("The given VDomainModelReference must not be null."); } if (!VCustomDomainModelReference.class.isInstance(domainModelReference)) { throw new IllegalArgumentException( "DomainModelReference must be an instance of VTableDomainModelReference."); } final VCustomDomainModelReference tableDomainModelReference = VCustomDomainModelReference.class .cast(domainModelReference); if (!tableDomainModelReference.getDomainModelReferences().isEmpty()) { return getMappingFor(tableDomainModelReference.getDomainModelReferences(), domainObject); } final ECPHardcodedReferences customControl; try { customControl = loadObject(tableDomainModelReference.getBundleName(), tableDomainModelReference.getClassName()); } catch (final DatabindingFailedException ex) { reportService.report(new DatabindingFailedReport(ex)); return Collections.<UniqueSetting> emptySet(); } if (customControl == null) { reportService.report(new DatabindingFailedReport(new DatabindingFailedException( String .format( "The provided ECPHardcodedReferences from Bundle %1$s Class %2$s cannot be resolved.", tableDomainModelReference.getBundleName(), tableDomainModelReference.getClassName())))); return Collections.<UniqueSetting> emptySet(); } final Set<VDomainModelReference> neededDomainModelReferences = customControl.getNeededDomainModelReferences(); if (neededDomainModelReferences.isEmpty()) { reportService.report(new DatabindingFailedReport(new DatabindingFailedException( String .format( "The provided ECPHardcodedReferences from Bundle %1$s Class %2$s doesn't define any DomainModelReferences.", tableDomainModelReference.getBundleName(), tableDomainModelReference.getClassName())))); return Collections.<UniqueSetting> emptySet(); } return getMappingFor(neededDomainModelReferences, domainObject); }

Target:
public Set<UniqueSetting> getMappingFor(VDomainModelReference domainModelReference, EObject domainObject) { if (domainModelReference == null) { throw new IllegalArgumentException("The given VDomainModelReference must not be null."); } if (!VCustomDomainModelReference.class.isInstance(domainModelReference)) { throw new IllegalArgumentException( "DomainModelReference must be an instance of VTableDomainModelReference."); } final VCustomDomainModelReference customDomainModelReference = VCustomDomainModelReference.class .cast(domainModelReference); if (!customDomainModelReference.getDomainModelReferences().isEmpty()) { return getMappingFor(customDomainModelReference.getDomainModelReferences(), domainObject); } final ECPHardcodedReferences hardcodedReference; try { hardcodedReference = loadObject(customDomainModelReference.getBundleName(), customDomainModelReference.getClassName()); } catch (final DatabindingFailedException ex) { reportService.report(new DatabindingFailedReport(ex)); return Collections.<UniqueSetting> emptySet(); } if (hardcodedReference == null) { reportService.report(new DatabindingFailedReport(new DatabindingFailedException( String .format( "The provided ECPHardcodedReferences from Bundle %1$s Class %2$s cannot be resolved.", customDomainModelReference.getBundleName(), customDomainModelReference.getClassName())))); return Collections.<UniqueSetting> emptySet(); } final Set<VDomainModelReference> neededDomainModelReferences = hardcodedReference.getNeededDomainModelReferences(); if (neededDomainModelReferences.isEmpty()) { reportService.report(new DatabindingFailedReport(new DatabindingFailedException( String .format( "The provided ECPHardcodedReferences from Bundle %1$s Class %2$s doesn't define any DomainModelReferences.", customDomainModelReference.getBundleName(), customDomainModelReference.getClassName())))); return Collections.<UniqueSetting> emptySet(); } return getMappingFor(neededDomainModelReferences, domainObject); }