public static void setDocumentation(BaseElement baseElement,String documentationText){
List<Documentation> documentations=baseElement.getDocumentation();
if(documentations==null){
documentations=new ArrayList<Documentation>();
Documentation documentation=Bpmn2Factory.eINSTANCE.createDocumentation();
documentation.setText(documentationText);
documentations.add(documentation);
return;
}
if(documentations.size()==0){
Documentation documentation=Bpmn2Factory.eINSTANCE.createDocumentation();
documentation.setText(documentationText);
documentations.add(documentation);
return;
}
else{
documentations.get(0).setText(documentationText);