The part of the method that operates on semantic element only (so all of the method at the moment) should also be moved to MetamodelMutationElementService.
This would look like
// DiagramMutationElementService.java
public Element createAllocateEdge(Element source, Element target, Node sourceNode, IEditingContext editingContext, IDiagramService diagramService) {
var allocateEdge = this.metamodelMutationElementService.createAllocateEdge(source, target);
this.metamodelMutationElementService.initialize(allocatedEdge);
}
and
// MetamodelMutationElementService.java
public AllocationUsage createAllocationUsage(Element source, Element target) {
// Current code in DiagramMutationElementService
}
private void addEndToAllocateEdge(AllocationUsage edge, Element end) {
// Current code in DiagramMutationElementService
}
The part of the method that operates on semantic element only (so all of the method at the moment) should also be moved to
MetamodelMutationElementService.This would look like
and