deleteCell(((TransitionModel) transition).getToolSpecific()
.getTrigger(), true);
}
if (transition.getParent() instanceof GroupModel) {
GroupModel group = (GroupModel) transition.getParent();
TriggerModel triggerModel = ((PetriNetModelProcessor) getModelProcessor())
.newTrigger(map);
if (map.getTriggerPosition() != null) {
triggerModel.setPosition(map.getTriggerPosition());
} else {
if (isRotateSelected()) {
triggerModel.setPosition(map.getPosition().x - 25,
map.getPosition().y + 10);
} else {
triggerModel.setPosition(map.getPosition().x + 10,
map.getPosition().y - 20);
}
}
ParentMap pm = new ParentMap();
pm.addEntry(triggerModel, group);
HashMap<GroupModel, AttributeMap> hm = new HashMap<GroupModel, AttributeMap>();
hm.put(group, group.getAttributes());
getGraph().getModel().insert(new Object[] { triggerModel }, hm,
null, pm, null);
return triggerModel;