if (pe != null) {
Object bo = getBusinessObject(pe);
if (bo == null)
return;
final Bpmn2MemoryModel model = ModelHandler.getModel(EcoreUtil.getURI(getDiagram()));
if (model == null) {
return;
}
boolean cancelActivity = ((BoundaryEvent) bo).isCancelActivity();
if (cancelActivity == false) {
cancelActivityCombo.select(1);
} else {
cancelActivityCombo.select(0);
}
String messageRef = null;
if (bo instanceof BoundaryEvent) {
BoundaryEvent boundaryEvent = (BoundaryEvent) bo;
if (boundaryEvent.getEventDefinitions().get(0) != null) {
MessageEventDefinition messageDefinition = (MessageEventDefinition) boundaryEvent.getEventDefinitions().get(0);
if (StringUtils.isNotEmpty(messageDefinition.getMessageRef())) {
messageRef = messageDefinition.getMessageRef();
}
}
}
String[] items = new String[model.getBpmnModel().getMessages().size() + 1];
items[0] = "";
int counter = 1;
int selectedCounter = 0;
for (Message message : model.getBpmnModel().getMessages()) {
items[counter] = message.getId() + " / " + message.getName();
if (message.getId().equals(messageRef)) {
selectedCounter = counter;
}
counter++;