FeatureSupport.redraw(context.getSourceContainer());
}
private void modifyModelStructure(IMoveShapeContext context) {
Lane movedLane = getMovedLane(context);
Participant sourceParticipant = (Participant) getBusinessObjectForPictogramElement(context.getSourceContainer());
Participant internalParticipant = null;
try {
ModelHandler handler = ModelHandler.getInstance(getDiagram());
internalParticipant = handler.getInternalParticipant();
handler.moveLane(movedLane, internalParticipant);
} catch (IOException e) {
Activator.logError(e);
}
LaneSet laneSet = null;
for (LaneSet set : sourceParticipant.getProcessRef().getLaneSets()) {
if (set.getLanes().contains(movedLane)) {
laneSet = set;
break;
}
}
if (laneSet != null) {
laneSet.getLanes().remove(movedLane);
if (laneSet.getLanes().isEmpty()) {
sourceParticipant.getProcessRef().getLaneSets().remove(laneSet);
}
Process process = internalParticipant.getProcessRef();
if (process.getLaneSets().isEmpty()) {
LaneSet createLaneSet = ModelHandler.FACTORY.createLaneSet();
// createLaneSet.setId(EcoreUtil.generateUUID());
process.getLaneSets().add(createLaneSet);
ModelUtil.setID(createLaneSet);