public static BaseElement getBaseElement(DefinitionsBehavior definitions,BaseElement baseElement){
if(baseElement==null){
return null;
}
if(baseElement.getId()==null){
BasicEObjectImpl basicEObjectImpl=(BasicEObjectImpl)baseElement;
if(basicEObjectImpl!=null&&basicEObjectImpl.eProxyURI()!=null){
String elementId=basicEObjectImpl.eProxyURI().fragment();
BaseElement bpmnElement=definitions.getElement(elementId);
return bpmnElement;
}
else{
return null;